c5f625eb3401ccb781e116d3d7a5acd72198317c
[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:=8
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:=016be785fd4f5f895c6482ec484507d5a08839fa
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/vcrhonek/hwdata/$(USB_IDS_REV)
41 HASH:=b1877a9fd30c2f9dedec1657963775e7f261c892eb7d6f4281c453bd73492489
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))