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.

83 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.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_HASH:=db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3
  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_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/pciutils
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Linux PCI Utilities
  25. URL:=http://mj.ucw.cz/pciutils.shtml
  26. DEPENDS:=+libkmod +zlib
  27. endef
  28. define Package/pciutils/description
  29. contains collection of programs for inspecting and manipulating configuration
  30. of PCI devices
  31. endef
  32. PCI_IDS_VER:=0.319
  33. PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER)
  34. define Download/pci_ids
  35. FILE:=$(PCI_IDS_FILE)
  36. URL_FILE:=pci.ids
  37. URL:=@GITHUB/vcrhonek/hwdata/v$(PCI_IDS_VER)
  38. HASH:=54154a6955f550b110c6a216943dcd69ba6188e68b80bee6efbaa03ef0df0a5f
  39. endef
  40. $(eval $(call Download,pci_ids))
  41. define Build/Prepare
  42. $(call Build/Prepare/Default)
  43. $(RM) $(PKG_BUILD_DIR)/pci.ids
  44. $(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids
  45. endef
  46. MAKE_FLAGS += \
  47. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  48. PREFIX="/usr" \
  49. HOST="Linux" \
  50. HWDB="no" \
  51. ZLIB="yes"
  52. ifneq ($(CONFIG_USE_GLIBC),)
  53. TARGET_LDFLAGS += -lresolv
  54. endif
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
  58. $(INSTALL_DIR) $(1)/usr/include/pci
  59. $(CP) $(foreach i,pci.h config.h header.h types.h, \
  60. $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
  61. endef
  62. define Package/pciutils/install
  63. $(INSTALL_DIR) $(1)/usr/sbin
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
  65. $(INSTALL_DIR) $(1)/usr/share
  66. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
  67. endef
  68. $(eval $(call BuildPackage,pciutils))