- add lm-sensors package
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 1 Sep 2007 18:01:08 +0000 (18:01 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 1 Sep 2007 18:01:08 +0000 (18:01 -0000)
package/Config.in
package/lm-sensors/Config.in [new file with mode: 0644]
package/lm-sensors/lm-sensors.mk [new file with mode: 0644]

index b9614ec27354aa5fb3942967de15a8639959fb3f..783c47cfe2e7f7dd32716d51f8639f44c42bdcc0 100644 (file)
@@ -221,6 +221,7 @@ source "package/iostat/Config.in"
 source "package/libaio/Config.in"
 source "package/libraw1394/Config.in"
 source "package/libusb/Config.in"
+source "package/lm-sensors/Config.in"
 source "package/lvm2/Config.in"
 source "package/mdadm/Config.in"
 source "package/memtester/Config.in"
diff --git a/package/lm-sensors/Config.in b/package/lm-sensors/Config.in
new file mode 100644 (file)
index 0000000..68845c9
--- /dev/null
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LM_SENSORS
+       bool "lm-sensors"
+       select BR2_PACKAGE_LIBSYSFS
+       default n
+       help
+         Lm-sensors is a hardware health monitoring package for
+         Linux. It allows you to access information from
+         temperature, voltage, and fan speed sensors. It
+         works with most newer systems.
+
+         http://www.lm-sensors.org/
+
diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk
new file mode 100644 (file)
index 0000000..60b116a
--- /dev/null
@@ -0,0 +1,59 @@
+#############################################################
+#
+# lm-sensors
+#
+#############################################################
+LM_SENSORS_VERSION:=2.10.4
+LM_SENSORS_SOURCE:=lm-sensors_$(LM_SENSORS_VERSION).orig.tar.gz
+LM_SENSORS_PATCH:=lm-sensors_$(LM_SENSORS_VERSION)-1.diff.gz
+LM_SENSORS_SITE:=ftp://ftp.debian.org/debian/pool/main/l/lm-sensors/
+LM_SENSORS_DIR:=$(BUILD_DIR)/lm_sensors-$(LM_SENSORS_VERSION)
+LM_SENSORS_CAT:=$(ZCAT)
+LM_SENSORS_BINARY:=prog/sensors/sensors
+LM_SENSORS_TARGET_BINARY:=usr/bin/sensors
+
+$(DL_DIR)/$(LM_SENSORS_SOURCE):
+       $(WGET) -P $(DL_DIR) $(LM_SENSORS_SITE)/$(LM_SENSORS_SOURCE)
+
+$(DL_DIR)/$(LM_SENSORS_PATCH):
+       $(WGET) -P $(DL_DIR) $(LM_SENSORS_SITE)/$(LM_SENSORS_PATCH)
+
+lm-sensors-source: $(DL_DIR)/$(LM_SENSORS_SOURCE) $(DL_DIR)/$(LM_SENSORS_PATCH)
+
+$(LM_SENSORS_DIR)/.unpacked: $(DL_DIR)/$(LM_SENSORS_SOURCE) $(DL_DIR)/$(LM_SENSORS_PATCH)
+       $(LM_SENSORS_CAT) $(DL_DIR)/$(LM_SENSORS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(LM_SENSORS_DIR) package/lm-sensors/ lm-sensors\*.patch
+ifneq ($(LM_SENSORS_PATCH),)
+       (cd $(LM_SENSORS_DIR) && $(LM_SENSORS_CAT) $(DL_DIR)/$(LM_SENSORS_PATCH) | patch -p1)
+       if [ -d $(LM_SENSORS_DIR)/debian/patches ]; then \
+               toolchain/patch-kernel.sh $(LM_SENSORS_DIR) $(LM_SENSORS_DIR)/debian/patches \*.patch; \
+       fi
+endif
+       touch $@
+
+$(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY): $(LM_SENSORS_DIR)/.unpacked
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(LM_SENSORS_DIR) \
+               LINUX="$(LINUX_DIR)" KERNELVERSION=$(LINUX_HEADERS_VERSION) \
+               I2C_HEADERS=$(LINUX_DIR)/include \
+               DESTDIR=$(TARGET_DIR) user
+
+$(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY): $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY)
+       cp -dpf $(LM_SENSORS_DIR)/$(LM_SENSORS_BINARY) $@
+       $(STRIP) $(STRIP_STRIP_ALL) $@
+
+lm-sensors: uclibc libsysfs $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY)
+
+lm-sensors-clean:
+       -$(MAKE) -C $(LM_SENSORS_DIR) clean
+       rm -f $(TARGET_DIR)/$(LM_SENSORS_TARGET_BINARY)
+
+lm-sensors-dirclean:
+       rm -rf $(LM_SENSORS_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LM_SENSORS)),y)
+TARGETS+=lm-sensors
+endif