1 # Maintainer: Jonathan Steel <jsteel at archlinux.org>
6 pkgdesc="System and network monitoring application"
8 url="http://naemon.org"
10 depends=('icu' 'glib2')
11 optdepends=('logrotate'
12 'thruk: Web interface for Naemon'
14 makedepends=('gperf' 'help2man')
15 provides=('naemon-core' 'naemon-livestatus')
16 conflicts=('naemon-core' 'naemon-livestatus')
17 replaces=('naemon-core' 'naemon-livestatus')
18 source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz
21 md5sums=('6c9b95a737a8f232e114f4cff200ff92'
22 '4a6d8f9b39335dfe3348a1a20df10dfd'
23 '29f1d11c1a7f4f1515b7993c540dabe8')
24 backup=('etc/logrotate.d/naemon'
25 'etc/naemon/naemon.cfg'
26 'etc/naemon/resource.cfg')
27 install=$pkgname.install
30 cd $pkgname-$pkgver/naemon-core
32 patch -Np1 -i "$srcdir"/gcc7.patch
38 ./configure --prefix=/usr \
40 --datadir="/usr/share/naemon" \
41 --libdir="/usr/lib/naemon" \
42 --localstatedir="/var/lib/naemon" \
43 --sysconfdir="/etc/naemon" \
44 --with-pkgconfdir="/etc/naemon" \
45 --mandir="/usr/share/man" \
46 --enable-event-broker \
47 --with-pluginsdir="/usr/lib/monitoring-plugins" \
48 --with-tempdir="/var/cache/naemon" \
49 --with-checkresultdir="/var/cache/naemon/checkresults" \
50 --with-logdir="/var/log/naemon" \
51 --with-initdir="/etc/init.d" \
52 --with-logrotatedir="/etc/logrotate.d" \
53 --with-naemon-user="naemon" \
54 --with-naemon-group="naemon" \
55 --with-lockfile="/run/naemon/naemon.pid" \
56 --with-thruk-user="http" \
57 --with-thruk-group="naemon" \
58 --with-thruk-libs="/usr/lib/naemon/perl5" \
59 --with-thruk-tempdir="/var/cache/naemon/thruk" \
60 --with-thruk-vardir="/var/lib/naemon/thruk" \
61 --with-httpd-conf="/etc/httpd/conf/extra/" \
62 --with-htmlurl="/naemon"
68 cd $pkgname-$pkgver/naemon-core
76 make DESTDIR="$pkgdir" install
78 install -d "$pkgdir"/etc/naemon/module-conf.d
79 install -d "$pkgdir"/var/lib/naemon/spool/checkresults
81 chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname
82 chown -R 44:44 "$pkgdir"/etc/naemon
83 chmod -R 750 "$pkgdir"/var/{cache,lib,log}/$pkgname
85 install -Dm644 "$srcdir"/$pkgname.service \
86 "$pkgdir"/usr/lib/systemd/system/$pkgname.service
87 install -Dm644 naemon-core/naemon.tmpfiles.conf \
88 "$pkgdir"/usr/lib/tmpfiles.d/naemon.conf
90 # Move sample config files
91 mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/etc/naemon/examples
92 install -d "$pkgdir"/etc/naemon/conf.d/templates
94 # Remove non-Arch directories
95 rm -rf "$pkgdir"/etc/init.d
96 rm -rf "$pkgdir"/etc/apache2