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