cleanup
[openwrt/svn-archive/archive.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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/linux-usb
18 PKG_MD5SUM:=479d7c7098ef44cc95e7978fd71c712c
19 PKG_CAT:=zcat
20
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 DESCRIPTION:=USB devices listing utilities.
31 URL:=http://linux-usb.sourceforge.net/
32 endef
33
34 define Build/Configure
35 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
38 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 ./configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_LARGEFILE) \
59 $(DISABLE_NLS) \
60 --enable-shared \
61 --enable-static \
62 );
63 endef
64
65 define Build/Compile
66 rm -rf $(PKG_INSTALL_DIR)
67 mkdir -p $(PKG_INSTALL_DIR)
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Package/usbutils/install
74 install -d -m0755 $(1)/usr/sbin
75 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(1)/usr/sbin/
76 install -d -m0755 $(1)/usr/share
77 $(CP) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
78 endef
79
80 $(eval $(call BuildPackage,usbutils))