usbutils: Switch to xz tarball, update db to 2016-07-21
[openwrt/openwrt.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_MD5SUM:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
17 PKG_LICENSE:=GPL-2.0
18 PKG_LICENSE_FILES:=COPYING
19
20 USB_IDS_VERSION:=2016-07-21
21 USB_IDS_MD5SUM:=49214de0abe87ed2f1d854a38387d97ddda61bb0a4bd41b91b3deb72242dfa68
22 USB_IDS_FILE:=usb.ids
23
24 PKG_BUILD_PARALLEL:=1
25 PKG_INSTALL:=1
26
27 PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/usbutils
32 SECTION:=utils
33 CATEGORY:=Utilities
34 DEPENDS:=+libusb-1.0 +librt +libpthread
35 TITLE:=USB devices listing utilities
36 URL:=http://www.linux-usb.org/
37 endef
38
39 define Download/usb_ids
40 FILE:=$(USB_IDS_FILE)
41 URL:=@GITHUB/gentoo/hwids/83b7c8958d17329ee6c0224b38e41c0bc4c66bcd
42 MD5SUM:=$(USB_IDS_MD5SUM)
43 endef
44 $(eval $(call Download,usb_ids))
45
46 define Build/Prepare
47 $(Build/Prepare/Default)
48 $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR)
49 endef
50
51 CONFIGURE_ARGS += \
52 --disable-zlib
53
54 define Package/usbutils/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/
57 $(INSTALL_DIR) $(1)/usr/share
58 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
59 endef
60
61 $(eval $(call BuildPackage,usbutils))