APKBUILD 931 Bytes
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Leonardo Arena's avatar
Leonardo Arena committed
2
pkgname=apcupsd
3
pkgver=3.14.8
4
pkgrel=2
Leonardo Arena's avatar
Leonardo Arena committed
5 6 7
pkgdesc="A Daemon to control APC UPSes"
subpackages="$pkgname-doc"
url="http://www.apcupsd.org"
8
license="GPL-2"
Natanael Copa's avatar
Natanael Copa committed
9
depends="util-linux-ng"
Natanael Copa's avatar
Natanael Copa committed
10
makedepends="net-snmp-dev man"
11 12
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	apcupsd.initd
13
	apcupsd-alpine.patch
14
	"
Leonardo Arena's avatar
Leonardo Arena committed
15 16 17

build() {
	cd "$srcdir/$pkgname-$pkgver"
18
	patch -p1 < ../apcupsd-alpine.patch || return 1
Leonardo Arena's avatar
Leonardo Arena committed
19

20
	ac_cv_path_SHUTDOWN="/sbin/poweroff" \
Leonardo Arena's avatar
Leonardo Arena committed
21
	./configure --prefix=/usr \
22
		--mandir=/usr/share/man \
23 24
		--enable-usb \
		--enable-snmp
Leonardo Arena's avatar
Leonardo Arena committed
25
	make || return 1
26 27 28 29
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
Leonardo Arena's avatar
Leonardo Arena committed
30
	make DESTDIR=$pkgdir install
31
	install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd
Leonardo Arena's avatar
Leonardo Arena committed
32 33
}

34
md5sums="cd17f0a903dc2220e55ed54e242359d2  apcupsd-3.14.8.tar.gz
35 36
0798cd407de6f199d4c267036ec54c5b  apcupsd.initd
08d9cc703cdd4275d342882deed1d719  apcupsd-alpine.patch"