aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-09 19:42:39 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-10 03:03:10 +0000
commita980377c8dcedb17a6fa003b77c7183dcece823e (patch)
tree17121aff45140a139129292762623278f6ca4e08
parent7422bcab0f9f1d205191f4a61fa810dc08cd4ea1 (diff)
downloadaports-a980377c8dcedb17a6fa003b77c7183dcece823e.tar.bz2
aports-a980377c8dcedb17a6fa003b77c7183dcece823e.tar.xz
main/lm_sensors: modernise, fix license, mark no tests
-rw-r--r--main/lm_sensors/APKBUILD26
1 files changed, 11 insertions, 15 deletions
diff --git a/main/lm_sensors/APKBUILD b/main/lm_sensors/APKBUILD
index df146bd33b..6aab5adef8 100644
--- a/main/lm_sensors/APKBUILD
+++ b/main/lm_sensors/APKBUILD
@@ -5,7 +5,8 @@ pkgrel=4
pkgdesc="Collection of user space tools for general SMBus access and hardware monitoring."
url="http://www.lm-sensors.org/"
arch="all"
-license="GPL"
+options="!check" # No test suite.
+license="LGPL-2.1+, GPL-2.0+" # libs are LGPL, binaries are GPL
depends="bash sysfsutils"
makedepends="perl rrdtool-dev bison flex"
subpackages="$pkgname-dev $pkgname-doc $pkgname-detect $pkgname-sensord"
@@ -21,10 +22,8 @@ source="http://pkgs.fedoraproject.org/repo/pkgs/lm_sensors/lm_sensors-3.4.0.tar.
sensord.initd
"
-_builddir="$srcdir"/$pkgname-$pkgver
-
prepare() {
- cd "$_builddir"
+ cd "$builddir"
sed -i -e 's:^# \(PROG_EXTRA\):\1:' Makefile
# Respect LDFLAGS
sed -i -e 's/\$(LIBDIR)$/\$(LIBDIR) \$(LDFLAGS)/g' Makefile
@@ -32,26 +31,23 @@ prepare() {
lib/Module.mk
# do not check for libiconv in ldconfig cache
- sed -i -e 's/^LIBICONV.*/LIBICONV ?=/' prog/sensors/Module.mk || return 1
+ sed -i -e 's/^LIBICONV.*/LIBICONV ?=/' prog/sensors/Module.mk
- for i in ../*.patch; do
- msg "Applying $i"
- patch -p1 < $i || return 1
- done
+ default_prepare
}
build() {
- cd "$_builddir"
+ cd "$builddir"
export CFLAGS="$CFLAGS -fno-stack-protector"
- make PREFIX=/usr user || return 1
+ make PREFIX=/usr user
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make PROG_EXTRA:=sensord user_install \
PREFIX=/usr \
MANDIR=/usr/share/man \
- DESTDIR="$pkgdir" || return 1
+ DESTDIR="$pkgdir"
cd "$srcdir"
install -Dm755 fancontrol.initd "$pkgdir"/etc/init.d/fancontrol
@@ -68,9 +64,9 @@ detect() {
sensord() {
pkgdesc="sensord daemon"
- cd $_builddir
+ cd "$builddir"
mkdir -p "$subpkgdir"/usr/sbin
- mv "$pkgdir"/usr/sbin/sensord "$subpkgdir"/usr/sbin/sensord || return 1
+ mv "$pkgdir"/usr/sbin/sensord "$subpkgdir"/usr/sbin/sensord
install -Dm755 "$srcdir"/sensord.initd "$subpkgdir"/etc/init.d/sensord
install -Dm755 "$srcdir"/sensord.confd "$subpkgdir"/etc/conf.d/sensord
}