1 # Maintainer: Jonathan Steel <jsteel at archlinux.org>
4 pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk')
8 url="http://naemon.org"
10 makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients')
11 source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz
13 md5sums=('0d6873669bd44375978c97174529e258'
14 'd6a77534e612e8f65ff3360336faec77')
19 # Break up the install process so we can package the separate components
20 sed -i '60iinstall-livestatus:' Makefile
21 sed -i '62iinstall-thruk:' Makefile
27 ./configure --prefix=/usr \
29 --datadir="/usr/share/naemon" \
30 --libdir="/usr/lib/naemon" \
31 --localstatedir="/var/lib/naemon" \
32 --sysconfdir="/etc/naemon" \
33 --with-pkgconfdir="/etc/naemon" \
34 --mandir="/usr/share/man" \
35 --enable-event-broker \
36 --with-pluginsdir="/usr/lib/monitoring-plugins" \
37 --with-tempdir="/var/cache/naemon" \
38 --with-checkresultdir="/var/cache/naemon/checkresults" \
39 --with-logdir="/var/log/naemon" \
40 --with-initdir="/etc/init.d" \
41 --with-logrotatedir="/etc/logrotate.d" \
42 --with-naemon-user="naemon" \
43 --with-naemon-group="naemon" \
44 --with-lockfile="/run/naemon.pid" \
45 --with-thruk-user="http" \
46 --with-thruk-group="naemon" \
47 --with-thruk-libs="/usr/lib/naemon/perl5" \
48 --with-thruk-tempdir="/var/cache/naemon/thruk" \
49 --with-thruk-vardir="/var/lib/naemon/thruk" \
50 --with-httpd-conf="/etc/httpd/conf/extra/" \
51 --with-htmlurl="/naemon"
57 cd $pkgbase-$pkgver/naemon-core
62 package_naemon-core() {
63 pkgdesc="System and network monitoring application"
65 optdepends=('logrotate'
67 backup=('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')
75 install=$pkgbase.install
79 make DESTDIR="$pkgdir" install
81 chown -R 44:44 "$pkgdir"/var/{cache,log}/$pkgbase
82 chmod -R 770 "$pkgdir"/var/{cache,log}/$pkgbase
84 install -Dm644 "$srcdir"/$pkgbase.service \
85 "$pkgdir"/usr/lib/systemd/system/$pkgbase.service
88 rm -rf "$pkgdir"/etc/init.d
91 package_naemon-livestatus() {
92 pkgdesc="Standard API for Naemon"
97 make DESTDIR="$pkgdir" install-livestatus
100 package_naemon-thruk() {
101 pkgdesc="Monitoring Webinterface for Naemon"
102 depends=('gd' 'mariadb-clients' 'apache' 'mod_fcgid')
103 backup=('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')
113 make DESTDIR="$pkgdir" install-thruk
115 chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgbase
116 chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgbase
119 rm -rf "$pkgdir"/etc/init.d