summaryrefslogtreecommitdiffstats
path: root/main/lm_sensors/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lm_sensors/APKBUILD')
-rw-r--r--main/lm_sensors/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/main/lm_sensors/APKBUILD b/main/lm_sensors/APKBUILD
new file mode 100644
index 00000000..0327dc77
--- /dev/null
+++ b/main/lm_sensors/APKBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lm_sensors
+pkgver=3.1.1
+pkgrel=0
+pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
+url="http://www.lm-sensors.org/"
+license="GPL"
+depends="sysfsutils rrdtool"
+makedepends="perl rrdtool-dev bison flex"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-detect"
+#install=sensors.install
+source="http://dl.lm-sensors.org/lm-sensors/releases/$pkgname-$pkgver.tar.bz2
+ lm_sensors-3.1.0-sensors-detect-alpine.patch
+ fancontrol.initd
+ lm_sensors.initd
+ sensord.confd
+ sensord.initd
+ "
+
+build ()
+{
+ cd "$srcdir"/$pkgname-$pkgver
+
+ sed -i -e 's:^# \(PROG_EXTRA\):\1:' Makefile
+ # Respect LDFLAGS
+ sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile
+ sed -i -e 's/\$(LIBSHSONAME) -o/$(LIBSHSONAME) \$(LDFLAGS) -o/g' \
+ lib/Module.mk
+
+ export CFLAGS="$CFLAGS -fno-stack-protector"
+
+ for i in ../*.patch; do
+ msg "Applying $i"
+ patch -p1 < $i || return 1
+ done
+ make PREFIX=/usr user || return 1
+ make user_install \
+ PREFIX=/usr \
+ MANDIR=/usr/share/man \
+ DESTDIR="$pkgdir" || return 1
+
+ cd "$srcdir"
+ install -Dm755 fancontrol.initd "$pkgdir"/etc/init.d/fancontrol
+ install -Dm755 lm_sensors.initd "$pkgdir"/etc/init.d/lm_sensors
+ install -Dm755 sensord.initd "$pkgdir"/etc/init.d/sensord
+ install -Dm755 sensord.confd "$pkgdir"/etc/conf.d/sensord
+}
+
+detect() {
+ depends="perl"
+ pkgdesc="Detection/migration scripts for lm_sensors"
+ mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/sbin
+ cd "$pkgdir"
+ mv usr/bin/sensors-conf-convert "$subpkgdir"/usr/bin/
+ mv usr/sbin/sensors-detect "$subpkgdir"/usr/bin/
+}
+
+md5sums="613d7cfa23b70c0abae3fabb0a72ff5f lm_sensors-3.1.1.tar.bz2
+b6e7de1a1768f7a6ea2e00c226331877 lm_sensors-3.1.0-sensors-detect-alpine.patch
+58f4c9193a903711ace7fa0754693bd2 fancontrol.initd
+2c7e97203da2c39bc9fbfc2a4849cfd4 lm_sensors.initd
+82e075236a61334abb3adf46280380d3 sensord.confd
+6f3a880988e7cdbcb20870e3c6d1e554 sensord.initd"