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.

82 lines
2.0 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.6.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_HASH:=fcc0431cc951c3563f1e4f946d27c8e2161cfd81f25316e6bd783fa6118469e0
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_USE_MIPS16:=0
  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 +zlib
  26. endef
  27. define Package/pciutils/description
  28. contains collection of programs for inspecting and manipulating configuration
  29. of PCI devices
  30. endef
  31. PCI_IDS_REV:=4ad9327b147ce7bb6ae27b68efe0c1d89d9eb9a1
  32. PCI_IDS_FILE:=pci.ids.$(PCI_IDS_REV)
  33. define Download/pci_ids
  34. FILE:=$(PCI_IDS_FILE)
  35. URL_FILE:=pci.ids
  36. URL:=@GITHUB/pciutils/pciids/$(PCI_IDS_REV)
  37. HASH:=f8386c74ecc74f3c410b2f0f4885e7705c5dfcacd52fe924a931a63b246c8793
  38. endef
  39. $(eval $(call Download,pci_ids))
  40. define Build/Prepare
  41. $(call Build/Prepare/Default)
  42. $(RM) $(PKG_BUILD_DIR)/pci.ids
  43. $(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids
  44. endef
  45. MAKE_FLAGS += \
  46. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  47. PREFIX="/usr" \
  48. HOST="Linux" \
  49. HWDB="no" \
  50. ZLIB="yes"
  51. ifneq ($(CONFIG_USE_GLIBC),)
  52. TARGET_LDFLAGS += -lresolv
  53. endif
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
  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. $(INSTALL_DIR) $(1)/usr/share
  65. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
  66. endef
  67. $(eval $(call BuildPackage,pciutils))