|
@@ -0,0 +1,68 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2007-2014 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=pciutils
|
|
11
|
+PKG_VERSION:=3.2.1
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
|
|
16
|
+PKG_MD5SUM:=425b1acad6854cc2bbb06ac8e48e76fc
|
|
17
|
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
|
18
|
+
|
|
19
|
+PKG_INSTALL:=1
|
|
20
|
+
|
|
21
|
+include $(INCLUDE_DIR)/package.mk
|
|
22
|
+
|
|
23
|
+define Package/pciutils
|
|
24
|
+ SECTION:=utils
|
|
25
|
+ CATEGORY:=Utilities
|
|
26
|
+ TITLE:=Linux PCI Utilities
|
|
27
|
+ URL:=http://mj.ucw.cz/pciutils.shtml
|
|
28
|
+ DEPENDS:=+zlib
|
|
29
|
+endef
|
|
30
|
+
|
|
31
|
+define Package/pciutils/description
|
|
32
|
+ contains collection of programs for inspecting and manipulating configuration
|
|
33
|
+ of PCI devices
|
|
34
|
+endef
|
|
35
|
+
|
|
36
|
+define Package/pciutils/postinst
|
|
37
|
+#!/bin/sh
|
|
38
|
+[ -z "$${IPKG_INSTROOT}" ] || \
|
|
39
|
+(cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old)
|
|
40
|
+exit 0
|
|
41
|
+endef
|
|
42
|
+
|
|
43
|
+MAKE_FLAGS += \
|
|
44
|
+ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
|
|
45
|
+ PREFIX="/usr" \
|
|
46
|
+ HOST="$(GNU_TARGET_NAME)" \
|
|
47
|
+ ZLIB="yes" \
|
|
48
|
+
|
|
49
|
+ifneq ($(CONFIG_USE_EGLIBC),)
|
|
50
|
+TARGET_LDFLAGS += -lresolv
|
|
51
|
+endif
|
|
52
|
+
|
|
53
|
+define Build/InstallDev
|
|
54
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
55
|
+ $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
|
|
56
|
+ $(INSTALL_DIR) $(1)/usr/include/pci
|
|
57
|
+ $(CP) $(foreach i,pci.h config.h header.h types.h, \
|
|
58
|
+ $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
|
|
59
|
+endef
|
|
60
|
+
|
|
61
|
+define Package/pciutils/install
|
|
62
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
63
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
|
|
64
|
+ $(INSTALL_DIR) $(1)/usr/share
|
|
65
|
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
|
|
66
|
+endef
|
|
67
|
+
|
|
68
|
+$(eval $(call BuildPackage,pciutils))
|