contrib/nut/Pkgfile

36 lines
887 B
Plaintext
Raw Normal View History

2008-05-22 23:58:30 +02:00
# Description: Network UPS Tools. Monitor of UPS hardware.
# URL: http://www.networkupstools.org/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: libusb openssl
# Optional: avahi neon nss
2008-05-22 23:58:30 +02:00
name=nut
2022-06-01 07:33:39 +02:00
version=2.8.0
2008-05-22 23:58:30 +02:00
release=1
2010-06-30 14:53:20 +02:00
source=(http://www.networkupstools.org/source/${version%.*}/$name-$version.tar.gz
2023-08-13 09:46:10 +02:00
upsd)
2008-05-22 23:58:30 +02:00
build() {
2023-08-13 09:46:10 +02:00
cd $name-$version
2010-06-30 14:53:20 +02:00
2023-08-13 09:46:10 +02:00
./configure \
--prefix=/usr \
--with-user=nut \
--with-group=nut \
--with-pidpath=/run \
--sysconfdir=/etc/$name \
--datadir=/usr/share/$name \
--localstatedir=/var/$name
2010-06-30 14:53:20 +02:00
2023-08-13 09:46:10 +02:00
make
make DESTDIR=$PKG install
2010-06-30 14:53:20 +02:00
2023-08-13 09:46:10 +02:00
#if you dont want config templates uncomment the next line
#rm $PKG/etc/nut/*
2010-06-30 14:53:20 +02:00
2023-08-13 09:46:10 +02:00
find $PKG/etc/nut -type f -print0 | xargs -0 chown root:nut
install -d $PKG/etc/udev/rules.d
install -d -m 0770 -o root -g nut $PKG/var/state/ups
install -D -m 0754 $SRC/upsd $PKG/etc/rc.d/upsd
2008-05-22 23:58:30 +02:00
}