]>
Commit | Line | Data |
---|---|---|
403b591f JS |
1 | # Maintainer: Jonathan Steel <jsteel at archlinux.org> |
2 | ||
859eea34 JS |
3 | pkgname=naemon |
4 | pkgver=1.0.6 | |
c39c1454 | 5 | pkgrel=1 |
859eea34 | 6 | pkgdesc="System and network monitoring application" |
403b591f JS |
7 | arch=('i686' 'x86_64') |
8 | url="http://naemon.org" | |
9 | license=('GPL2') | |
859eea34 JS |
10 | depends=('bash' 'icu') |
11 | optdepends=('logrotate' | |
12 | 'thruk: Web interface for Naemon' | |
13 | 'monitoring-plugins') | |
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 | |
19 | $pkgname.service) | |
20 | md5sums=('6c9b95a737a8f232e114f4cff200ff92' | |
403b591f | 21 | 'd6a77534e612e8f65ff3360336faec77') |
859eea34 JS |
22 | backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg' |
23 | 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg' | |
24 | 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg' | |
25 | 'etc/naemon/conf.d/templates/contacts.cfg' | |
26 | 'etc/naemon/conf.d/templates/hosts.cfg' | |
27 | 'etc/naemon/conf.d/templates/services.cfg' | |
28 | 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg' | |
29 | 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg') | |
30 | install=$pkgname.install | |
403b591f JS |
31 | |
32 | build() { | |
859eea34 | 33 | cd $pkgname-$pkgver |
403b591f JS |
34 | |
35 | ./configure --prefix=/usr \ | |
36 | --bindir=/usr/bin \ | |
37 | --datadir="/usr/share/naemon" \ | |
38 | --libdir="/usr/lib/naemon" \ | |
39 | --localstatedir="/var/lib/naemon" \ | |
40 | --sysconfdir="/etc/naemon" \ | |
41 | --with-pkgconfdir="/etc/naemon" \ | |
42 | --mandir="/usr/share/man" \ | |
43 | --enable-event-broker \ | |
44 | --with-pluginsdir="/usr/lib/monitoring-plugins" \ | |
45 | --with-tempdir="/var/cache/naemon" \ | |
46 | --with-checkresultdir="/var/cache/naemon/checkresults" \ | |
47 | --with-logdir="/var/log/naemon" \ | |
48 | --with-initdir="/etc/init.d" \ | |
49 | --with-logrotatedir="/etc/logrotate.d" \ | |
50 | --with-naemon-user="naemon" \ | |
51 | --with-naemon-group="naemon" \ | |
52 | --with-lockfile="/run/naemon.pid" \ | |
53 | --with-thruk-user="http" \ | |
54 | --with-thruk-group="naemon" \ | |
55 | --with-thruk-libs="/usr/lib/naemon/perl5" \ | |
56 | --with-thruk-tempdir="/var/cache/naemon/thruk" \ | |
57 | --with-thruk-vardir="/var/lib/naemon/thruk" \ | |
58 | --with-httpd-conf="/etc/httpd/conf/extra/" \ | |
59 | --with-htmlurl="/naemon" | |
60 | ||
61 | make | |
62 | } | |
63 | ||
64 | check() { | |
859eea34 | 65 | cd $pkgname-$pkgver/naemon-core |
403b591f JS |
66 | |
67 | make check | |
68 | } | |
69 | ||
859eea34 JS |
70 | package() { |
71 | cd $pkgname-$pkgver | |
403b591f JS |
72 | |
73 | make DESTDIR="$pkgdir" install | |
74 | ||
859eea34 JS |
75 | install -d "$pkgdir"/etc/naemon/module-conf.d |
76 | install -d "$pkgdir"/var/lib/naemon | |
403b591f | 77 | |
859eea34 JS |
78 | chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname |
79 | chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgname | |
403b591f | 80 | |
859eea34 JS |
81 | install -Dm644 "$srcdir"/$pkgname.service \ |
82 | "$pkgdir"/usr/lib/systemd/system/$pkgname.service | |
403b591f | 83 | |
859eea34 | 84 | # Remove non-Arch directories |
403b591f | 85 | rm -rf "$pkgdir"/etc/init.d |
859eea34 | 86 | rm -rf "$pkgdir"/etc/apache2 |
403b591f | 87 | } |