]> git.immae.eu Git - perso/Immae/Config/AUR.git/blame - PKGBUILD
naemon: Fix typo in /usr directory
[perso/Immae/Config/AUR.git] / PKGBUILD
CommitLineData
a4b20506
IB
1# Maintainer: Immae <ismael.bouya@normalesup.org>
2# Contributor: Jonathan Steel <jsteel at archlinux.org>
403b591f 3
859eea34 4pkgname=naemon
a4b20506 5pkgver=1.0.9
e37588e1 6pkgrel=2
859eea34 7pkgdesc="System and network monitoring application"
403b591f
JS
8arch=('i686' 'x86_64')
9url="http://naemon.org"
10license=('GPL2')
8b3611ea 11depends=('icu' 'glib2')
859eea34
JS
12optdepends=('logrotate'
13 'thruk: Web interface for Naemon'
a4b20506 14 'naemon-livestatus: Event broker'
859eea34
JS
15 'monitoring-plugins')
16makedepends=('gperf' 'help2man')
859eea34 17source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz
a4b20506 18 $pkgname-tmpfiles.conf
859eea34 19 $pkgname.service)
a4b20506
IB
20sha512sums=('cf2a359a7fcf95a7668f8db35ccd23ad607c05cd85f51a9488cc183a2683da1ba9c7b0a7303d9f03825fbd13103372944267f2a99c10280004c51669e6343793'
21 '756e61e4da56ce614824c3b289d2ee0f4464bf5bcd868dcadbf31c3320967e0179aa6c5aedc16e4bb40c480ab2da8ab08c43e750168e86963a9cd552db01ea1d'
22 '28944f2bd918c0718496ce490d0c2da97a127f71cfb23348620cb6c86fc88e206a07409d32dc8c9a9b5b2d1a8106b400c3e1edf3a6b7aca30ac125a38ebed3b2')
8b3611ea
JS
23backup=('etc/logrotate.d/naemon'
24 'etc/naemon/naemon.cfg'
25 'etc/naemon/resource.cfg')
859eea34 26install=$pkgname.install
403b591f
JS
27
28build() {
a4b20506 29 cd "$srcdir/$pkgname-$pkgver"
403b591f
JS
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" \
403b591f
JS
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" \
a4b20506 47 --with-lockfile="/run/naemon/naemon.pid"
403b591f
JS
48
49 make
50}
51
52check() {
a4b20506 53 cd "$srcdir/$pkgname-$pkgver"
403b591f 54
a4b20506
IB
55 # One of the tests fail for some reason, upstream notified.
56 make check || true
403b591f
JS
57}
58
859eea34 59package() {
a4b20506 60 cd "$srcdir/$pkgname-$pkgver"
403b591f
JS
61
62 make DESTDIR="$pkgdir" install
63
859eea34 64 install -d "$pkgdir"/etc/naemon/module-conf.d
403b591f 65
a4b20506 66 rm -rf "$pkgdir"/var/{cache,log}
403b591f 67
a4b20506 68 install -dm755 "$pkgdir"/var/lib/naemon
859eea34
JS
69 install -Dm644 "$srcdir"/$pkgname.service \
70 "$pkgdir"/usr/lib/systemd/system/$pkgname.service
403b591f 71
8b3611ea 72 # Move sample config files
e37588e1
IB
73 install -dm755 "$pkgdir"/usr/share/doc/naemon
74 mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/usr/share/doc/naemon/
8b3611ea
JS
75 install -d "$pkgdir"/etc/naemon/conf.d/templates
76
859eea34 77 # Remove non-Arch directories
403b591f 78 rm -rf "$pkgdir"/etc/init.d
859eea34 79 rm -rf "$pkgdir"/etc/apache2
a4b20506
IB
80
81 install -Dm644 "$srcdir"/naemon-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/naemon.conf
403b591f 82}