blob: ee4e18589a082036d03b0b6341b272a9a066d793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apcupsd
pkgver=3.14.10
pkgrel=2
pkgdesc="A Daemon to control APC UPSes"
subpackages="$pkgname-doc"
url="http://www.apcupsd.org"
arch="all"
license="GPL-2"
depends="util-linux"
makedepends="net-snmp-dev man"
source="http://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
}
build() {
cd "$_builddir"
patch -p1 < ../apcupsd-alpine.patch || return 1
export CHARSET="ISO8859-1"
export LANG="C"
ac_cv_path_SHUTDOWN="/sbin/poweroff" \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--enable-usb \
--enable-snmp \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR=$pkgdir install
install -D -m755 "$srcdir"/apcupsd.initd "$pkgdir"/etc/init.d/apcupsd
}
md5sums="5928822d855c5cf7ac29655e3e0b8c23 apcupsd-3.14.10.tar.gz
0798cd407de6f199d4c267036ec54c5b apcupsd.initd
08d9cc703cdd4275d342882deed1d719 apcupsd-alpine.patch"
|