2008-05-22 23:58:30 +02:00
|
|
|
# Description: Network UPS Tools. Monitor of UPS hardware.
|
|
|
|
# URL: http://www.networkupstools.org/
|
2023-08-14 16:00:30 -04:00
|
|
|
# Maintainer: UNMAINTAINED
|
2023-01-23 21:03:44 -05:00
|
|
|
# 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 22:53:20 +10: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 22:53:20 +10: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 22:53:20 +10:00
|
|
|
|
2023-08-13 09:46:10 +02:00
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
2010-06-30 22:53:20 +10: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 22:53:20 +10: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
|
|
|
}
|