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