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_HASH
:=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 PCI_IDS_REV
:=91cfa8a0c994634ba9a4a8639aa2ac6dff8453b9
41 PCI_IDS_FILE
:=pci.ids.
$(PCI_IDS_REV
)
42 define Download
/pci_ids
45 URL
:=@GITHUB
/pciutils
/pciids
/$(PCI_IDS_REV
)
46 HASH
:=798528092d1c58eeac99c6505033ec4ce8fe3e19d7e0c41b06790d58753a89b6
48 $(eval
$(call Download
,pci_ids
))
51 $(call Build
/Prepare
/Default
)
52 $(RM
) $(PKG_BUILD_DIR
)/pci.ids
53 $(CP
) $(DL_DIR
)/$(PCI_IDS_FILE
) $(PKG_BUILD_DIR
)/pci.ids
57 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
63 ifneq ($(CONFIG_USE_GLIBC
),)
64 TARGET_LDFLAGS
+= -lresolv
67 define Build
/InstallDev
68 $(INSTALL_DIR
) $(1)/usr
/lib
69 $(CP
) $(PKG_BUILD_DIR
)/lib
/libpci.a
$(1)/usr
/lib
70 $(INSTALL_DIR
) $(1)/usr
/include/pci
71 $(CP
) $(foreach i
,pci.h config.h header.h types.h
, \
72 $(PKG_BUILD_DIR
)/lib
/$(i
)) $(1)/usr
/include/pci
75 define Package
/pciutils
/install
76 $(INSTALL_DIR
) $(1)/usr
/sbin
77 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{lspci
,setpci
,update-pciids
} $(1)/usr
/sbin
/
78 $(INSTALL_DIR
) $(1)/usr
/share
79 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/pci.ids.gz
$(1)/usr
/share
/
82 $(eval
$(call BuildPackage
,pciutils
))