pciutils: update to 3.12.0
[feed/packages.git] / utils / pciutils / Makefile
1 #
2 # Copyright (C) 2007-2017 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.12.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
16 PKG_HASH:=f185d116d5ff99b797497efce8f19f1ee8ccc5a668b97a159e3d13472f674154
17
18 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=COPYING
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/pciutils
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=Linux PCI Utilities
29 URL:=http://mj.ucw.cz/pciutils.shtml
30 DEPENDS:=+libkmod +libpci +pciids
31 endef
32
33 define Package/pciutils/description
34 contains collection of programs for inspecting and manipulating configuration
35 of PCI devices
36 endef
37
38 define Package/libpci
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE:=Linux PCI Libraries
42 URL:=http://mj.ucw.cz/pciutils.shtml
43 endef
44
45 TARGET_CFLAGS += $(FPIC)
46
47 MAKE_FLAGS += \
48 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
49 PREFIX="/usr" \
50 HOST="Linux" \
51 HWDB="no" \
52 ZLIB="no" \
53 SHARED="yes"
54
55 ifneq ($(CONFIG_USE_GLIBC),)
56 TARGET_LDFLAGS += -lresolv
57 endif
58
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
71 endef
72
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/
77 endef
78
79 define Package/libpci/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
82 endef
83
84
85 $(eval $(call BuildPackage,libpci))
86 $(eval $(call BuildPackage,pciutils))