You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2010-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libusb-compat
  9. PKG_VERSION:=0.1.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://github.com/libusb/libusb-compat-0.1/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=8259f8d5b084fe43c47823a939e955e0ba21942b8d112266c39d228cc14764d6
  14. PKG_MAINTAINER:= Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libusb-compat
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=libusb-0.1 compatibility library
  24. DEPENDS:=+libusb-1.0
  25. URL:=http://libusb.wiki.sourceforge.net/
  26. ABI_VERSION:=4
  27. endef
  28. define Package/libusb-compat/description
  29. libusb is a C library that gives applications easy access to USB devices on
  30. many different operating systems.
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(2)/usr/bin
  35. $(CP) $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(2)/usr/bin/
  36. $(INSTALL_DIR) $(1)/usr/include
  37. $(CP) $(PKG_INSTALL_DIR)/usr/include/usb.h $(1)/usr/include/
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb* $(1)/usr/lib/
  40. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc $(1)/usr/lib/pkgconfig/
  42. endef
  43. define Package/libusb-compat/install
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-0.1.so.$(ABI_VERSION)* $(1)/usr/lib/
  46. endef
  47. $(eval $(call BuildPackage,libusb-compat))