treewide: clean up and unify PKG_VERSION for git based downloads
[openwrt/staging/yousong.git] / package / utils / usbutils / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=usbutils
11 PKG_VERSION:=007
12 PKG_RELEASE:=5
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
16 PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
17 PKG_LICENSE:=GPL-2.0
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_BUILD_PARALLEL:=1
21 PKG_INSTALL:=1
22
23 PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/usbutils
28 SECTION:=utils
29 CATEGORY:=Utilities
30 DEPENDS:=+libusb-1.0 +librt +libpthread
31 TITLE:=USB devices listing utilities
32 URL:=http://www.linux-usb.org/
33 endef
34
35 USB_IDS_REV:=83b7c8958d17329ee6c0224b38e41c0bc4c66bcd
36 USB_IDS_FILE:=usb.ids.$(USB_IDS_REV)
37 define Download/usb_ids
38 FILE:=$(USB_IDS_FILE)
39 URL_FILE:=usb.ids
40 URL:=@GITHUB/gentoo/hwids/83b7c8958d17329ee6c0224b38e41c0bc4c66bcd
41 HASH:=49214de0abe87ed2f1d854a38387d97ddda61bb0a4bd41b91b3deb72242dfa68
42 endef
43 $(eval $(call Download,usb_ids))
44
45 define Build/Prepare
46 $(Build/Prepare/Default)
47 $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR)/usb.ids
48 endef
49
50 CONFIGURE_ARGS += \
51 --disable-zlib
52
53 define Package/usbutils/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/
56 $(INSTALL_DIR) $(1)/usr/share
57 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
58 endef
59
60 $(eval $(call BuildPackage,usbutils))