2
0

Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # Copyright (C) 2007-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:=usbutils
  9. PKG_VERSION:=007
  10. PKG_RELEASE:=10
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
  13. PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/usbutils
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. DEPENDS:=+libusb-1.0 +librt +libpthread
  24. TITLE:=USB devices listing utilities
  25. URL:=http://www.linux-usb.org/
  26. endef
  27. USB_IDS_VER:=0.321
  28. USB_IDS_FILE:=usb.ids.$(USB_IDS_VER)
  29. define Download/usb_ids
  30. FILE:=$(USB_IDS_FILE)
  31. URL_FILE:=usb.ids
  32. URL:=@GITHUB/vcrhonek/hwdata/v$(USB_IDS_VER)
  33. HASH:=00aa21766bb078186d2bc2cca9a2ae910aa2b787a810e97019b1b3f94c9453f2
  34. endef
  35. $(eval $(call Download,usb_ids))
  36. define Build/Prepare
  37. $(Build/Prepare/Default)
  38. $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR)/usb.ids
  39. endef
  40. CONFIGURE_ARGS += \
  41. --disable-zlib
  42. define Package/usbutils/install
  43. $(INSTALL_DIR) $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/
  45. $(INSTALL_DIR) $(1)/usr/share
  46. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
  47. endef
  48. $(eval $(call BuildPackage,usbutils))