]>
Commit | Line | Data |
---|---|---|
a4b20506 IB |
1 | # Maintainer: Immae <ismael.bouya@normalesup.org> |
2 | # Contributor: Jonathan Steel <jsteel at archlinux.org> | |
403b591f | 3 | |
859eea34 | 4 | pkgname=naemon |
9c1e810f IB |
5 | pkgver=1.0.10 |
6 | pkgrel=1 | |
859eea34 | 7 | pkgdesc="System and network monitoring application" |
403b591f JS |
8 | arch=('i686' 'x86_64') |
9 | url="http://naemon.org" | |
10 | license=('GPL2') | |
8b3611ea | 11 | depends=('icu' 'glib2') |
859eea34 JS |
12 | optdepends=('logrotate' |
13 | 'thruk: Web interface for Naemon' | |
a4b20506 | 14 | 'naemon-livestatus: Event broker' |
859eea34 JS |
15 | 'monitoring-plugins') |
16 | makedepends=('gperf' 'help2man') | |
9c1e810f | 17 | source=("naemon-git::git+https://github.com/naemon/naemon-core.git#commit=c2a8730538846f342911764cd7731015f1a6f284" |
a4b20506 | 18 | $pkgname-tmpfiles.conf |
9c1e810f IB |
19 | $pkgname.service |
20 | overflow.patch) | |
21 | sha512sums=('SKIP' | |
a4b20506 | 22 | '756e61e4da56ce614824c3b289d2ee0f4464bf5bcd868dcadbf31c3320967e0179aa6c5aedc16e4bb40c480ab2da8ab08c43e750168e86963a9cd552db01ea1d' |
9c1e810f IB |
23 | '28944f2bd918c0718496ce490d0c2da97a127f71cfb23348620cb6c86fc88e206a07409d32dc8c9a9b5b2d1a8106b400c3e1edf3a6b7aca30ac125a38ebed3b2' |
24 | 'ec1ccf09f8c02e8f6dfdf2f6b80eed4b3e07df85703d89bdfdefe0bd9380b832a7f9a1c2976f17f55d74dbb3b1888ae28bf0551c78cb8bbc3acb08cd1e4a85da') | |
8b3611ea JS |
25 | backup=('etc/logrotate.d/naemon' |
26 | 'etc/naemon/naemon.cfg' | |
27 | 'etc/naemon/resource.cfg') | |
859eea34 | 28 | install=$pkgname.install |
403b591f JS |
29 | |
30 | build() { | |
9c1e810f | 31 | cd "$srcdir/$pkgname-git" |
403b591f | 32 | |
9c1e810f IB |
33 | patch -p1 < $srcdir/overflow.patch |
34 | ./autogen.sh | |
403b591f JS |
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" \ | |
403b591f JS |
43 | --with-pluginsdir="/usr/lib/monitoring-plugins" \ |
44 | --with-tempdir="/var/cache/naemon" \ | |
45 | --with-checkresultdir="/var/cache/naemon/checkresults" \ | |
46 | --with-logdir="/var/log/naemon" \ | |
47 | --with-initdir="/etc/init.d" \ | |
48 | --with-logrotatedir="/etc/logrotate.d" \ | |
49 | --with-naemon-user="naemon" \ | |
50 | --with-naemon-group="naemon" \ | |
a4b20506 | 51 | --with-lockfile="/run/naemon/naemon.pid" |
403b591f JS |
52 | |
53 | make | |
54 | } | |
55 | ||
56 | check() { | |
9c1e810f | 57 | cd "$srcdir/$pkgname-git" |
403b591f | 58 | |
a4b20506 IB |
59 | # One of the tests fail for some reason, upstream notified. |
60 | make check || true | |
403b591f JS |
61 | } |
62 | ||
859eea34 | 63 | package() { |
9c1e810f | 64 | cd "$srcdir/$pkgname-git" |
403b591f JS |
65 | |
66 | make DESTDIR="$pkgdir" install | |
67 | ||
859eea34 | 68 | install -d "$pkgdir"/etc/naemon/module-conf.d |
403b591f | 69 | |
a4b20506 | 70 | rm -rf "$pkgdir"/var/{cache,log} |
403b591f | 71 | |
a4b20506 | 72 | install -dm755 "$pkgdir"/var/lib/naemon |
859eea34 JS |
73 | install -Dm644 "$srcdir"/$pkgname.service \ |
74 | "$pkgdir"/usr/lib/systemd/system/$pkgname.service | |
403b591f | 75 | |
8b3611ea | 76 | # Move sample config files |
7a5fdce9 IB |
77 | install -dm755 "$pkgdir"/usr/share/doc/naemon |
78 | mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/usr/share/doc/naemon/ | |
8b3611ea JS |
79 | install -d "$pkgdir"/etc/naemon/conf.d/templates |
80 | ||
859eea34 | 81 | # Remove non-Arch directories |
403b591f | 82 | rm -rf "$pkgdir"/etc/init.d |
859eea34 | 83 | rm -rf "$pkgdir"/etc/apache2 |
a4b20506 IB |
84 | |
85 | install -Dm644 "$srcdir"/naemon-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/naemon.conf | |
403b591f | 86 | } |