From e6ae61452bd022273ef4f452e12e6a43e29d2786 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 12 Jan 2010 17:21:14 +0100 Subject: [PATCH] Added lm-sensors-3.1.1 build template. --HG-- extra : convert_revision : ee015a70d22dcff33f4bb5a1a124a8a8507d71d7 --- srcpkgs/libsensors | 1 + srcpkgs/libsensors-devel | 1 + srcpkgs/lm-sensors/depends | 2 + srcpkgs/lm-sensors/libsensors-devel.template | 19 +++ srcpkgs/lm-sensors/libsensors.template | 14 ++ .../sensors_detect_disable_sysconfig.diff | 121 ++++++++++++++++++ srcpkgs/lm-sensors/template | 22 ++++ 7 files changed, 180 insertions(+) create mode 120000 srcpkgs/libsensors create mode 120000 srcpkgs/libsensors-devel create mode 100644 srcpkgs/lm-sensors/depends create mode 100644 srcpkgs/lm-sensors/libsensors-devel.template create mode 100644 srcpkgs/lm-sensors/libsensors.template create mode 100644 srcpkgs/lm-sensors/patches/sensors_detect_disable_sysconfig.diff create mode 100644 srcpkgs/lm-sensors/template diff --git a/srcpkgs/libsensors b/srcpkgs/libsensors new file mode 120000 index 0000000000..c5a7c463a2 --- /dev/null +++ b/srcpkgs/libsensors @@ -0,0 +1 @@ +lm-sensors \ No newline at end of file diff --git a/srcpkgs/libsensors-devel b/srcpkgs/libsensors-devel new file mode 120000 index 0000000000..c5a7c463a2 --- /dev/null +++ b/srcpkgs/libsensors-devel @@ -0,0 +1 @@ +lm-sensors \ No newline at end of file diff --git a/srcpkgs/lm-sensors/depends b/srcpkgs/lm-sensors/depends new file mode 100644 index 0000000000..cf0780b65c --- /dev/null +++ b/srcpkgs/lm-sensors/depends @@ -0,0 +1,2 @@ +abi_depends=">=3.1.1" +api_depends="${abi_depends}" diff --git a/srcpkgs/lm-sensors/libsensors-devel.template b/srcpkgs/lm-sensors/libsensors-devel.template new file mode 100644 index 0000000000..b6087f02eb --- /dev/null +++ b/srcpkgs/lm-sensors/libsensors-devel.template @@ -0,0 +1,19 @@ +# Template file for 'libsensors-devel'. +# +short_desc="lm-sensors development kit" +long_desc="${long_desc} + + This package contains the static library and header files used in + development." + +Add_dependency run glibc-devel +Add_dependency run libsensors + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/*.*a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share/man/man3 ${DESTDIR}/usr/share/man +} diff --git a/srcpkgs/lm-sensors/libsensors.template b/srcpkgs/lm-sensors/libsensors.template new file mode 100644 index 0000000000..88808b78b6 --- /dev/null +++ b/srcpkgs/lm-sensors/libsensors.template @@ -0,0 +1,14 @@ +# Template file for 'libsensors'. +# +short_desc="Library to read temperature/voltage/fan sensors" +long_desc="${long_desc} + + This package contains a shared library for querying lm-sensors." + +Add_dependency run glibc + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/*.so.* ${DESTDIR}/usr/lib +} diff --git a/srcpkgs/lm-sensors/patches/sensors_detect_disable_sysconfig.diff b/srcpkgs/lm-sensors/patches/sensors_detect_disable_sysconfig.diff new file mode 100644 index 0000000000..9010b888ed --- /dev/null +++ b/srcpkgs/lm-sensors/patches/sensors_detect_disable_sysconfig.diff @@ -0,0 +1,121 @@ +--- prog/detect/sensors-detect.orig 2010-01-12 17:07:22.231802699 +0100 ++++ prog/detect/sensors-detect 2010-01-12 17:12:34.880680773 +0100 +@@ -5421,9 +5421,8 @@ sub write_config + { + my ($configfile, $bus_modules, $hwmon_modules) = @_; + +- if (defined $configfile) { + my $have_modprobe_d = -d '/etc/modprobe.d'; +- printf "Do you want to \%s /etc/modprobe.d/lm_sensors? (\%s): ", ++ printf "Do you want to \%s /etc/modprobe.d/lm_sensors.conf? (\%s): ", + (-e '/etc/modprobe.d/lm_sensors' ? 'overwrite' : 'generate'), + ($have_modprobe_d ? 'YES/no' : 'yes/NO'); + $_ = ; +@@ -5432,97 +5431,25 @@ sub write_config + mkdir('/etc/modprobe.d', 0777) + or die "Sorry, can't create /etc/modprobe.d ($!)"; + } +- open(local *MODPROBE_D, ">/etc/modprobe.d/lm_sensors") +- or die "Sorry, can't create /etc/modprobe.d/lm_sensors ($!)"; ++ open(local *MODPROBE_D, ">/etc/modprobe.d/lm_sensors.conf") ++ or die "Sorry, can't create /etc/modprobe.d/lm_sensors.conf ($!)"; + print MODPROBE_D "# Generated by sensors-detect on " . scalar localtime() . "\n"; +- print MODPROBE_D $configfile; +- close(MODPROBE_D); +- } else { +- print "To make the sensors modules behave correctly, add these lines to\n". +- "/etc/modprobe.conf:\n\n"; +- print "#----cut here----\n". +- $configfile. +- "#----cut here----\n\n"; +- } +- } +- +- my $have_sysconfig = -d '/etc/sysconfig'; +- printf "Do you want to \%s /etc/sysconfig/lm_sensors? (\%s): ", +- (-e '/etc/sysconfig/lm_sensors' ? 'overwrite' : 'generate'), +- ($have_sysconfig ? 'YES/no' : 'yes/NO'); +- $_ = ; +- if (($have_sysconfig and not m/^\s*n/i) or m/^\s*y/i) { +- unless ($have_sysconfig) { +- mkdir('/etc/sysconfig', 0777) +- or die "Sorry, can't create /etc/sysconfig ($!)"; +- } +- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors") +- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)"; +- print SYSCONFIG "# Generated by sensors-detect on " . scalar localtime() . "\n"; +- print SYSCONFIG <<'EOT'; +-# This file is sourced by /etc/init.d/lm_sensors and defines the modules to +-# be loaded/unloaded. +-# +-# The format of this file is a shell script that simply defines variables: +-# HWMON_MODULES for hardware monitoring driver modules, and optionally +-# BUS_MODULES for any required bus driver module (for example for I2C or SPI). +- +-EOT +- print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n" +- if @{$bus_modules}; +- print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n"; +- +- print SYSCONFIG <<'EOT'; +- +-# For compatibility reasons, modules are also listed individually as variables +-# MODULE_0, MODULE_1, MODULE_2, etc. +-# You should use BUS_MODULES and HWMON_MODULES instead if possible. +- +-EOT +- my $i = 0; +- foreach (@{$bus_modules}, @{$hwmon_modules}) { +- print SYSCONFIG "MODULE_$i=$_\n"; +- $i++; +- } +- close(SYSCONFIG); +- +- print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n". +- "for initialization at boot time.\n" +- unless -f "/etc/init.d/lm_sensors"; +- +- if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") { +- system("/sbin/insserv", "/etc/init.d/lm_sensors"); +- } elsif (-x "/sbin/chkconfig" && -f "/etc/init.d/lm_sensors") { +- system("/sbin/chkconfig", "lm_sensors", "on"); +- if (-x "/sbin/service") { +- system("/sbin/service", "lm_sensors", "start"); +- } +- } else { +- print "You should now start the lm_sensors service to load the required\n". +- "kernel modules.\n\n"; +- } +- } else { +- print "To load everything that is needed, add this to one of the system\n". +- "initialization scripts (e.g. /etc/rc.d/rc.local):\n\n"; +- print "#----cut here----\n"; ++ print MODPROBE_D; + if (@{$bus_modules}) { +- print "# Adapter drivers\n"; +- print "modprobe $_\n" foreach (@{$bus_modules}); ++ print MODPROBE_D "# Adapter drivers\n"; ++ print MODPROBE_D "modprobe $_\n" foreach (@{$bus_modules}); ++ } ++ print MODPROBE_D "# Chip drivers\n"; ++ print MODPROBE_D "modprobe $_\n" foreach (@{$hwmon_modules}); ++ close(MODPROBE_D); + } +- print "# Chip drivers\n"; +- print "modprobe $_\n" foreach (@{$hwmon_modules}); +- print((-e '/usr/bin/sensors' ? +- "/usr/bin/sensors -s\n" : +- "/usr/local/bin/sensors -s\n"). +- "#----cut here----\n\n"); + ++ print "\n"; + print "If you have some drivers built into your kernel, the list above will\n". + "contain too many modules. Skip the appropriate ones! You really\n". + "should try these commands right now to make sure everything is\n". + "working properly. Monitoring programs won't work until the needed\n". + "modules are loaded.\n\n"; +- } +- + } + + sub main diff --git a/srcpkgs/lm-sensors/template b/srcpkgs/lm-sensors/template new file mode 100644 index 0000000000..a74eb73999 --- /dev/null +++ b/srcpkgs/lm-sensors/template @@ -0,0 +1,22 @@ +# Template file for 'lm-sensors' +pkgname=lm-sensors +version=3.1.1 +wrksrc="lm_sensors-${version}" +distfiles="http://dl.lm-sensors.org/$pkgname/releases/lm_sensors-$version.tar.bz2" +build_style=gnu_makefile +make_build_target="all" +make_install_args="PREFIX=/usr MANDIR=/usr/share/man" +short_desc="Utilities to read temperature/voltage/fan sensors" +maintainer="Juan RP " +checksum=d95a3f2a6526f4da2ae145b7bbf45d16f0fb17bfe0d2017c7e02964199d059ef +long_desc=" + $pkgname provides most complete hardware health monitoring support for + Linux, in the form of kernel drivers and a user-space library" + +conf_files="/etc/sensors3.conf" +subpackages="libsensors libsensors-devel" + +Add_dependency run glibc +Add_dependency run libsensors +Add_dependency full perl +Add_dependency build flex