Makefile 2.2 KB

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