5301bb7d830f539bbc8af4a2b2256a0a883618aa
[openwrt/svn-archive/archive.git] / utils / pciutils / 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:=pciutils
12 PKG_VERSION:=3.0.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
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:=85b5dae042217cf11bca10d52210a78d
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/pciutils
23 SECTION:=utils
24 CATEGORY:=Utilities
25 TITLE:=Linux PCI Utilities
26 URL:=http://mj.ucw.cz/pciutils.shtml
27 endef
28
29 define Package/pciutils/description
30 This package contains various utilities for inspecting and setting of
31 devices connected to the PCI bus.
32 endef
33
34 define Package/pciutils/postinst
35 #!/bin/sh
36 $${IPKG_INSTROOT}/usr/sbin/update-pciids.sh
37 endef
38
39 MAKE_FLAGS += \
40 CFLAGS="$(TARGET_CFLAGS)" \
41 IDSDIR="/usr/share" \
42 HOST="$(GNU_TARGET_NAME)" \
43 ZLIB="no" \
44
45 define Build/InstallDev
46 $(INSTALL_DIR) $(1)/usr/lib
47 $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
48 $(INSTALL_DIR) $(1)/usr/include/pci
49 $(CP) $(foreach i,pci.h config.h header.h types.h, \
50 $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
51 endef
52
53 define Package/pciutils/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(CP) $(PKG_BUILD_DIR)/{lspci,setpci,update-pciids.sh} $(1)/usr/sbin/
56 $(INSTALL_DIR) $(1)/usr/share
57 $(CP) $(PKG_BUILD_DIR)/pci.ids $(1)/usr/share/
58 endef
59
60 $(eval $(call BuildPackage,pciutils))