Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2010-2016 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
  9. PKG_VERSION:=1.0.26
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=\
  13. https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION) \
  14. @SF/$(PKG_NAME)
  15. PKG_HASH:=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
  16. PKG_MAINTAINER:= Felix Fietkau <nbd@nbd.name>
  17. PKG_LICENSE:=LGPL-2.1-or-later
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_CPE_ID:=cpe:/a:libusb:libusb
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libusb-1.0
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=A library for accessing Linux USB devices
  27. DEPENDS:=+libpthread +librt +libatomic
  28. URL:=http://libusb.info/
  29. ABI_VERSION:=0
  30. endef
  31. define Package/libusb-1.0/description
  32. libusb is a C library that gives applications easy access to USB devices on
  33. many different operating systems.
  34. endef
  35. define Package/fxload
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. TITLE:=fxload firmware loader
  39. URL:=http://linux-hotplug.sourceforge.net
  40. DEPENDS:=+libusb-1.0
  41. endef
  42. define Package/fxload/description
  43. This program is conveniently able to download firmware into FX, FX2,
  44. and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB.
  45. It is intended to be invoked by hotplug scripts when the unprogrammed
  46. device appears on the bus.
  47. endef
  48. TARGET_CFLAGS += $(FPIC)
  49. CONFIGURE_ARGS += \
  50. --enable-examples-build \
  51. --disable-log \
  52. --disable-udev
  53. define Build/InstallDev
  54. $(INSTALL_DIR) $(1)/usr/include/libusb-1.0
  55. $(CP) $(PKG_INSTALL_DIR)/usr/include/libusb-1.0/libusb.h $(1)/usr/include/libusb-1.0/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.* $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb-1.0.pc $(1)/usr/lib/pkgconfig/
  60. endef
  61. define Package/libusb-1.0/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/
  64. endef
  65. define Package/fxload/install
  66. $(INSTALL_DIR) $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/.libs/fxload $(1)/usr/sbin
  68. endef
  69. $(eval $(call BuildPackage,libusb-1.0))
  70. $(eval $(call BuildPackage,fxload))