aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nut/APKBUILD
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-06-13 17:29:29 +0300
committerBartłomiej Piotrowski <b@bpiotrowski.pl>2016-07-07 11:38:04 +0200
commite409857fde32cd84d3f9de1c169336ee0d071e92 (patch)
treeb8920ba6373b1a4b909d43d1236f131acf4f1c7c /testing/nut/APKBUILD
parentf1ec1ed9cc65d443bd48756b40eff58466c87b80 (diff)
downloadaports-e409857fde32cd84d3f9de1c169336ee0d071e92.tar.gz
aports-e409857fde32cd84d3f9de1c169336ee0d071e92.tar.bz2
aports-e409857fde32cd84d3f9de1c169336ee0d071e92.tar.xz
testing/nut: Upgrade to 2.7.4. conf.d & init.d cleanups
- 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.
Diffstat (limited to 'testing/nut/APKBUILD')
-rw-r--r--testing/nut/APKBUILD81
1 files changed, 34 insertions, 47 deletions
diff --git a/testing/nut/APKBUILD b/testing/nut/APKBUILD
index 45c94d27ab..bf9efaf21d 100644
--- a/testing/nut/APKBUILD
+++ b/testing/nut/APKBUILD
@@ -1,8 +1,9 @@
+# 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.3
-pkgrel=1
+pkgver=2.7.4
+pkgrel=0
pkgdesc="Network UPS tools - server"
url="http://www.networkupstools.org"
arch="all"
@@ -14,32 +15,19 @@ pkggroups="nut"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dev"
source="http://www.networkupstools.org/source/2.7/$pkgname-$pkgver.tar.gz
- nut-upsd.initd
- nut-upsd.confd
- nut-upsmon.initd
- nut-upsmon.confd
- config-sub.patch"
-
-_builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- libtoolize --force && aclocal -I m4 && autoconf \
- && automake --add-missing && update_config_sub
-}
+ nut.confd
+ upsd.initd
+ upsmon.initd
+ "
+builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
+ --libexecdir=/lib/nut \
--without-wrap \
--with-user=nut \
--with-group=nut \
@@ -65,31 +53,30 @@ build() {
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
- chmod 640 "$pkgdir"/etc/nut/* || return 1
- chown root:nut "$pkgdir"/etc/nut/* || return 1
- install -D -m0755 "$srcdir"/nut-upsd.initd "$pkgdir"/etc/init.d/nut-upsd || return 1
- install -D -m0644 "$srcdir"/nut-upsd.confd "$pkgdir"/etc/conf.d/nut-upsd || return 1
- install -D -m0755 "$srcdir"/nut-upsmon.initd "$pkgdir"/etc/init.d/nut-upsmon || return 1
- install -D -m0644 "$srcdir"/nut-upsmon.confd "$pkgdir"/etc/conf.d/nut-upsmon || 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="a1a7f747093663e1f39ab595b63b45e4 nut-2.7.3.tar.gz
-2a5b693a967040270edc883e61f7ddef nut-upsd.initd
-6b068c71884f8d66b5b7395b4a14d821 nut-upsd.confd
-30dc9b43f956d7a6545f71a0d1d8dc47 nut-upsmon.initd
-6b068c71884f8d66b5b7395b4a14d821 nut-upsmon.confd
-2073c7d345cc59f6dc4f4322f63ccfa0 config-sub.patch"
-sha256sums="ff44d95d06a51559a0a018eef7f8d17911c1002b6352a7d7580ff75acb12126b nut-2.7.3.tar.gz
-2eff9796f0e8d0e82c8d4ac1220885db5e09b8b91f4f49ce590da028e210aa2a nut-upsd.initd
-8ee7ff65c3ef84bb1bc0b458ff5b574bb8a6ac656a6d3a40441185b352481dda nut-upsd.confd
-37924fe62b4c837579283f080990d2e4cbd84dd85fd5c3c0fd45f665152a7d86 nut-upsmon.initd
-8ee7ff65c3ef84bb1bc0b458ff5b574bb8a6ac656a6d3a40441185b352481dda nut-upsmon.confd
-8e44edcbfa1f2f9344659ca08bfeb93dec3e8356257b882d07aa61107fdac4a0 config-sub.patch"
-sha512sums="3dd978712dc0fabe7e194dbf6d7bb442c456aa4d45bfc63ede8a3acae23c66811cbcf2705b55a6739129b5f120e6f5865bcb9d19eb9080507a85e2624d5663d6 nut-2.7.3.tar.gz
-94333e58fca66111318f04f00f225a2203716b3d0bbfa39593a71de16f740df8623fdffba2e7821b3ae92e96c2fb4a0ac3661f1da31409f3b13b8f704e9c07c9 nut-upsd.initd
-cf93ce44cb6fcf980f48f77abeeabb8d0b4008e8258cf7085d68b2a9c5c10c818dbf0030630218fcf8d9c9aba43c06bda28f91efca9cc783438ec0192f10eb5d nut-upsd.confd
-31ac70d1ec5c2db7e7faf2db14ab03a012287e2b0cc3e42755e7886e444a11a701cf870d89d44d7a80f3034f9856a163269a9071dd25f2f98e416677c18b0791 nut-upsmon.initd
-cf93ce44cb6fcf980f48f77abeeabb8d0b4008e8258cf7085d68b2a9c5c10c818dbf0030630218fcf8d9c9aba43c06bda28f91efca9cc783438ec0192f10eb5d nut-upsmon.confd
-9253bc4eb3ed48ef4978e4948a3febbc7fb40067b3bdf642b8fb362e7e791d3bd91da25a7941965a675eb5e5ed9ef8b434d1a50bb499722a9805d3a689077e52 config-sub.patch"
+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"