aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2019-04-17 13:13:05 +0200
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-04-26 06:51:47 +0000
commitde0c11db7326ef89ead739928ed6d1e6c71b2d64 (patch)
treeb0db6dcc08873c1172917e5166bad956efad42de
parentded5549521d0af04b69a88070b457cf090c7b563 (diff)
downloadaports-de0c11db7326ef89ead739928ed6d1e6c71b2d64.tar.gz
aports-de0c11db7326ef89ead739928ed6d1e6c71b2d64.tar.bz2
aports-de0c11db7326ef89ead739928ed6d1e6c71b2d64.tar.xz
main/apcupsd: enable enable-modbus-usb
Closes: #10273 While at it modernize.
-rw-r--r--main/apcupsd/APKBUILD22
1 files changed, 12 insertions, 10 deletions
diff --git a/main/apcupsd/APKBUILD b/main/apcupsd/APKBUILD
index d80f277015..e12e41f6d5 100644
--- a/main/apcupsd/APKBUILD
+++ b/main/apcupsd/APKBUILD
@@ -1,28 +1,30 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apcupsd
pkgver=3.14.14
-pkgrel=0
+pkgrel=1
pkgdesc="A Daemon to control APC UPSes"
-subpackages="$pkgname-doc $pkgname-webif"
+subpackages="$pkgname-doc $pkgname-webif $pkgname-openrc"
url="http://www.apcupsd.org"
arch="all"
-license="GPL-2.0"
+license="GPL-2.0-only"
depends="util-linux"
-makedepends="net-snmp-dev man linux-headers gd-dev"
+makedepends="net-snmp-dev man linux-headers gd-dev libusb-compat-dev"
+options="!check" # no test suite included
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
apcupsd.initd
apcupsd-alpine.patch
"
_builddir="$srcdir/$pkgname-$pkgver"
+
prepare() {
cd "$_builddir"
- update_config_sub || return 1
+ update_config_sub
+ default_prepare
}
build() {
cd "$_builddir"
- patch -p1 < ../apcupsd-alpine.patch || return 1
export CHARSET="ISO8859-1"
export LANG="C"
@@ -33,16 +35,16 @@ build() {
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
+ --enable-modbus-usb \
--enable-usb \
--enable-snmp \
- --enable-cgi \
- || return 1
- make || return 1
+ --enable-cgi
+ make
}
package() {
cd "$_builddir"
- make DESTDIR=$pkgdir install || return 1
+ make DESTDIR=$pkgdir install
install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd
}