blob: 4ade4bdd085b0ed9cc7e79cff96d18517194f371 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# Maintainer: Jonathan Steel <jsteel at archlinux.org>
pkgname=naemon
pkgver=1.0.6
pkgrel=4
pkgdesc="System and network monitoring application"
arch=('i686' 'x86_64')
url="http://naemon.org"
license=('GPL2')
depends=('icu' 'glib2')
optdepends=('logrotate'
'thruk: Web interface for Naemon'
'monitoring-plugins')
makedepends=('gperf' 'help2man')
provides=('naemon-core' 'naemon-livestatus')
conflicts=('naemon-core' 'naemon-livestatus')
replaces=('naemon-core' 'naemon-livestatus')
source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz
gcc7.patch
$pkgname.service)
md5sums=('6c9b95a737a8f232e114f4cff200ff92'
'4a6d8f9b39335dfe3348a1a20df10dfd'
'29f1d11c1a7f4f1515b7993c540dabe8')
backup=('etc/logrotate.d/naemon'
'etc/naemon/naemon.cfg'
'etc/naemon/resource.cfg')
install=$pkgname.install
prepare() {
cd $pkgname-$pkgver/naemon-core
patch -Np1 -i "$srcdir"/gcc7.patch
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr \
--bindir=/usr/bin \
--datadir="/usr/share/naemon" \
--libdir="/usr/lib/naemon" \
--localstatedir="/var/lib/naemon" \
--sysconfdir="/etc/naemon" \
--with-pkgconfdir="/etc/naemon" \
--mandir="/usr/share/man" \
--enable-event-broker \
--with-pluginsdir="/usr/lib/monitoring-plugins" \
--with-tempdir="/var/cache/naemon" \
--with-checkresultdir="/var/cache/naemon/checkresults" \
--with-logdir="/var/log/naemon" \
--with-initdir="/etc/init.d" \
--with-logrotatedir="/etc/logrotate.d" \
--with-naemon-user="naemon" \
--with-naemon-group="naemon" \
--with-lockfile="/run/naemon/naemon.pid" \
--with-thruk-user="http" \
--with-thruk-group="naemon" \
--with-thruk-libs="/usr/lib/naemon/perl5" \
--with-thruk-tempdir="/var/cache/naemon/thruk" \
--with-thruk-vardir="/var/lib/naemon/thruk" \
--with-httpd-conf="/etc/httpd/conf/extra/" \
--with-htmlurl="/naemon"
make
}
check() {
cd $pkgname-$pkgver/naemon-core
make check
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -d "$pkgdir"/etc/naemon/module-conf.d
install -d "$pkgdir"/var/lib/naemon/spool/checkresults
chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname
chown -R 44:44 "$pkgdir"/etc/naemon
chmod -R 750 "$pkgdir"/var/{cache,lib,log}/$pkgname
install -Dm644 "$srcdir"/$pkgname.service \
"$pkgdir"/usr/lib/systemd/system/$pkgname.service
install -Dm644 naemon-core/naemon.tmpfiles.conf \
"$pkgdir"/usr/lib/tmpfiles.d/naemon.conf
# Move sample config files
mv "$pkgdir"/etc/naemon/conf.d "$pkgdir"/etc/naemon/examples
install -d "$pkgdir"/etc/naemon/conf.d/templates
# Remove non-Arch directories
rm -rf "$pkgdir"/etc/init.d
rm -rf "$pkgdir"/etc/apache2
}
|