2 # Copyright (C) 2007-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/software
/utils
/pciutils
16 PKG_MD5SUM
:=3a99141a9f40528d0a0035665a06dc37ddb1ae341658e51b50a76ecf86235efc
17 PKG_MAINTAINER
:=Álvaro Fernández Rojas
<noltari@gmail.com
>
20 PKG_LICENSE_FILES
:=COPYING
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/pciutils
30 TITLE
:=Linux PCI Utilities
31 URL
:=http
://mj.ucw.cz
/pciutils.shtml
32 DEPENDS
:=+libkmod
+zlib
35 define Package
/pciutils
/description
36 contains collection of programs for inspecting and manipulating configuration
40 define Package
/pciutils
/postinst
42 [ -z
"$${IPKG_INSTROOT}" ] || \
43 (cd
$${PKG_ROOT}/usr
/share
; $${PKG_ROOT}/usr
/sbin
/update-pciids
; rm pci.ids.gz.old
)
48 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
50 HOST
="$(GNU_TARGET_NAME)" \
54 ifneq ($(CONFIG_USE_GLIBC
),)
55 TARGET_LDFLAGS
+= -lresolv
58 define Build
/InstallDev
59 $(INSTALL_DIR
) $(1)/usr
/lib
60 $(CP
) $(PKG_BUILD_DIR
)/lib
/libpci.a
$(1)/usr
/lib
61 $(INSTALL_DIR
) $(1)/usr
/include/pci
62 $(CP
) $(foreach i
,pci.h config.h header.h types.h
, \
63 $(PKG_BUILD_DIR
)/lib
/$(i
)) $(1)/usr
/include/pci
66 define Package
/pciutils
/install
67 $(INSTALL_DIR
) $(1)/usr
/sbin
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{lspci
,setpci
,update-pciids
} $(1)/usr
/sbin
/
69 $(INSTALL_DIR
) $(1)/usr
/share
70 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/pci.ids.gz
$(1)/usr
/share
/
73 $(eval
$(call BuildPackage
,pciutils
))