Commit 85fe2aec authored by Luca Giambonini's avatar Luca Giambonini

lm_sensors rebuild [staging]

parent 34d42646
Pipeline #4243 passed with stages
in 2 minutes and 23 seconds
......@@ -12,46 +12,33 @@ makedepends=('rrdtool')
optdepends=('rrdtool: for logging with sensord')
backup=('etc/sensors3.conf' 'etc/conf.d/healthd' 'etc/conf.d/sensord')
options=('emptydirs')
#source=("http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${pkgver}.tar.bz2"
# "fancontrol.diff::http://www.lm-sensors.org/changeset/6216?format=diff&new=6216"
# "sensor.diff::http://www.lm-sensors.org/changeset/6237?format=diff&new=6237"
# Backup source from Fedora
source=(https://github.com/lm-sensors/lm-sensors/archive/V${_pkgver}.tar.gz
'healthd'
'healthd.conf'
'sensord.conf'
'fancontrol.service' 'sensord.service' 'healthd.service')
'fancontrol.service' 'healthd.service')
sha1sums=('3d1b3b82d62daeec1f151eaf993c61dc3cf21a6b'
'f3e4fb36a619fb446139abc3f7a1d5409504c632'
'6c4e8a2d89dd2fd3ca2f0f4f3b1230111e01b0fc'
'de8d4d65406815c389f8a04e2a8508a1ae6749c8'
'7a4a4d1442aeeba0ba8aefb742a3ef187b593f4c'
'eff43b4882d25dae7dd0b33eb2e33b0836a5cc51'
'a7a20eb3c799d70287e6c7968a7ab42165925293')
prepare() {
cd "${srcdir}/lm-sensors-${_pkgver}"
sed -i 's|/etc/sysconfig|/etc/conf.d|' prog/{detect/sensors-detect,init/lm_sensors.service}
sed -i 's@\(/bin/systemctl\|/lib/systemd/system\)@/usr\1@g' prog/detect/sensors-detect
msg "if the configuration file is not present don't show any errors (file generated with sensors-detect), Arch bug #30887"
sed -i 's|/etc/sysconfig|/etc/conf.d|' prog/{detect/sensors-detect,init/{sensord,lm_sensors}.service}
sed -i 's/EnvironmentFile=/EnvironmentFile=-/' prog/init/lm_sensors.service
}
build() {
cd "${srcdir}/lm-sensors-${_pkgver}"
make PROG_EXTRA=sensord \
BUILD_STATIC_LIB=0 \
PREFIX=/usr MANDIR=/usr/share/man
make PREFIX=/usr
}
package() {
cd "${srcdir}/lm-sensors-${_pkgver}"
make PROG_EXTRA=sensord \
BUILD_STATIC_LIB=0 \
PREFIX=/usr \
MANDIR=/usr/share/man \
DESTDIR="${pkgdir}" install
make PROG_EXTRA=sensord BUILD_STATIC_LIB=0 \
PREFIX=/usr SBINDIR=/usr/bin MANDIR=/usr/share/man DESTDIR="${pkgdir}" install
# Install healthd configuration and systemd services
install -Dm755 "${srcdir}/healthd" "${pkgdir}/usr/sbin/healthd"
......
--- prog/pwm/fancontrol 2012-11-07 03:26:37.000000000 +0200
+++ prog/pwm/fancontrol 2013-03-22 18:15:00.566696011 +0200
@@ -297,7 +297,7 @@
cd $DIR
# Check for configuration change
-if [ "$DIR" != "/" ] && [ -z "$DEVPATH" -o -z "$DEVNAME" ]
+if [[ "$DIR" != "/" && ( -z "$DEVPATH" || -z "$DEVNAME" ) ]]
then
echo "Configuration is too old, please run pwmconfig again" >&2
exit 1
@@ -337,7 +337,7 @@
# It didn't work, try pwmN_enable=1 pwmN=255
echo 1 > $ENABLE 2> /dev/null
echo $MAX > $1
- if [ `cat $ENABLE` -eq 1 -a `cat $1` -ge 190 ]
+ if [ `cat $ENABLE` -eq 1 ] && [ `cat $1` -ge 190 ]
then
# Success
return 0
@@ -469,7 +469,7 @@
else
# calculate the new value from temperature and settings
pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
- if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ]
+ if [ $pwmpval -eq 0 ] || [ $min_fanval -eq 0 ]
then # if fan was stopped start it using a safe value
echo $minsa > $pwmo
# Sleep while still handling signals
[Unit]
Description=Sensor information logging daemon
[Service]
PIDFile=/var/run/sensord.pid
ExecStart=/usr/sbin/sensord
[Install]
WantedBy=multi-user.target
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment