mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-06 09:11:38 +01:00
- rename all /etc/nut/*.conf.sample to /etc/nut/*.conf - make conf.d/* init.d/* more clean and openrc-run'ed - nut-upsmon now dynamically depends on nut-upsd if the MODE parameter in /etc/nut/nut.conf is set to 'standalone' or 'netserver'. - make a user and group creation in pre-install. I think we need to remove this user/group from alpine-baselayout.
83 lines
2.7 KiB
Plaintext
83 lines
2.7 KiB
Plaintext
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
|
# Contributor: Kozak Ivan <kozak-iv@yandex.ru>
|
|
# Maintainer: Kozak Ivan <kozak-iv@yandex.ru>
|
|
pkgname=nut
|
|
pkgver=2.7.4
|
|
pkgrel=0
|
|
pkgdesc="Network UPS tools - server"
|
|
url="http://www.networkupstools.org"
|
|
arch="all"
|
|
license="GPL"
|
|
depends_dev="libusb-compat-dev net-snmp-dev neon-dev libtool autoconf automake"
|
|
makedepends="$depends_dev"
|
|
pkgusers="nut"
|
|
pkggroups="nut"
|
|
install="$pkgname.pre-install"
|
|
subpackages="$pkgname-doc $pkgname-dev"
|
|
source="http://www.networkupstools.org/source/2.7/$pkgname-$pkgver.tar.gz
|
|
nut.confd
|
|
upsd.initd
|
|
upsmon.initd
|
|
"
|
|
builddir="$srcdir"/$pkgname-$pkgver
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--libexecdir=/lib/nut \
|
|
--without-wrap \
|
|
--with-user=nut \
|
|
--with-group=nut \
|
|
--disable-static \
|
|
--with-serial \
|
|
--with-usb \
|
|
--without-avahi \
|
|
--with-snmp \
|
|
--with-neon \
|
|
--without-powerman \
|
|
--without-ipmi \
|
|
--without-freeipmi \
|
|
--with-libltdl \
|
|
--without-cgi \
|
|
--with-drvpath=/usr/libexec/nut \
|
|
--datadir=/usr/share/nut \
|
|
--sysconfdir=/etc/nut \
|
|
--with-statepath=/var/run/nut \
|
|
--with-altpidpath=/var/run/nut \
|
|
--with-openssl \
|
|
|| return 1
|
|
make || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
make DESTDIR="$pkgdir" install || return 1
|
|
chmod -R 640 "$pkgdir"/etc/nut || return 1
|
|
chown -R root:nut "$pkgdir"/etc/nut || return 1
|
|
|
|
for i in "$pkgdir"/etc/nut/*.sample; do
|
|
mv $i ${i%.*} || return 1
|
|
done
|
|
|
|
for i in upsd upsmon; do
|
|
install -Dm 755 "$srcdir"/$i.initd "$pkgdir"/etc/init.d/nut-$i || return 1
|
|
install -Dm 644 "$srcdir"/nut.confd "$pkgdir"/etc/conf.d/nut-$i || return 1
|
|
done
|
|
}
|
|
|
|
md5sums="3ba53656933d7471f95140b32a5b8d5c nut-2.7.4.tar.gz
|
|
bc62400005fdb77637d6e0002c6aaad6 nut.confd
|
|
a95924ff4895c08e785a2c36c31d2f8e upsd.initd
|
|
e294774dcacce44c0d5a3abd3af21a92 upsmon.initd"
|
|
sha256sums="980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7 nut-2.7.4.tar.gz
|
|
3557d7db3e90f09f350f1651dbe2714ee5317735f3cccfed087462c34f1b55a2 nut.confd
|
|
2a760088f3d73010ccd78277352eb3ea68ddf7e5884570624299833bc7f5d1c4 upsd.initd
|
|
60f9afbe2a69087d10b353e49460aa436d5f307eafbd83f31640a5f83881954f upsmon.initd"
|
|
sha512sums="320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a nut-2.7.4.tar.gz
|
|
de59b3ab84553780874aeb9edf5faaa1fe19144406f58d40e878cc4cf520440d95a57645a6e3fdd84fdec77c6840ab2185b9554a423f7b9b8b6bca4a1795fb78 nut.confd
|
|
d578a4a383d15adb8d285c49e540c2177875a80396816ac70048a3d269d841c8c56c9ddc45b8062572ee899f19061630296f4d28e00c0c72fefdee98802126f8 upsd.initd
|
|
38b14cde133fe940923efdf3d6b4faf6e87c779025ee28143855d0b659c7e6916bbe509599e6310abcbd91a2a85627351eda9e332f8f48317b736d486191176c upsmon.initd"
|