PKGBUILDs/community/network-ups-tools/PKGBUILD
2009-10-09 21:15:33 -05:00

43 lines
1.5 KiB
Bash

# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Roman Kyrylych <roman@archlinux.org>
# Contributor: Giuseppe Lucarelli <luk@rebelsoft.org>
pkgname=network-ups-tools
pkgver=2.4.1
pkgrel=1
pkgdesc="NUT is a collection of programs for monitoring and administering UPS hardware"
arch=('i686' 'x86_64')
url="http://www.networkupstools.org/"
license=('GPL2')
depends=('openssl' 'hal')
makedepends=('libusb')
backup=(etc/ups/{ups.conf,upsd.conf,upsd.users,upsmon.conf,upssched.conf})
install=nut.install
source=(http://www.networkupstools.org/source/2.4/nut-$pkgver.tar.gz upsd.init)
options=('!emptydirs' '!libtool')
build() {
cd $srcdir/nut-$pkgver
./configure --with-user=nut \
--prefix=/usr \
--datadir=/usr/share/ups \
--sysconfdir=/etc/ups \
--with-group=nut \
--with-hal \
--with-usb \
--with-udev-dir=/etc/udev || return 1
make || return 1
make DESTDIR=$pkgdir install
#ugly hack because --with-pkgconfig-dir doesn't work
install -D -m644 lib/libupsclient.pc $pkgdir/usr/lib/pkgconfig
install -D -m644 conf/ups.conf.sample $pkgdir/etc/ups/ups.conf
install -D -m640 conf/upsd.conf.sample $pkgdir/etc/ups/upsd.conf
install -D -m640 conf/upsd.users.sample $pkgdir/etc/ups/upsd.users
install -D -m640 conf/upsmon.conf.sample $pkgdir/etc/ups/upsmon.conf
install -D -m644 conf/upssched.conf.sample $pkgdir/etc/ups/upssched.conf
install -D -m755 ../../upsd.init $pkgdir/etc/rc.d/upsd
}
md5sums=('609ebaf2123fc7171d25a6c742dd7d66'
'a68351e1b33fe9e97609a1071f7c3d4b')