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.

73 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2007-2016 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.5.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_HASH:=3a99141a9f40528d0a0035665a06dc37ddb1ae341658e51b50a76ecf86235efc
  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. define Package/pciutils/postinst
  32. #!/bin/sh
  33. [ -z "$${IPKG_INSTROOT}" ] || \
  34. (cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old)
  35. exit 0
  36. endef
  37. MAKE_FLAGS += \
  38. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  39. PREFIX="/usr" \
  40. HOST="Linux" \
  41. HWDB="no" \
  42. ZLIB="yes"
  43. ifneq ($(CONFIG_USE_GLIBC),)
  44. TARGET_LDFLAGS += -lresolv
  45. endif
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
  49. $(INSTALL_DIR) $(1)/usr/include/pci
  50. $(CP) $(foreach i,pci.h config.h header.h types.h, \
  51. $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
  52. endef
  53. define Package/pciutils/install
  54. $(INSTALL_DIR) $(1)/usr/sbin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
  56. $(INSTALL_DIR) $(1)/usr/share
  57. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
  58. endef
  59. $(eval $(call BuildPackage,pciutils))