summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/lm_sensors
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/lm_sensors')
-rw-r--r--sys-apps/lm_sensors/Manifest3
-rw-r--r--sys-apps/lm_sensors/files/fancontrol-init.d-223
-rw-r--r--sys-apps/lm_sensors/files/fancontrol.service9
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3-init.d105
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3.3.1-sensors-detect-gentoo.patch129
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3.3.4-sensors-detect-gentoo.patch118
-rw-r--r--sys-apps/lm_sensors/files/lm_sensors-3.3.5-sensors-detect-gentoo.patch120
-rw-r--r--sys-apps/lm_sensors/files/sensord-4-init.d22
-rw-r--r--sys-apps/lm_sensors/files/sensord-conf.d3
-rw-r--r--sys-apps/lm_sensors/files/sensord.service9
-rw-r--r--sys-apps/lm_sensors/lm_sensors-3.3.4-r1.ebuild109
-rw-r--r--sys-apps/lm_sensors/lm_sensors-3.3.5.ebuild109
-rw-r--r--sys-apps/lm_sensors/lm_sensors-3.4.0.ebuild109
-rw-r--r--sys-apps/lm_sensors/metadata.xml13
14 files changed, 881 insertions, 0 deletions
diff --git a/sys-apps/lm_sensors/Manifest b/sys-apps/lm_sensors/Manifest
new file mode 100644
index 000000000000..f39831112d79
--- /dev/null
+++ b/sys-apps/lm_sensors/Manifest
@@ -0,0 +1,3 @@
+DIST lm_sensors-3.3.4.tar.bz2 172226 SHA256 b4608610cb5de4b24e3fe1ae357712e8633a8a929bbb42df5eecc4ccee6ba76d SHA512 a375f747a1687da0fe743d731893156f7983e001725c2d7cd284cefd3e8922deb3dfe542d3c901e3da8fff321633d64180a637d780b5e1bb3f1e9a254c16b7e6 WHIRLPOOL 4011264a56c36ffcfe28d357ceae1929fdf8a21c27bfaba928c9a7b48ef2b8422cd6650981a4c8f220900cc45526ca4bbfda9810b54db0efaf15cdaad4599838
+DIST lm_sensors-3.3.5.tar.bz2 173609 SHA256 5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf SHA512 0874084c3dd40b93ed05e1955f76e35e78ac3ac2343341d8ab5412fd941ea300b3a4b1320bec3a5bfb07309e82f42cc5dac0a728cdfddac4053d4fdb96dc12e7 WHIRLPOOL f82d0d1a4b7647cf9076f16861024dd65fd97bd34a7498fcc06e851913f5b71805689d915b67a628b6cd7aea2b46225d64df8833550c785236311c9980ac8ed1
+DIST lm_sensors-3.4.0.tar.bz2 175802 SHA256 e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f SHA512 993064bd14b855c1ae8c057e89313df5b3d5efe441fb2e8c3e508f42bb15658564df2563fac8fabbdb0d650dfdbc694037736c748d45cb9d85dfb8fb5a3d1ea9 WHIRLPOOL 82ed9b922a352702d974ea075222894c69a081da1fca9e026e3176266bb6a8911fd8fc0cd73f2d9ab3524cd30cfe2e688a015032829cf32d844592debaf9924d
diff --git a/sys-apps/lm_sensors/files/fancontrol-init.d-2 b/sys-apps/lm_sensors/files/fancontrol-init.d-2
new file mode 100644
index 000000000000..0474d12b3208
--- /dev/null
+++ b/sys-apps/lm_sensors/files/fancontrol-init.d-2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFIG=/etc/fancontrol
+
+depend() {
+ need localmount
+ use lm_sensors
+}
+
+command=/usr/sbin/fancontrol
+command_arguments="${CONFIG}"
+start_stop_daemon_args="--background"
+pidfile=/var/run/fancontrol.pid
+
+start_pre() {
+ if [ ! -f ${CONFIG} ]; then
+ eerror "Configuration file ${CONFIG} not found"
+ return 1
+ fi
+}
diff --git a/sys-apps/lm_sensors/files/fancontrol.service b/sys-apps/lm_sensors/files/fancontrol.service
new file mode 100644
index 000000000000..c86b498f830c
--- /dev/null
+++ b/sys-apps/lm_sensors/files/fancontrol.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Fan control daemon
+
+[Service]
+PIDFile=/var/run/fancontrol.pid
+ExecStart=/usr/sbin/fancontrol
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3-init.d b/sys-apps/lm_sensors/files/lm_sensors-3-init.d
new file mode 100644
index 000000000000..b33814f62665
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors-3-init.d
@@ -0,0 +1,105 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+checkconfig() {
+ if [ ! -f /etc/conf.d/lm_sensors ]; then
+ eerror "/etc/conf.d/lm_sensors does not exist, try running sensors-detect"
+ return 1
+ fi
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ if [ -z "${MODULE_0}" ]; then
+ eerror "MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
+ return 1
+ fi
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ einfo "Loading lm_sensors modules..."
+
+ mount | grep sysfs >/dev/null 2>&1
+ if [ ${?} = 0 ]; then
+ if ! ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ); then
+ ebegin " Loading i2c-core"
+ modprobe i2c-core >/dev/null 2>&1
+ if [ ${?} != 0 ]; then
+ eerror " Could not load i2c-core!"
+ eend 1
+ fi
+ ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ) || return 1
+ eend 0
+ fi
+ elif ! [ -e /proc/sys/dev/sensors ]; then
+ ebegin " Loading i2c-proc"
+ modprobe i2c-proc >/dev/null 2>&1
+ if [ ${?} != 0 ]; then
+ eerror " Could not load i2c-proc!"
+ eend 1
+ fi
+ [ -e /proc/sys/dev/sensors ] || return 1
+ eend 0
+ fi
+
+ i=0
+ while true; do
+ module=`eval echo '$'MODULE_${i}`
+ module_args=`eval echo '$'MODULE_${i}_ARGS`
+ if [ -z "${module}" ]; then
+ break
+ fi
+ ebegin " Loading ${module}"
+ modprobe ${module} ${module_args} >/dev/null 2>&1
+ eend $?
+ i=$(($i+1))
+ done
+ fi
+
+ if [ "${INITSENSORS}" = "yes" ]; then
+ if ! [ -f /etc/sensors3.conf ]; then
+ eerror "/etc/sensors3.conf does not exist!"
+ return 1
+ fi
+
+ ebegin "Initializing sensors"
+ /usr/bin/sensors -s >/dev/null 2>&1
+ eend ${?}
+ fi
+}
+
+stop() {
+ checkconfig || return 1
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ einfo "Unloading lm_sensors modules..."
+
+ # find the highest possible MODULE_ number
+ i=0
+ while true; do
+ module=`eval echo '$'MODULE_${i}`
+ if [ -z "${module}" ] ; then
+ break
+ fi
+ i=$(($i+1))
+ done
+
+ while [ ${i} -gt 0 ]; do
+ i=$(($i-1))
+ module=`eval echo '$'MODULE_${i}`
+ ebegin " Unloading ${module}"
+ rmmod ${module} >/dev/null 2>&1
+ eend $?
+ done
+
+ if [ -e /proc/sys/dev/sensors ] ; then
+ ebegin " Unloading i2c-proc"
+ rmmod i2c-proc >/dev/null 2>&1
+ eend $?
+ fi
+ fi
+}
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3.3.1-sensors-detect-gentoo.patch b/sys-apps/lm_sensors/files/lm_sensors-3.3.1-sensors-detect-gentoo.patch
new file mode 100644
index 000000000000..58772f215614
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors-3.3.1-sensors-detect-gentoo.patch
@@ -0,0 +1,129 @@
+--- lm_sensors-3.3.1/prog/detect/sensors-detect
++++ lm_sensors-3.3.1/prog/detect/sensors-detect
+@@ -20,6 +20,9 @@
+ # MA 02110-1301 USA.
+ #
+
++# Gentoo specific modifications based on a patch from Rudo Thomas
++# <thomr9am@ss1000.ms.mff.cuni.cz>
++
+ require 5.004;
+
+ use strict;
+@@ -6471,26 +6474,33 @@
+ print MODPROBE_D $configfile;
+ close(MODPROBE_D);
+ } else {
++ print "\nIf you want to load the modules at startup, generate a config file\n",
++ "below and make sure lm_sensors gets started at boot time; e.g\n",
++ "\$ rc-update add lm_sensors default\n";
+ print "To make the sensors modules behave correctly, add these lines to\n".
+- "/etc/modprobe.conf:\n\n";
++ "/etc/modules.d/lm_sensors and run modules-update:\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 ($!)";
++ my $have_config = -f '/etc/conf.d/lm_sensors';
++ print "\nDo you want to ".($have_config?"overwrite":"generate").
++ " /etc/conf.d/lm_sensors? Enter s to specify other file name?\n",
++ " (".($have_config?"yes/NO":"YES/no")."/s): ";
++ my $reply = <STDIN>;
++
++ if (($have_config and $reply =~ /^\s*[Yy]/) or
++ (not $have_config and not $reply =~ /^\s*[Nn]/) or
++ $reply =~ /^\s*[Ss]/) {
++ my $filename = "/etc/conf.d/lm_sensors";
++ if ($reply =~ /^\s*[Ss]/) {
++ print "Specify the file to store the configuration to: ";
++ $filename = <STDIN>;
+ }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++ open(local *SYSCONFIG, ">".$filename)
++ or die "Sorry, can't create $filename ($!).";
+ 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
+@@ -6501,6 +6511,11 @@
+ # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
+
+ EOT
++ print SYSCONFIG
++ "# Load modules at startup\n".
++ "LOADMODULES=yes\n\n".
++ "# Initialize sensors at startup\n".
++ "INITSENSORS=yes\n\n";
+ print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
+ if @{$bus_modules};
+ print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
+@@ -6509,6 +6524,10 @@
+
+ # For compatibility reasons, modules are also listed individually as variables
+ # MODULE_0, MODULE_1, MODULE_2, etc.
++# Please note that the numbers in MODULE_X must start at 0 and increase in
++# steps of 1. Any number that is missing will make the init script skip the
++# rest of the modules. Use MODULE_X_ARGS for arguments.
++#
+ # You should use BUS_MODULES and HWMON_MODULES instead if possible.
+
+ EOT
+@@ -6519,25 +6538,7 @@
+ }
+ close(SYSCONFIG);
+
+- if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
+- ! -f "/lib/systemd/system/lm_sensors.service") {
+- print "Copy prog/init/lm_sensors.service to /lib/systemd/system\n".
+- "and run 'systemctl enable lm_sensors.service'\n".
+- "for initialization at boot time.\n";
+- return;
+- }
+-
+- if (-x "/bin/systemctl" &&
+- -f "/lib/systemd/system/lm_sensors.service") {
+- system("/bin/systemctl", "enable", "lm_sensors.service");
+- system("/bin/systemctl", "start", "lm_sensors.service");
+- # All done, don't check for /etc/init.d/lm_sensors
+- return;
+- }
+-
+- 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";
++ print "Done.\n";
+
+ if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+ system("/sbin/insserv", "/etc/init.d/lm_sensors");
+@@ -6551,20 +6552,6 @@
+ "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";
+- if (@{$bus_modules}) {
+- print "# Adapter drivers\n";
+- print "modprobe $_\n" foreach (@{$bus_modules});
+- }
+- 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 "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".
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3.3.4-sensors-detect-gentoo.patch b/sys-apps/lm_sensors/files/lm_sensors-3.3.4-sensors-detect-gentoo.patch
new file mode 100644
index 000000000000..215969af2cb6
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors-3.3.4-sensors-detect-gentoo.patch
@@ -0,0 +1,118 @@
+diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
+index fb17481..bb324c2 100755
+--- a/prog/detect/sensors-detect
++++ b/prog/detect/sensors-detect
+@@ -20,6 +20,9 @@
+ # MA 02110-1301 USA.
+ #
+
++# Gentoo specific modifications based on a patch from Rudo Thomas
++# <thomr9am@ss1000.ms.mff.cuni.cz>
++
+ require 5.004;
+
+ use strict;
+@@ -6671,26 +6674,33 @@ sub write_config
+ print MODPROBE_D $configfile;
+ close(MODPROBE_D);
+ } else {
++ print "\nIf you want to load the modules at startup, generate a config file\n",
++ "below and make sure lm_sensors gets started at boot time; e.g\n",
++ "\$ rc-update add lm_sensors default\n";
+ print "To make the sensors modules behave correctly, add these lines to\n".
+- "/etc/modprobe.conf:\n\n";
++ "/etc/modules.d/lm_sensors and run modules-update:\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 ($!)";
++ my $have_config = -f '/etc/conf.d/lm_sensors';
++ print "\nDo you want to ".($have_config?"overwrite":"generate").
++ " /etc/conf.d/lm_sensors? Enter s to specify other file name?\n",
++ " (".($have_config?"yes/NO":"YES/no")."/s): ";
++ my $reply = <STDIN>;
++
++ if (($have_config and $reply =~ /^\s*[Yy]/) or
++ (not $have_config and not $reply =~ /^\s*[Nn]/) or
++ $reply =~ /^\s*[Ss]/) {
++ my $filename = "/etc/conf.d/lm_sensors";
++ if ($reply =~ /^\s*[Ss]/) {
++ print "Specify the file to store the configuration to: ";
++ $filename = <STDIN>;
+ }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++ open(local *SYSCONFIG, ">".$filename)
++ or die "Sorry, can't create $filename ($!).";
+ 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
+@@ -6701,30 +6711,17 @@ sub write_config
+ # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
+
+ EOT
++ print SYSCONFIG
++ "# Load modules at startup\n".
++ "LOADMODULES=yes\n\n".
++ "# Initialize sensors at startup\n".
++ "INITSENSORS=yes\n\n";
+ print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
+ if @{$bus_modules};
+ print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
+ close(SYSCONFIG);
+
+- if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
+- ! -f "/lib/systemd/system/lm_sensors.service") {
+- print "Copy prog/init/lm_sensors.service to /lib/systemd/system\n".
+- "and run 'systemctl enable lm_sensors.service'\n".
+- "for initialization at boot time.\n";
+- return;
+- }
+-
+- if (-x "/bin/systemctl" &&
+- -f "/lib/systemd/system/lm_sensors.service") {
+- system("/bin/systemctl", "enable", "lm_sensors.service");
+- system("/bin/systemctl", "start", "lm_sensors.service");
+- # All done, don't check for /etc/init.d/lm_sensors
+- return;
+- }
+-
+- 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";
++ print "Done.\n";
+
+ if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+ system("/sbin/insserv", "/etc/init.d/lm_sensors");
+@@ -6738,20 +6735,6 @@ EOT
+ "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";
+- if (@{$bus_modules}) {
+- print "# Adapter drivers\n";
+- print "modprobe $_\n" foreach (@{$bus_modules});
+- }
+- 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 "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".
diff --git a/sys-apps/lm_sensors/files/lm_sensors-3.3.5-sensors-detect-gentoo.patch b/sys-apps/lm_sensors/files/lm_sensors-3.3.5-sensors-detect-gentoo.patch
new file mode 100644
index 000000000000..0ea9a02b3f9a
--- /dev/null
+++ b/sys-apps/lm_sensors/files/lm_sensors-3.3.5-sensors-detect-gentoo.patch
@@ -0,0 +1,120 @@
+--- lm_sensors-3.3.5/prog/detect/sensors-detect
++++ lm_sensors-3.3.5/prog/detect/sensors-detect
+@@ -20,6 +20,9 @@
+ # MA 02110-1301 USA.
+ #
+
++# Gentoo specific modifications based on a patch from Rudo Thomas
++# <thomr9am@ss1000.ms.mff.cuni.cz>
++
+ require 5.004;
+
+ use strict;
+@@ -6762,26 +6765,33 @@
+ print MODPROBE_D $configfile;
+ close(MODPROBE_D);
+ } else {
++ print "\nIf you want to load the modules at startup, generate a config file\n",
++ "below and make sure lm_sensors gets started at boot time; e.g\n",
++ "\$ rc-update add lm_sensors default\n";
+ print "To make the sensors modules behave correctly, add these lines to\n".
+- "/etc/modprobe.conf:\n\n";
++ "/etc/modules.d/lm_sensors and run modules-update:\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');
+- $_ = read_answer();
+- 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 ($!)";
++ my $have_sysconfig = -f '/etc/conf.d/lm_sensors';
++ printf "Do you want to ".($have_sysconfig?"overwrite":"generate").
++ " /etc/conf.d/lm_sensors? Enter s to specify other file name?\n",
++ " (".($have_sysconfig?"yes/NO":"YES/no")."/s): ";
++ my $reply = read_answer();
++
++ if (($have_sysconfig and $reply =~ /^\s*[Yy]/) or
++ (not $have_sysconfig and not $reply =~ /^\s*[Nn]/) or
++ $reply =~ /^\s*[Ss]/) {
++ my $filename = "/etc/conf.d/lm_sensors";
++ if ($reply =~ /^\s*[Ss]/) {
++ print "Specify the file to store the configuration to: ";
++ $filename = read_answer();
+ }
+- open(local *SYSCONFIG, ">/etc/sysconfig/lm_sensors")
+- or die "Sorry, can't create /etc/sysconfig/lm_sensors ($!)";
++ open(local *SYSCONFIG, ">".$filename)
++ or die "Sorry, can't create $filename ($!).";
+ 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
+@@ -6792,30 +6802,17 @@
+ # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
+
+ EOT
++ print SYSCONFIG
++ "# Load modules at startup\n".
++ "LOADMODULES=yes\n\n".
++ "# Initialize sensors at startup\n".
++ "INITSENSORS=yes\n\n";
+ print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
+ if @{$bus_modules};
+ print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
+ close(SYSCONFIG);
+
+- if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
+- ! -f "/lib/systemd/system/lm_sensors.service") {
+- print "Copy prog/init/lm_sensors.service to /lib/systemd/system\n".
+- "and run 'systemctl enable lm_sensors.service'\n".
+- "for initialization at boot time.\n";
+- return;
+- }
+-
+- if (-x "/bin/systemctl" &&
+- -f "/lib/systemd/system/lm_sensors.service") {
+- system("/bin/systemctl", "enable", "lm_sensors.service");
+- system("/bin/systemctl", "start", "lm_sensors.service");
+- # All done, don't check for /etc/init.d/lm_sensors
+- return;
+- }
+-
+- 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";
++ print "Done.\n";
+
+ if (-x "/sbin/insserv" && -f "/etc/init.d/lm_sensors") {
+ system("/sbin/insserv", "/etc/init.d/lm_sensors");
+@@ -6828,24 +6825,6 @@
+ 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";
+- if (@{$bus_modules}) {
+- print "# Adapter drivers\n";
+- print "modprobe $_\n" foreach (@{$bus_modules});
+- }
+- 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 "You really should try these commands right now to make sure everything\n".
+- "is working properly. Monitoring programs won't work until the needed\n".
+- "modules are loaded.\n\n";
+ }
+ }
+
diff --git a/sys-apps/lm_sensors/files/sensord-4-init.d b/sys-apps/lm_sensors/files/sensord-4-init.d
new file mode 100644
index 000000000000..3734dfede1d9
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord-4-init.d
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFIG=/etc/sensors3.conf
+
+depend() {
+ need localmount
+ use logger lm_sensors
+}
+
+pidfile=/run/sensord.pid
+command=/usr/sbin/sensord
+command_args="--config-file ${CONFIG} ${SENSORD_OPTIONS} --pid-file ${pidfile}"
+
+start_pre() {
+ if [ ! -f ${CONFIG} ]; then
+ eerror "Configuration file ${CONFIG} not found"
+ return 1
+ fi
+}
diff --git a/sys-apps/lm_sensors/files/sensord-conf.d b/sys-apps/lm_sensors/files/sensord-conf.d
new file mode 100644
index 000000000000..d82841aebd4a
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord-conf.d
@@ -0,0 +1,3 @@
+# Extra options to pass to the sensord daemon,
+# see sensord(8) for more information
+SENSORD_OPTIONS=""
diff --git a/sys-apps/lm_sensors/files/sensord.service b/sys-apps/lm_sensors/files/sensord.service
new file mode 100644
index 000000000000..6d272f1efd15
--- /dev/null
+++ b/sys-apps/lm_sensors/files/sensord.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Sensor information logging daemon
+
+[Service]
+PIDFile=/var/run/sensord.pid
+ExecStart=/usr/sbin/sensord
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/lm_sensors/lm_sensors-3.3.4-r1.ebuild b/sys-apps/lm_sensors/lm_sensors-3.3.4-r1.ebuild
new file mode 100644
index 000000000000..52ffdff31243
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.3.4-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib systemd toolchain-funcs
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="http://www.lm-sensors.org/"
+SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~mips ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="sensord static-libs"
+
+RDEPEND="
+ dev-lang/perl
+ sensord? (
+ net-analyzer/rrdtool
+ virtual/logger
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sensors-detect-gentoo.patch
+
+ use sensord && { sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || die; }
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || die
+
+ # Fix shipped unit file paths
+ sed -i -e 's:\(^EnvironmentFile=\).*:\1/etc/conf.d/lm_sensors:' \
+ prog/init/lm_sensors.service || die
+
+ use static-libs || { sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || die; }
+}
+
+src_compile() {
+ einfo
+ einfo "You may safely ignore any errors from compilation"
+ einfo "that contain \"No such file or directory\" references."
+ einfo
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ MANDIR="${EPREFIX}/usr/share/man" \
+ ETCDIR="${EPREFIX}/etc" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ newinitd "${FILESDIR}"/${PN}-3-init.d ${PN}
+ systemd_dounit prog/init/lm_sensors.service
+
+ newinitd "${FILESDIR}"/fancontrol-init.d-2 fancontrol
+ systemd_dounit "${FILESDIR}"/fancontrol.service
+
+ if use sensord; then
+ newconfd "${FILESDIR}"/sensord-conf.d sensord
+ newinitd "${FILESDIR}"/sensord-4-init.d sensord
+ systemd_dounit "${FILESDIR}"/sensord.service
+ fi
+
+ dodoc CHANGES CONTRIBUTORS INSTALL README \
+ doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid}
+
+ docinto developers
+ dodoc doc/developers/applications
+}
+
+pkg_postinst() {
+ echo
+ elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+ elog "/etc/conf.d/${PN}."
+ echo
+ elog "/etc/conf.d/${PN} is vital to the init-script."
+ elog "Please make sure you also add ${PN} to the desired"
+ elog "runlevel. Otherwise your I2C modules won't get loaded"
+ elog "on the next startup."
+ echo
+ elog "You will also need to run the above command if you're upgrading from"
+ elog "<=${PN}-2, as the needed entries in /etc/conf.d/${PN} has"
+ elog "changed."
+ echo
+ elog "Be warned, the probing of hardware in your system performed by"
+ elog "sensors-detect could freeze your system. Also make sure you read"
+ elog "the documentation before running ${PN} on IBM ThinkPads."
+ echo
+ elog "Also make sure you have read:"
+ elog "http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31"
+ echo
+ elog "Please refer to the ${PN} documentation for more information."
+ elog "(http://www.lm-sensors.org/wiki/Documentation)"
+ echo
+}
diff --git a/sys-apps/lm_sensors/lm_sensors-3.3.5.ebuild b/sys-apps/lm_sensors/lm_sensors-3.3.5.ebuild
new file mode 100644
index 000000000000..8c69ed406394
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.3.5.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib systemd toolchain-funcs
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="http://www.lm-sensors.org/"
+SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha ~amd64 arm ~mips ~ppc ~ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="sensord static-libs"
+
+RDEPEND="
+ dev-lang/perl
+ sensord? (
+ net-analyzer/rrdtool
+ virtual/logger
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sensors-detect-gentoo.patch
+
+ use sensord && { sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || die; }
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || die
+
+ # Fix shipped unit file paths
+ sed -i -e 's:\(^EnvironmentFile=\).*:\1/etc/conf.d/lm_sensors:' \
+ prog/init/lm_sensors.service || die
+
+ use static-libs || { sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || die; }
+}
+
+src_compile() {
+ einfo
+ einfo "You may safely ignore any errors from compilation"
+ einfo "that contain \"No such file or directory\" references."
+ einfo
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ MANDIR="${EPREFIX}/usr/share/man" \
+ ETCDIR="${EPREFIX}/etc" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ newinitd "${FILESDIR}"/${PN}-3-init.d ${PN}
+ systemd_dounit prog/init/lm_sensors.service
+
+ newinitd "${FILESDIR}"/fancontrol-init.d-2 fancontrol
+ systemd_dounit "${FILESDIR}"/fancontrol.service
+
+ if use sensord; then
+ newconfd "${FILESDIR}"/sensord-conf.d sensord
+ newinitd "${FILESDIR}"/sensord-4-init.d sensord
+ systemd_dounit "${FILESDIR}"/sensord.service
+ fi
+
+ dodoc CHANGES CONTRIBUTORS INSTALL README \
+ doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid}
+
+ docinto developers
+ dodoc doc/developers/applications
+}
+
+pkg_postinst() {
+ echo
+ elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+ elog "/etc/conf.d/${PN}."
+ echo
+ elog "/etc/conf.d/${PN} is vital to the init-script."
+ elog "Please make sure you also add ${PN} to the desired"
+ elog "runlevel. Otherwise your I2C modules won't get loaded"
+ elog "on the next startup."
+ echo
+ elog "You will also need to run the above command if you're upgrading from"
+ elog "<=${PN}-2, as the needed entries in /etc/conf.d/${PN} has"
+ elog "changed."
+ echo
+ elog "Be warned, the probing of hardware in your system performed by"
+ elog "sensors-detect could freeze your system. Also make sure you read"
+ elog "the documentation before running ${PN} on IBM ThinkPads."
+ echo
+ elog "Also make sure you have read:"
+ elog "http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31"
+ echo
+ elog "Please refer to the ${PN} documentation for more information."
+ elog "(http://www.lm-sensors.org/wiki/Documentation)"
+ echo
+}
diff --git a/sys-apps/lm_sensors/lm_sensors-3.4.0.ebuild b/sys-apps/lm_sensors/lm_sensors-3.4.0.ebuild
new file mode 100644
index 000000000000..0752370fe836
--- /dev/null
+++ b/sys-apps/lm_sensors/lm_sensors-3.4.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib systemd toolchain-funcs
+
+DESCRIPTION="Hardware Monitoring user-space utilities"
+HOMEPAGE="http://www.lm-sensors.org/"
+SRC_URI="http://dl.lm-sensors.org/lm-sensors/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="sensord static-libs"
+
+RDEPEND="
+ dev-lang/perl
+ sensord? (
+ net-analyzer/rrdtool
+ virtual/logger
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+CONFIG_CHECK="~HWMON ~I2C_CHARDEV ~I2C"
+WARNING_HWMON="${PN} requires CONFIG_HWMON to be enabled for use."
+WARNING_I2C_CHARDEV="sensors-detect requires CONFIG_I2C_CHARDEV to be enabled."
+WARNING_I2C="${PN} requires CONFIG_I2C to be enabled for most sensors."
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.3.5-sensors-detect-gentoo.patch
+
+ use sensord && { sed -i -e 's:^#\(PROG_EXTRA.*\):\1:' Makefile || die; }
+
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile || die
+
+ # Fix shipped unit file paths
+ sed -i -e 's:\(^EnvironmentFile=\).*:\1/etc/conf.d/lm_sensors:' \
+ prog/init/lm_sensors.service || die
+
+ use static-libs || { sed -i -e '/^BUILD_STATIC_LIB/d' Makefile || die; }
+}
+
+src_compile() {
+ einfo
+ einfo "You may safely ignore any errors from compilation"
+ einfo "that contain \"No such file or directory\" references."
+ einfo
+
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ MANDIR="${EPREFIX}/usr/share/man" \
+ ETCDIR="${EPREFIX}/etc" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ newinitd "${FILESDIR}"/${PN}-3-init.d ${PN}
+ systemd_dounit prog/init/lm_sensors.service
+
+ newinitd "${FILESDIR}"/fancontrol-init.d-2 fancontrol
+ systemd_dounit "${FILESDIR}"/fancontrol.service
+
+ if use sensord; then
+ newconfd "${FILESDIR}"/sensord-conf.d sensord
+ newinitd "${FILESDIR}"/sensord-4-init.d sensord
+ systemd_dounit "${FILESDIR}"/sensord.service
+ fi
+
+ dodoc CHANGES CONTRIBUTORS INSTALL README \
+ doc/{donations,fancontrol.txt,fan-divisors,libsensors-API.txt,progs,temperature-sensors,vid}
+
+ docinto developers
+ dodoc doc/developers/applications
+}
+
+pkg_postinst() {
+ echo
+ elog "Please run \`/usr/sbin/sensors-detect' in order to setup"
+ elog "/etc/conf.d/${PN}."
+ echo
+ elog "/etc/conf.d/${PN} is vital to the init-script."
+ elog "Please make sure you also add ${PN} to the desired"
+ elog "runlevel. Otherwise your I2C modules won't get loaded"
+ elog "on the next startup."
+ echo
+ elog "You will also need to run the above command if you're upgrading from"
+ elog "<=${PN}-2, as the needed entries in /etc/conf.d/${PN} has"
+ elog "changed."
+ echo
+ elog "Be warned, the probing of hardware in your system performed by"
+ elog "sensors-detect could freeze your system. Also make sure you read"
+ elog "the documentation before running ${PN} on IBM ThinkPads."
+ echo
+ elog "Also make sure you have read:"
+ elog "http://www.lm-sensors.org/wiki/FAQ/Chapter3#Mysensorshavestoppedworkinginkernel2.6.31"
+ echo
+ elog "Please refer to the ${PN} documentation for more information."
+ elog "(http://www.lm-sensors.org/wiki/Documentation)"
+ echo
+}
diff --git a/sys-apps/lm_sensors/metadata.xml b/sys-apps/lm_sensors/metadata.xml
new file mode 100644
index 000000000000..4e32df6e6234
--- /dev/null
+++ b/sys-apps/lm_sensors/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="sensord">Enable sensord - a daemon that can be used to
+ periodically log sensor readings from hardware health-monitoring
+ chips</flag>
+ </use>
+</pkgmetadata>