mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-26 03:42:37 +01:00
105 lines
3.9 KiB
Plaintext
105 lines
3.9 KiB
Plaintext
# Contributor: Kozak Ivan <kozak-iv@yandex.ru>
|
|
# Maintainer: Kozak Ivan <kozak-iv@yandex.ru>
|
|
pkgname=nut
|
|
pkgver=2.7.2
|
|
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
|
|
libm.patch
|
|
nut-upsd.initd
|
|
nut-upsd.confd
|
|
nut-upsmon.initd
|
|
nut-upsmon.confd"
|
|
|
|
# bcmxcp.patch - sorry no bcmxc and no bcmxcp_usb (get errors about undefined reference to `ldexp')
|
|
|
|
_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
|
|
}
|
|
|
|
build() {
|
|
cd "$_builddir"
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--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 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
|
|
#install -d -o nut -g nut -m700 "$pkgdir"/var/lib/nut || return 1
|
|
#for file in "$pkgdir"/etc/nut/*.sample
|
|
#do
|
|
# mv $file "$pkgdir"/etc/nut/`basename $file .sample`
|
|
#done
|
|
|
|
rm -f "$pkgdir"/usr/lib/*.la
|
|
}
|
|
|
|
md5sums="c3568b42e058cfc385b46d25140dced4 nut-2.7.2.tar.gz
|
|
f12613b6d043092c0c66c646702674d8 libm.patch
|
|
e981e4ff27c0fc455ad2f319cbf29c36 nut-upsd.initd
|
|
6b068c71884f8d66b5b7395b4a14d821 nut-upsd.confd
|
|
21f6121acfeb17d51376bb0d11518804 nut-upsmon.initd
|
|
6b068c71884f8d66b5b7395b4a14d821 nut-upsmon.confd"
|
|
sha256sums="4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d nut-2.7.2.tar.gz
|
|
bb12164d2cfe560fa505435d98681b80a22f0a6bf819dde83ad4e638c2abc111 libm.patch
|
|
afb6878a67a6effc9199b24dbcc4be20a799abbd370d8ebcfe09d05bb1ba11d6 nut-upsd.initd
|
|
8ee7ff65c3ef84bb1bc0b458ff5b574bb8a6ac656a6d3a40441185b352481dda nut-upsd.confd
|
|
0dfbc87ff6bb6c66132ecf4d7d09710ba34343e7cf42733484fa2df77b9be4cb nut-upsmon.initd
|
|
8ee7ff65c3ef84bb1bc0b458ff5b574bb8a6ac656a6d3a40441185b352481dda nut-upsmon.confd"
|
|
sha512sums="7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6 nut-2.7.2.tar.gz
|
|
091e9529a1432e7a011c2ced8a7ca50568524823e3c1bb8d023f4501fe4c337e4b909e978aedc9cb2b68be6c690e3300f0d2a839c4765c39e7618d6767c2468a libm.patch
|
|
a0a205805a7cd7bc70163d9b50e51f16e74af22a799f74b1155430ca65090d64af972070d04759e4ac8e83e088bcbc531d9e9abd38482f74a885965ff0dc0ed8 nut-upsd.initd
|
|
cf93ce44cb6fcf980f48f77abeeabb8d0b4008e8258cf7085d68b2a9c5c10c818dbf0030630218fcf8d9c9aba43c06bda28f91efca9cc783438ec0192f10eb5d nut-upsd.confd
|
|
aa6efe85e874ada8b4cea0581bca6b8c24fa336fe1b197925519041f55b21d77683c31e2d8304fb45062cb52a55d44682981fcd22c7db0d2f8adf7e866324efe nut-upsmon.initd
|
|
cf93ce44cb6fcf980f48f77abeeabb8d0b4008e8258cf7085d68b2a9c5c10c818dbf0030630218fcf8d9c9aba43c06bda28f91efca9cc783438ec0192f10eb5d nut-upsmon.confd"
|