Fix lua plugin compilation
[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_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 PKG_BUILD_DEPENDS:=zlib
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/usbutils
27 SECTION:=utils
28 CATEGORY:=Utilities
29 DEPENDS:=+libusb +zlib
30 TITLE:=USB devices listing utilities
31 URL:=http://linux-usb.sourceforge.net/
32 endef
33
34 define Package/usbutils/postinst
35 #!/bin/sh
36 $${IPKG_INSTROOT}/usr/sbin/update-usbids.sh
37 endef
38
39 # uses GNU configure
40
41 define Build/Compile
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Package/usbutils/install
48 $(INSTALL_DIR) $(1)/usr/sbin
49 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(1)/usr/sbin/
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/update-usbids.sh $(1)/usr/sbin/
51 $(INSTALL_DIR) $(1)/usr/share
52 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/
53 endef
54
55 $(eval $(call BuildPackage,usbutils))