Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #
  2. # Copyright (C) 2006-2015 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:=lm-sensors
  9. PKG_VERSION:=3.3.5
  10. PKG_RELEASE:=3
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/groeck/lm-sensors.git
  13. PKG_SOURCE_VERSION:=f8cdcc35bff0785aecf49d9a8484a71ce3ebee4f
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  16. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  17. PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/lm-sensors/Default
  21. DEPENDS:=+sysfsutils
  22. URL:=http://www.lm-sensors.org/
  23. endef
  24. define Package/lm-sensors
  25. $(call Package/lm-sensors/Default)
  26. SECTION:=utils
  27. CATEGORY:=Utilities
  28. TITLE:=lm-sensors
  29. DEPENDS+=+libsensors
  30. endef
  31. define Package/lm-sensors-detect
  32. $(call Package/lm-sensors/Default)
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. TITLE:=lm-sensors-detect
  36. DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader
  37. endef
  38. define Package/libsensors
  39. $(call Package/lm-sensors/Default)
  40. SECTION:=libs
  41. CATEGORY:=Libraries
  42. TITLE:=libsensors
  43. endef
  44. define Package/lm-sensors/description
  45. utility to read hardware sensor data
  46. endef
  47. define Package/lm-sensors-detect/description
  48. script to autodetect sensor hardware
  49. endef
  50. define Package/libsensors/description
  51. lm-sensors libraries
  52. endef
  53. define Package/lm-sensors/conffiles
  54. /etc/sensors.conf
  55. endef
  56. define Build/Compile
  57. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  58. $(TARGET_CONFIGURE_OPTS) \
  59. KERNELVERSION="$(LINUX_VERSION)" \
  60. LINUX="$(LINUX_DIR)" \
  61. CC="$(TARGET_CC)" \
  62. CFLAGS="$(TARGET_CFLAGS)" \
  63. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  64. STAGING_DIR="$(STAGING_DIR)" \
  65. PREFIX="/usr" \
  66. MACHINE="$(ARCH)" \
  67. EXLDFLAGS="" \
  68. user
  69. endef
  70. define Build/InstallDev
  71. $(INSTALL_DIR) $(1)/usr/include/sensors
  72. $(CP) \
  73. $(PKG_BUILD_DIR)/lib/sensors.h \
  74. $(1)/usr/include/sensors
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) \
  77. $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \
  78. $(1)/usr/lib
  79. endef
  80. define Package/lm-sensors/install
  81. $(INSTALL_DIR) $(1)/usr/sbin
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin
  83. ifeq ($(ARCH),i386)
  84. $(INSTALL_DIR) $(1)/etc
  85. $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf
  86. endif
  87. endef
  88. define Package/lm-sensors-detect/install
  89. $(INSTALL_DIR) $(1)/usr/sbin
  90. $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin
  91. endef
  92. define Package/libsensors/install
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib
  95. endef
  96. $(eval $(call BuildPackage,lm-sensors))
  97. $(eval $(call BuildPackage,lm-sensors-detect))
  98. $(eval $(call BuildPackage,libsensors))