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.

64 lines
1.8 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:=2
  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) $(1)/usr/bin
  35. $(CP) $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(1)/usr/bin/
  36. $(SED) \
  37. 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  38. $(1)/usr/bin/libusb-config
  39. $(INSTALL_DIR) $(2)/bin
  40. $(LN) ../../usr/bin/libusb-config $(2)/bin/
  41. $(INSTALL_DIR) $(1)/usr/include
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/usb.h $(1)/usr/include/
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb* $(1)/usr/lib/
  45. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusb.pc $(1)/usr/lib/pkgconfig/
  47. endef
  48. define Package/libusb-compat/install
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-0.1.so.$(ABI_VERSION)* $(1)/usr/lib/
  51. endef
  52. $(eval $(call BuildPackage,libusb-compat))