summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lercher2018-02-17 01:31:16 +0100
committerThomas Lercher2018-02-17 01:31:16 +0100
commit86844ccd04756df6b58093de71fff3d8075144b5 (patch)
treefe95c5434b6ec3ce8552d5306e2f2e7e02ba5e83
downloadaur-86844ccd04756df6b58093de71fff3d8075144b5.tar.gz
Initial set up
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD51
-rw-r--r--lm_sensors-fancontrol.patch29
-rw-r--r--sensord.conf9
4 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..7927fa510f7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = lm_sensors-git
+ pkgdesc = Collection of user space tools for general SMBus access and hardware monitoring
+ pkgver = r5142.34627e46
+ pkgrel = 1
+ url = http://www.lm-sensors.org/
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ makedepends = git
+ makedepends = rrdtool
+ depends = perl
+ depends = sysfsutils
+ optdepends = rrdtool: for logging with sensord
+ provides = lm_sensors
+ conflicts = lm_sensors
+ backup = etc/sensors3.conf
+ backup = etc/conf.d/sensord
+ source = git+https://github.com/groeck/lm-sensors.git
+ source = sensord.conf
+ source = lm_sensors-fancontrol.patch
+ sha1sums = SKIP
+ sha1sums = f4b5f21fdb3b2a55aa353afa1603f953b207b73b
+ sha1sums = b0bc977348610d6a008d75a43f65800251c4c9f7
+
+pkgname = lm_sensors-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d50da7219e5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+pkgname=lm_sensors-git
+pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring"
+pkgver=r5142.34627e46
+pkgrel=1
+arch=('x86_64')
+url="http://www.lm-sensors.org/"
+license=('GPL' 'LGPL')
+conflicts=('lm_sensors')
+provides=('lm_sensors')
+depends=('perl' 'sysfsutils')
+makedepends=('git' 'rrdtool')
+optdepends=('rrdtool: for logging with sensord')
+backup=('etc/sensors3.conf' 'etc/conf.d/sensord')
+source=(git+https://github.com/groeck/lm-sensors.git
+ sensord.conf lm_sensors-fancontrol.patch)
+sha1sums=('SKIP'
+ 'f4b5f21fdb3b2a55aa353afa1603f953b207b73b'
+ 'b0bc977348610d6a008d75a43f65800251c4c9f7')
+
+_pkgname1=${pkgname%-git}
+
+pkgver() {
+ cd "${_pkgname1/_/-}"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$srcdir/${_pkgname1/_/-}"
+ 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
+ patch -p0 -i "${srcdir}/lm_sensors-fancontrol.patch"
+}
+
+build() {
+ cd "$srcdir/${_pkgname1/_/-}"
+ make PREFIX=/usr
+}
+
+package() {
+ cd "$srcdir/${_pkgname1/_/-}"
+ mkdir -p "${pkgdir}/usr/lib/systemd/system/" # TODO: find out why install doesn't do that...
+
+ make PROG_EXTRA=sensord BUILD_STATIC_LIB=0 \
+ PREFIX=/usr SBINDIR=/usr/bin MANDIR=/usr/share/man DESTDIR="${pkgdir}" install
+
+ install -D -m644 "${srcdir}/sensord.conf" "${pkgdir}/etc/conf.d/sensord"
+ install -D -m644 prog/init/*.service "${pkgdir}/usr/lib/systemd/system/"
+} \ No newline at end of file
diff --git a/lm_sensors-fancontrol.patch b/lm_sensors-fancontrol.patch
new file mode 100644
index 00000000000..c42d7b8702b
--- /dev/null
+++ b/lm_sensors-fancontrol.patch
@@ -0,0 +1,29 @@
+--- 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
diff --git a/sensord.conf b/sensord.conf
new file mode 100644
index 00000000000..133783aa82c
--- /dev/null
+++ b/sensord.conf
@@ -0,0 +1,9 @@
+#
+# /etc/conf.d/sensord
+#
+
+#Specify the interval between scanning for sensor alarms
+INTERVAL=60s
+
+#Specify the interval between logging all sensor readings
+LOG_INTERVAL=30m