updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / nutups / PKGBUILD
blob6b5430d195e570f29fee2b48a73e0e47856e0c46
1 # Maintainer: Cliff Hood <archlinux@hoodgroup.us>
3 pkgname=nutups
4 pkgver=2.4.3
5 pkgrel=2
6 pkgdesc="Network UPS Tools for power mangement and controlling of more than just APC's UPS models on Unix and Linux machines."
7 arch=(i686 x86_64)
8 url="http://www.networkupstools.org"
9 license=('GPL')
10 depends=('gcc-libs' 'gd' 'gconf')
11 conflicts=('apcupsd')
12 makedepends=('pkgconfig')
13 install="nut.install"
14 source=(http://networkupstools.org/source/2.4/nut-$pkgver.tar.gz
15         nut)
16 md5sums=('6f893b61b07915e7a139324fa3f79121' 
17          'ec33471deb4330b8b89c7e9a502ec933')
19 build() {
20   cd $startdir/src/nut-$pkgver
21   ./configure --prefix=/usr \
22         --with-serial --with-usb \
23         --with-drivers=apcsmart,usbhid-ups,belkinunv,genericups \
24         --with-drvpath=/usr/lib/nut \
25         --with-user=nut --with-group=ups \
26         --sysconfdir=/etc/nut \
27         --libdir=/usr/lib/nut \
28         --datadir=/etc/nut/data \
29         --with-udev-dir=/etc/udev \
30         --with-cgi --with-lib \
31         --with-cgipath=/srv/http/cgi-bin \
32         --with-htmlpath=/srv/http/nut \
33         --with-pidpath=/var/run/nut \
34         --with-statepath=/var/run/nut
36   make || return 1
37   make DESTDIR=$startdir/pkg install || return 1
39   install -D -m755 $startdir/nut $startdir/pkg/etc/rc.d/nut && \
40   chmod 755 $startdir/pkg/usr/bin/* && \
41   mkdir -p $pkgdir/srv/http/cgi-bin/$pkgname && \
42   mv $pkgdir/srv/http/cgi-bin/*.cgi $pkgdir/srv/http/cgi-bin/$pkgname