You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.2 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pciutils
  9. PKG_VERSION:=3.7.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_HASH:=9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb
  14. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/pciutils
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Linux PCI Utilities
  24. URL:=http://mj.ucw.cz/pciutils.shtml
  25. DEPENDS:=+libkmod +libpci +pciids
  26. endef
  27. define Package/pciutils/description
  28. contains collection of programs for inspecting and manipulating configuration
  29. of PCI devices
  30. endef
  31. define Package/libpci
  32. SECTION:=libs
  33. CATEGORY:=Libraries
  34. TITLE:=Linux PCI Libraries
  35. URL:=http://mj.ucw.cz/pciutils.shtml
  36. endef
  37. TARGET_CFLAGS += $(FPIC)
  38. MAKE_FLAGS += \
  39. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  40. PREFIX="/usr" \
  41. HOST="Linux" \
  42. HWDB="no" \
  43. ZLIB="no" \
  44. SHARED="yes"
  45. ifneq ($(CONFIG_USE_GLIBC),)
  46. TARGET_LDFLAGS += -lresolv
  47. endif
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \
  51. $(PKG_INSTALL_DIR)/usr/lib/libpci.so
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  53. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  54. $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig
  55. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpci.pc
  56. $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpci.pc
  57. $(INSTALL_DIR) $(1)/usr/include/pci
  58. $(CP) $(foreach i,pci.h config.h header.h types.h, \
  59. $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
  60. endef
  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. endef
  65. define Package/libpci/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  68. endef
  69. $(eval $(call BuildPackage,libpci))
  70. $(eval $(call BuildPackage,pciutils))