1
0

Makefile 2.2 KB

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