Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
  13. PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=COPYING
  16. USB_IDS_VERSION:=2016-03-03
  17. USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8
  18. USB_IDS_FILE:=usb.ids
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/usbutils
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. DEPENDS:=+libusb-1.0 +librt +libpthread
  27. TITLE:=USB devices listing utilities
  28. URL:=http://www.linux-usb.org/
  29. endef
  30. define Download/usb_ids
  31. FILE:=$(USB_IDS_FILE)
  32. URL:=@GITHUB/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822
  33. MD5SUM:=$(USB_IDS_MD5SUM)
  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)
  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))