Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.24
  10. PKG_RELEASE:=$(AUTORELEASE)
  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:=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a
  16. PKG_MAINTAINER:= Felix Fietkau <[email protected]>
  17. PKG_LICENSE:=LGPL-2.1-or-later
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libusb-1.0
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=A library for accessing Linux USB devices
  26. DEPENDS:=+libpthread +librt
  27. URL:=http://libusb.info/
  28. ABI_VERSION:=0
  29. endef
  30. define Package/libusb-1.0/description
  31. libusb is a C library that gives applications easy access to USB devices on
  32. many different operating systems.
  33. endef
  34. TARGET_CFLAGS += $(FPIC)
  35. CONFIGURE_ARGS += \
  36. --disable-udev \
  37. --disable-log
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include/libusb-1.0
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/libusb-1.0/libusb.h $(1)/usr/include/libusb-1.0/
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.* $(1)/usr/lib/
  43. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb-1.0.pc $(1)/usr/lib/pkgconfig/
  45. endef
  46. define Package/libusb-1.0/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/
  49. endef
  50. $(eval $(call BuildPackage,libusb-1.0))