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.

118 lines
2.8 KiB

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