blob: 222d4ccad7c7d94b22ba86ea850c4524d389bd95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Contributor: Kozak Ivan <kozak-iv@yandex.ru>
# Maintainer: Kozak Ivan <kozak-iv@yandex.ru>
pkgname=nut
pkgver=2.7.3
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-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
}
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
}
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"
|