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.

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