aboutsummaryrefslogtreecommitdiffstats
path: root/main/apcupsd/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/apcupsd/APKBUILD')
-rw-r--r--main/apcupsd/APKBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/apcupsd/APKBUILD b/main/apcupsd/APKBUILD
new file mode 100644
index 0000000000..596c34abb4
--- /dev/null
+++ b/main/apcupsd/APKBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=apcupsd
+pkgver=3.14.8
+pkgrel=3
+pkgdesc="A Daemon to control APC UPSes"
+subpackages="$pkgname-doc"
+url="http://www.apcupsd.org"
+arch="all"
+license="GPL-2"
+depends="util-linux-ng"
+makedepends="net-snmp-dev man"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ apcupsd.initd
+ apcupsd-alpine.patch
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < ../apcupsd-alpine.patch || return 1
+
+ ac_cv_path_SHUTDOWN="/sbin/poweroff" \
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-usb \
+ --enable-snmp
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR=$pkgdir install
+ install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd
+}
+
+md5sums="cd17f0a903dc2220e55ed54e242359d2 apcupsd-3.14.8.tar.gz
+0798cd407de6f199d4c267036ec54c5b apcupsd.initd
+08d9cc703cdd4275d342882deed1d719 apcupsd-alpine.patch"