0b3f2d95a5d49ea1fed294f2d234d873234646bd
[packages.git] / utils / usbutils / Makefile
1
2 # Copyright (C) 2006 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.71
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/linux-usb
17 PKG_MD5SUM:=479d7c7098ef44cc95e7978fd71c712c
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/usbutils
26   SECTION:=utils
27   CATEGORY:=Utilities
28   DEPENDS:=+libusb
29   TITLE:=USB devices listing utilities
30   URL:=http://linux-usb.sourceforge.net/
31 endef
32
33 define Build/Configure
34         $(call Build/Configure/Default, \
35                 --enable-shared \
36                 --enable-static \
37         )
38 endef
39
40 define Build/Compile
41         $(MAKE) -C $(PKG_BUILD_DIR) \
42                 DESTDIR="$(PKG_INSTALL_DIR)" \
43                 all install
44 endef
45
46 define Package/usbutils/install
47         install -d -m0755 $(1)/usr/sbin
48         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(1)/usr/sbin/
49         install -d -m0755 $(1)/usr/share
50         $(CP) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
51 endef
52
53 $(eval $(call BuildPackage,usbutils))