Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2007-2013 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:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
  13. PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9
  14. USB_IDS_VERSION:=2013-01-16
  15. USB_IDS_MD5SUM:=2a2344907b6344f0935c86efaf9de620
  16. USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. PKG_MAINTAINER := Felix Fietkau <nbd@openwrt.org>
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/usbutils
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. DEPENDS:=+libusb-1.0 +zlib +librt +libpthread
  25. TITLE:=USB devices listing utilities
  26. URL:=http://www.linux-usb.org/
  27. endef
  28. define Download/usb_ids
  29. FILE:=$(USB_IDS_FILE)
  30. URL:=http://mirror2.librecmc.org/sources
  31. MD5SUM:=$(USB_IDS_MD5SUM)
  32. endef
  33. $(eval $(call Download,usb_ids))
  34. define Build/Prepare
  35. $(Build/Prepare/Default)
  36. echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in
  37. echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in
  38. endef
  39. define Package/usbutils/install
  40. $(INSTALL_DIR) $(1)/usr/bin
  41. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/
  42. $(INSTALL_DIR) $(1)/usr/share
  43. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/
  44. endef
  45. $(eval $(call BuildPackage,usbutils))