e1ee490130b39d5889fb0397d4a2fb8c87155ec6
[openwrt/svn-archive/archive.git] / utils / usbutils / Makefile
1 #
2 # Copyright (C) 2007-2009 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:=0.84
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-usb
16 PKG_MD5SUM:=87612c82e66393a395db91361d168c1b
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/usbutils
21 SECTION:=utils
22 CATEGORY:=Utilities
23 DEPENDS:=+libusb +zlib
24 TITLE:=USB devices listing utilities
25 URL:=http://linux-usb.sourceforge.net/
26 endef
27
28 define Package/usbutils/postinst
29 #!/bin/sh
30 (cd $${IPKG_INSTROOT}/usr/share; $${IPKG_INSTROOT}/usr/sbin/update-usbids.sh)
31 exit 0
32 endef
33
34 # uses GNU configure
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 all install
40 endef
41
42 define Package/usbutils/install
43 $(INSTALL_DIR) $(1)/usr/sbin
44 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(1)/usr/sbin/
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/usb-devices $(1)/usr/sbin/
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/update-usbids.sh $(1)/usr/sbin/
47 $(INSTALL_DIR) $(1)/usr/share
48 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/
49 endef
50
51 $(eval $(call BuildPackage,usbutils))