aboutsummaryrefslogtreecommitdiff
path: root/naemon/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'naemon/PKGBUILD')
-rw-r--r--naemon/PKGBUILD82
1 files changed, 82 insertions, 0 deletions
diff --git a/naemon/PKGBUILD b/naemon/PKGBUILD
new file mode 100644
index 0000000..8bdb6bf
--- /dev/null
+++ b/naemon/PKGBUILD
@@ -0,0 +1,82 @@
1# Maintainer: Immae <ismael.bouya@normalesup.org>
2# Contributor: Jonathan Steel <jsteel at archlinux.org>
3
4pkgname=naemon
5pkgver=1.0.9
6pkgrel=2
7pkgdesc="System and network monitoring application"
8arch=('i686' 'x86_64')
9url="http://naemon.org"
10license=('GPL2')
11depends=('icu' 'glib2')
12optdepends=('logrotate'
13 'thruk: Web interface for Naemon'
14 'naemon-livestatus: Event broker'
15 'monitoring-plugins')
16makedepends=('gperf' 'help2man')
17source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz
18 $pkgname-tmpfiles.conf
19 $pkgname.service)
20sha512sums=('cf2a359a7fcf95a7668f8db35ccd23ad607c05cd85f51a9488cc183a2683da1ba9c7b0a7303d9f03825fbd13103372944267f2a99c10280004c51669e6343793'
21 '756e61e4da56ce614824c3b289d2ee0f4464bf5bcd868dcadbf31c3320967e0179aa6c5aedc16e4bb40c480ab2da8ab08c43e750168e86963a9cd552db01ea1d'
22 '28944f2bd918c0718496ce490d0c2da97a127f71cfb23348620cb6c86fc88e206a07409d32dc8c9a9b5b2d1a8106b400c3e1edf3a6b7aca30ac125a38ebed3b2')
23backup=('etc/logrotate.d/naemon'
24 'etc/naemon/naemon.cfg'
25 'etc/naemon/resource.cfg')
26install=$pkgname.install
27
28build() {
29 cd "$srcdir/$pkgname-$pkgver"
30
31 ./configure --prefix=/usr \
32 --bindir=/usr/bin \
33 --datadir="/usr/share/naemon" \
34 --libdir="/usr/lib/naemon" \
35 --localstatedir="/var/lib/naemon" \
36 --sysconfdir="/etc/naemon" \
37 --with-pkgconfdir="/etc/naemon" \
38 --mandir="/usr/share/man" \
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/naemon.pid"
48
49 make
50}
51
52check() {
53 cd "$srcdir/$pkgname-$pkgver"
54
55 # One of the tests fail for some reason, upstream notified.
56 make check || true
57}
58
59package() {
60 cd "$srcdir/$pkgname-$pkgver"
61
62 make DESTDIR="$pkgdir" install
63
64 install -d "$pkgdir"/etc/naemon/module-conf.d
65
66 rm -rf "$pkgdir"/var/{cache,log}
67
68 install -dm755 "$pkgdir"/var/lib/naemon
69 install -Dm644 "$srcdir"/$pkgname.service \
70 "$pkgdir"/usr/lib/systemd/system/$pkgname.service
71
72 # Move sample config files
73 install -dm755 "$pkgdir"/usr/share/doc/naemon
74 mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/usr/share/doc/naemon/
75 install -d "$pkgdir"/etc/naemon/conf.d/templates
76
77 # Remove non-Arch directories
78 rm -rf "$pkgdir"/etc/init.d
79 rm -rf "$pkgdir"/etc/apache2
80
81 install -Dm644 "$srcdir"/naemon-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/naemon.conf
82}