aboutsummaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJonathan Steel <jsteel@archlinux.org>2017-05-04 14:48:40 +0100
committerJonathan Steel <jsteel@archlinux.org>2017-05-04 14:48:40 +0100
commit859eea34b10a6f60c39c150edc3e41e9146bea6e (patch)
treec20a2819e977c39d4005bd7e2c807d2e0833afad /PKGBUILD
parentc39c145492ad0fa217df8285b5364cafdc236787 (diff)
downloadAUR-859eea34b10a6f60c39c150edc3e41e9146bea6e.tar.gz
AUR-859eea34b10a6f60c39c150edc3e41e9146bea6e.tar.zst
AUR-859eea34b10a6f60c39c150edc3e41e9146bea6e.zip
1.0.6
naemon-thruk has been moved out and is now packaged separately as thruk; this is upstreams direction. naemon-livestatus no longer builds without naemon-core so to keep packaging/building simple I've combined them into "naemon".
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD103
1 files changed, 35 insertions, 68 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 92d0224..972eb08 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,36 @@
1# Maintainer: Jonathan Steel <jsteel at archlinux.org> 1# Maintainer: Jonathan Steel <jsteel at archlinux.org>
2 2
3pkgbase=naemon 3pkgname=naemon
4pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk') 4pkgver=1.0.6
5pkgver=1.0.4
6pkgrel=1 5pkgrel=1
6pkgdesc="System and network monitoring application"
7arch=('i686' 'x86_64') 7arch=('i686' 'x86_64')
8url="http://naemon.org" 8url="http://naemon.org"
9license=('GPL2') 9license=('GPL2')
10makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients' 'help2man') 10depends=('bash' 'icu')
11source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz 11optdepends=('logrotate'
12 $pkgbase.service) 12 'thruk: Web interface for Naemon'
13md5sums=('f0d5b8ce43debf78e82994c7ad995d57' 13 'monitoring-plugins')
14makedepends=('gperf' 'help2man')
15provides=('naemon-core' 'naemon-livestatus')
16conflicts=('naemon-core' 'naemon-livestatus')
17replaces=('naemon-core' 'naemon-livestatus')
18source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz
19 $pkgname.service)
20md5sums=('6c9b95a737a8f232e114f4cff200ff92'
14 'd6a77534e612e8f65ff3360336faec77') 21 'd6a77534e612e8f65ff3360336faec77')
15 22backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg'
16prepare() { 23 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg'
17 cd $pkgbase-$pkgver 24 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg'
18 25 'etc/naemon/conf.d/templates/contacts.cfg'
19 # Break up the install process so we can package the separate components 26 'etc/naemon/conf.d/templates/hosts.cfg'
20 sed -i '51iinstall-livestatus:' Makefile 27 'etc/naemon/conf.d/templates/services.cfg'
21 sed -i '53iinstall-thruk:' Makefile 28 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg'
22} 29 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg')
30install=$pkgname.install
23 31
24build() { 32build() {
25 cd $pkgbase-$pkgver 33 cd $pkgname-$pkgver
26 34
27 ./configure --prefix=/usr \ 35 ./configure --prefix=/usr \
28 --bindir=/usr/bin \ 36 --bindir=/usr/bin \
@@ -54,67 +62,26 @@ build() {
54} 62}
55 63
56check() { 64check() {
57 cd $pkgbase-$pkgver/naemon-core 65 cd $pkgname-$pkgver/naemon-core
58 66
59 make check 67 make check
60} 68}
61 69
62package_naemon-core() { 70package() {
63pkgdesc="System and network monitoring application" 71 cd $pkgname-$pkgver
64depends=('bash')
65optdepends=('logrotate'
66 'monitoring-plugins')
67backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg'
68 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg'
69 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg'
70 'etc/naemon/conf.d/templates/contacts.cfg'
71 'etc/naemon/conf.d/templates/hosts.cfg'
72 'etc/naemon/conf.d/templates/services.cfg'
73 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg'
74 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg')
75install=$pkgbase.install
76
77 cd $pkgbase-$pkgver
78 72
79 make DESTDIR="$pkgdir" install 73 make DESTDIR="$pkgdir" install
80 74
81 chown -R 44:44 "$pkgdir"/var/{cache,log}/$pkgbase 75 install -d "$pkgdir"/etc/naemon/module-conf.d
82 chmod -R 770 "$pkgdir"/var/{cache,log}/$pkgbase 76 install -d "$pkgdir"/var/lib/naemon
83
84 install -Dm644 "$srcdir"/$pkgbase.service \
85 "$pkgdir"/usr/lib/systemd/system/$pkgbase.service
86
87 # Remove init script
88 rm -rf "$pkgdir"/etc/init.d
89}
90
91package_naemon-livestatus() {
92pkgdesc="Standard API for Naemon"
93depends=('icu')
94
95 cd $pkgbase-$pkgver
96
97 make DESTDIR="$pkgdir" install-livestatus
98}
99
100package_naemon-thruk() {
101pkgdesc="Monitoring Webinterface for Naemon"
102depends=('gd' 'mariadb-clients' 'apache' 'mod_fcgid')
103backup=('etc/naemon/cgi.cfg' 'etc/naemon/htpasswd'
104 'etc/naemon/log4perl.conf' 'etc/naemon/menu_local.conf'
105 'etc/naemon/naglint.conf' 'etc/httpd/conf/extra/thruk.conf'
106 'etc/httpd/conf/extra/thruk_cookie_auth_vhost.conf'
107 'etc/naemon/thruk_local.conf' 'etc/naemon/thruk.conf'
108 'etc/naemon/conf.d/thruk_bp_generated.cfg'
109 'etc/naemon/conf.d/thruk_templates.cfg' 'etc/logrotate.d/thruk')
110
111 cd $pkgbase-$pkgver
112 77
113 make DESTDIR="$pkgdir" install-thruk 78 chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname
79 chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgname
114 80
115 chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgbase 81 install -Dm644 "$srcdir"/$pkgname.service \
116 chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgbase 82 "$pkgdir"/usr/lib/systemd/system/$pkgname.service
117 83
118 # Remove init script 84 # Remove non-Arch directories
119 rm -rf "$pkgdir"/etc/init.d 85 rm -rf "$pkgdir"/etc/init.d
86 rm -rf "$pkgdir"/etc/apache2
120} 87}