Added lm-sensors-3.1.1 build template.

--HG--
extra : convert_revision : ee015a70d22dcff33f4bb5a1a124a8a8507d71d7
This commit is contained in:
Juan RP 2010-01-12 17:21:14 +01:00
parent 3173effbe7
commit e6ae61452b
7 changed files with 180 additions and 0 deletions

1
srcpkgs/libsensors Symbolic link
View File

@ -0,0 +1 @@
lm-sensors

1
srcpkgs/libsensors-devel Symbolic link
View File

@ -0,0 +1 @@
lm-sensors

View File

@ -0,0 +1,2 @@
abi_depends=">=3.1.1"
api_depends="${abi_depends}"

View File

@ -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
}

View File

@ -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
}

View File

@ -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');
$_ = <STDIN>;
@@ -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');
- $_ = <STDIN>;
- 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

View File

@ -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 <xtraeme@gmail.com>"
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