2013-09-29 18:18:53 +02:00
|
|
|
# Template file for 'network-ups-tools'
|
|
|
|
pkgname=network-ups-tools
|
2014-05-01 13:12:57 +02:00
|
|
|
version=2.7.2
|
2014-08-11 11:46:18 +02:00
|
|
|
revision=4
|
2013-09-29 18:18:53 +02:00
|
|
|
build_style=gnu-configure
|
2013-10-01 04:08:26 +02:00
|
|
|
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
|
2014-08-03 12:41:10 +02:00
|
|
|
--without-libltdl --without-ipmi --without-freeipmi"
|
2013-10-01 04:08:26 +02:00
|
|
|
hostmakedepends="pkg-config"
|
2014-08-03 12:41:10 +02:00
|
|
|
makedepends="avahi-libs-devel libressl-devel libusb-compat-devel neon-devel"
|
2014-01-01 16:10:11 +01:00
|
|
|
system_accounts="nut"
|
|
|
|
conf_files="
|
2014-08-11 11:46:18 +02:00
|
|
|
/etc/nut/ups.conf
|
|
|
|
/etc/nut/upsmon.conf
|
|
|
|
/etc/nut/upsd.conf
|
|
|
|
/etc/nut/upssched.conf
|
|
|
|
/etc/nut/nut.conf
|
|
|
|
/etc/nut/upsd.users"
|
2013-09-29 18:18:53 +02:00
|
|
|
short_desc="NUT provides UPS control and monitoring features"
|
|
|
|
maintainer="Ypnose <linuxienATlegtuxDOTorg>"
|
|
|
|
license="GPL-2"
|
|
|
|
homepage="http://www.networkupstools.org/"
|
2014-05-01 13:12:57 +02:00
|
|
|
distfiles="http://www.networkupstools.org/source/2.7/nut-$version.tar.gz"
|
|
|
|
checksum=4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d
|
2013-09-29 18:18:53 +02:00
|
|
|
wrksrc="nut-${version}"
|
|
|
|
|
2014-08-03 12:41:10 +02:00
|
|
|
# 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
|
|
|
|
|
2013-10-01 04:08:26 +02:00
|
|
|
post_install() {
|
|
|
|
# remove unused stuff
|
2014-05-01 13:12:57 +02:00
|
|
|
rm -rf ${DESTDIR}/usr/{html,cgi-bin}
|
2013-10-01 04:08:26 +02:00
|
|
|
# Prepare configuration files
|
|
|
|
for f in ups upsd upsmon upssched nut; do
|
2014-08-11 11:46:18 +02:00
|
|
|
mv ${DESTDIR}/etc/nut/${f}.conf{.sample,}
|
2013-10-01 04:08:26 +02:00
|
|
|
done
|
2014-08-11 11:46:18 +02:00
|
|
|
mv ${DESTDIR}/etc/nut/upsd.users{.sample,}
|
2013-10-01 04:08:26 +02:00
|
|
|
}
|
2014-05-01 13:12:57 +02:00
|
|
|
|
|
|
|
libnetwork-ups-tools_package() {
|
|
|
|
short_desc+=" - runtime library"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/*.so.*"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
network-ups-tools-devel_package() {
|
|
|
|
short_desc+=" - development files"
|
|
|
|
depends="lib${sourcepkg}>=${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/*.so"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|