2 # Copyright (C) 2007-2017 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
:=91edbd0429a84705c9ad156d4ff38ccc724d41ea54c4c5b88e38e996f8a34f05
18 PKG_MAINTAINER
:=Lucian Cristian
<lucian.cristian@gmail.com
>
20 PKG_LICENSE_FILES
:=COPYING
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/pciutils
28 TITLE
:=Linux PCI Utilities
29 URL
:=http
://mj.ucw.cz
/pciutils.shtml
30 DEPENDS
:=+libkmod
+libpci
+pciids
33 define Package
/pciutils
/description
34 contains collection of programs for inspecting and manipulating configuration
41 TITLE
:=Linux PCI Libraries
42 URL
:=http
://mj.ucw.cz
/pciutils.shtml
45 TARGET_CFLAGS
+= $(FPIC
)
48 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
55 ifneq ($(CONFIG_USE_GLIBC
),)
56 TARGET_LDFLAGS
+= -lresolv
59 define Build
/InstallDev
60 $(INSTALL_DIR
) $(1)/usr
/lib
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpci.so
.3 \
62 $(PKG_INSTALL_DIR
)/usr
/lib
/libpci.so
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
64 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
65 $(CP
) $(PKG_BUILD_DIR
)/lib
/libpci.
pc $(1)/usr
/lib
/pkgconfig
66 $(SED
) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr
/lib
/pkgconfig
/libpci.
pc
67 $(SED
) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr
/lib
/pkgconfig
/libpci.
pc
68 $(INSTALL_DIR
) $(1)/usr
/include/pci
69 $(CP
) $(foreach i
,pci.h config.h header.h types.h
, \
70 $(PKG_BUILD_DIR
)/lib
/$(i
)) $(1)/usr
/include/pci
73 define Package
/pciutils
/install
74 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/usr
/bin
75 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/lspci
$(1)/usr
/bin
76 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/setpci
$(1)/usr
/sbin
/
79 define Package
/libpci
/install
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* $(1)/usr
/lib
/
85 $(eval
$(call BuildPackage
,libpci
))
86 $(eval
$(call BuildPackage
,pciutils
))