fix ettercap compile
[openwrt/svn-archive/archive.git] / utils / pciutils / 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:=pciutils
12 PKG_VERSION:=2.2.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.kernel.org/pub/software/utils/pciutils/ \
17 ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
18 PKG_MD5SUM:=c18e2a5f04e9abae5a42439de294f086
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/pciutils
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=Linux PCI Utilities
28 URL:=http://www.kernel.org/pub/software/utils/pciutils/
29 endef
30
31 define Package/pciutils/description
32 This package contains various utilities for inspecting and setting of
33 devices connected to the PCI bus.
34 endef
35
36 define Package/pciutils/postinst
37 #!/bin/sh
38 $${IPKG_INSTROOT}/usr/sbin/update-pciids.sh
39 endef
40
41 define Build/Configure
42 endef
43
44 define Build/Compile
45 $(call Build/Compile/Default, \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 IDSDIR="/usr/share" \
48 HOST="$(GNU_TARGET_NAME)" \
49 )
50 endef
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
55 $(INSTALL_DIR) $(1)/usr/include/pci
56 $(CP) $(PKG_BUILD_DIR)/lib/pci.h $(1)/usr/include/pci
57 $(CP) $(PKG_BUILD_DIR)/lib/config.h $(1)/usr/include/pci
58 $(CP) $(PKG_BUILD_DIR)/lib/header.h $(1)/usr/include/pci
59 $(CP) $(PKG_BUILD_DIR)/lib/types.h $(1)/usr/include/pci
60 endef
61
62 define Package/pciutils/install
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(CP) $(PKG_BUILD_DIR)/{lspci,setpci,update-pciids.sh} $(1)/usr/sbin/
65 $(INSTALL_DIR) $(1)/usr/share
66 $(CP) $(PKG_BUILD_DIR)/pci.ids $(1)/usr/share/
67 endef
68
69 $(eval $(call BuildPackage,pciutils))