network-ups-tools: add systemd option

This commit is contained in:
Ypnose 2014-08-03 12:41:10 +02:00
parent 06e6b685bd
commit dbc3797d2d
1 changed files with 13 additions and 4 deletions

View File

@ -1,16 +1,15 @@
# Template file for 'network-ups-tools'
pkgname=network-ups-tools
version=2.7.2
revision=2
revision=3
build_style=gnu-configure
configure_args="
--sbindir=/usr/bin --sysconfdir=/etc/ups --without-doc --disable-static
--datadir=/usr/share/ups --with-user=nut --with-group=nut --with-ssl
--with-usb --without-dev --with-serial -with-avahi --with-udev-dir=/usr/lib/udev
--with-systemdsystemunitdir=/lib/systemd/system --without-libltdl --without-ipmi
--without-freeipmi"
--without-libltdl --without-ipmi --without-freeipmi"
hostmakedepends="pkg-config"
makedepends="avahi-libs-devel libressl-devel libusb-compat-devel systemd-devel neon-devel"
makedepends="avahi-libs-devel libressl-devel libusb-compat-devel neon-devel"
system_accounts="nut"
conf_files="
/etc/ups/ups.conf
@ -27,6 +26,16 @@ distfiles="http://www.networkupstools.org/source/2.7/nut-$version.tar.gz"
checksum=4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d
wrksrc="nut-${version}"
# Package build options
build_options="systemd"
if [ "$build_option_systemd" ]; then
configure_args+=" --with-systemdsystemunitdir=/lib/systemd/system"
makedepends+=" systemd-devel"
else
configure_args+=" --without-systemdsystemunitdir"
fi
post_install() {
# remove unused stuff
rm -rf ${DESTDIR}/usr/{html,cgi-bin}