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.

68 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2007-2014 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.2.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_MD5SUM:=425b1acad6854cc2bbb06ac8e48e76fc
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/pciutils
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. TITLE:=Linux PCI Utilities
  21. URL:=http://mj.ucw.cz/pciutils.shtml
  22. DEPENDS:=+zlib
  23. endef
  24. define Package/pciutils/description
  25. contains collection of programs for inspecting and manipulating configuration
  26. of PCI devices
  27. endef
  28. define Package/pciutils/postinst
  29. #!/bin/sh
  30. [ -z "$${IPKG_INSTROOT}" ] || \
  31. (cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old)
  32. exit 0
  33. endef
  34. MAKE_FLAGS += \
  35. CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
  36. PREFIX="/usr" \
  37. HOST="$(GNU_TARGET_NAME)" \
  38. ZLIB="yes" \
  39. ifneq ($(CONFIG_USE_EGLIBC),)
  40. TARGET_LDFLAGS += -lresolv
  41. endif
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
  45. $(INSTALL_DIR) $(1)/usr/include/pci
  46. $(CP) $(foreach i,pci.h config.h header.h types.h, \
  47. $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
  48. endef
  49. define Package/pciutils/install
  50. $(INSTALL_DIR) $(1)/usr/sbin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
  52. $(INSTALL_DIR) $(1)/usr/share
  53. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
  54. endef
  55. $(eval $(call BuildPackage,pciutils))