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