Makefile cleanups, round 4
[openwrt/svn-archive/archive.git] / utils / usbutils / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=usbutils
12 PKG_VERSION:=0.73
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/linux-usb
17 PKG_MD5SUM:=88978b4ad891f610620b1b8e5e0f43eb
18
19 PKG_BUILD_DEPENDS:=zlib
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/usbutils
24 SECTION:=utils
25 CATEGORY:=Utilities
26 DEPENDS:=+libusb +zlib
27 TITLE:=USB devices listing utilities
28 URL:=http://linux-usb.sourceforge.net/
29 endef
30
31 define Package/usbutils/postinst
32 #!/bin/sh
33 $${IPKG_INSTROOT}/usr/sbin/update-usbids.sh
34 endef
35
36 # uses GNU configure
37
38 define Build/Compile
39 $(MAKE) -C $(PKG_BUILD_DIR) \
40 DESTDIR="$(PKG_INSTALL_DIR)" \
41 all install
42 endef
43
44 define Package/usbutils/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/update-usbids.sh $(1)/usr/sbin/
48 $(INSTALL_DIR) $(1)/usr/share
49 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/
50 endef
51
52 $(eval $(call BuildPackage,usbutils))