aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Steel <jsteel@archlinux.org>2015-06-08 18:37:33 +0100
committerJonathan Steel <jsteel@archlinux.org>2015-06-08 18:37:33 +0100
commit403b591f0104d36ebd13eaddf6da2263941b8eae (patch)
treef924d70713ef8ef03283585c9a894445aa7c90af
downloadAUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.gz
AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.zst
AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.zip
Initial commit
-rw-r--r--.SRCINFO61
-rw-r--r--PKGBUILD120
-rw-r--r--naemon.install19
-rw-r--r--naemon.service18
4 files changed, 218 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..356c51e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,61 @@
1# Generated by makepkg 4.2.1
2# Tue Apr 21 14:57:11 UTC 2015
3pkgbase = naemon
4 pkgver = 1.0.3
5 pkgrel = 1
6 url = http://naemon.org
7 arch = i686
8 arch = x86_64
9 license = GPL2
10 makedepends = gperf
11 makedepends = rsync
12 makedepends = gd
13 makedepends = mariadb-clients
14 source = http://labs.consol.de/naemon/release/v1.0.3/src/naemon-1.0.3.tar.gz
15 source = naemon.service
16 md5sums = 0d6873669bd44375978c97174529e258
17 md5sums = d6a77534e612e8f65ff3360336faec77
18
19pkgname = naemon-core
20 pkgdesc = System and network monitoring application
21 install = naemon.install
22 depends = bash
23 optdepends = logrotate
24 optdepends = monitoring-plugins
25 backup = etc/logrotate.d/naemon
26 backup = etc/naemon/conf.d/commands.cfg
27 backup = etc/naemon/conf.d/contacts.cfg
28 backup = etc/naemon/conf.d/localhost.cfg
29 backup = etc/naemon/conf.d/printer.cfg
30 backup = etc/naemon/conf.d/switch.cfg
31 backup = etc/naemon/conf.d/templates/contacts.cfg
32 backup = etc/naemon/conf.d/templates/hosts.cfg
33 backup = etc/naemon/conf.d/templates/services.cfg
34 backup = etc/naemon/conf.d/timeperiods.cfg
35 backup = etc/naemon/conf.d/windows.cfg
36 backup = etc/naemon/naemon.cfg
37 backup = etc/naemon/resource.cfg
38
39pkgname = naemon-livestatus
40 pkgdesc = Standard API for Naemon
41 depends = icu
42
43pkgname = naemon-thruk
44 pkgdesc = Monitoring Webinterface for Naemon
45 depends = gd
46 depends = mariadb-clients
47 depends = apache
48 depends = mod_fcgid
49 backup = etc/naemon/cgi.cfg
50 backup = etc/naemon/htpasswd
51 backup = etc/naemon/log4perl.conf
52 backup = etc/naemon/menu_local.conf
53 backup = etc/naemon/naglint.conf
54 backup = etc/httpd/conf/extra/thruk.conf
55 backup = etc/httpd/conf/extra/thruk_cookie_auth_vhost.conf
56 backup = etc/naemon/thruk_local.conf
57 backup = etc/naemon/thruk.conf
58 backup = etc/naemon/conf.d/thruk_bp_generated.cfg
59 backup = etc/naemon/conf.d/thruk_templates.cfg
60 backup = etc/logrotate.d/thruk
61
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..01f7a64
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,120 @@
1# Maintainer: Jonathan Steel <jsteel at archlinux.org>
2
3pkgbase=naemon
4pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk')
5pkgver=1.0.3
6pkgrel=1
7arch=('i686' 'x86_64')
8url="http://naemon.org"
9license=('GPL2')
10makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients')
11source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz
12 $pkgbase.service)
13md5sums=('0d6873669bd44375978c97174529e258'
14 'd6a77534e612e8f65ff3360336faec77')
15
16prepare() {
17 cd $pkgbase-$pkgver
18
19 # Break up the install process so we can package the separate components
20 sed -i '60iinstall-livestatus:' Makefile
21 sed -i '62iinstall-thruk:' Makefile
22}
23
24build() {
25 cd $pkgbase-$pkgver
26
27 ./configure --prefix=/usr \
28 --bindir=/usr/bin \
29 --datadir="/usr/share/naemon" \
30 --libdir="/usr/lib/naemon" \
31 --localstatedir="/var/lib/naemon" \
32 --sysconfdir="/etc/naemon" \
33 --with-pkgconfdir="/etc/naemon" \
34 --mandir="/usr/share/man" \
35 --enable-event-broker \
36 --with-pluginsdir="/usr/lib/monitoring-plugins" \
37 --with-tempdir="/var/cache/naemon" \
38 --with-checkresultdir="/var/cache/naemon/checkresults" \
39 --with-logdir="/var/log/naemon" \
40 --with-initdir="/etc/init.d" \
41 --with-logrotatedir="/etc/logrotate.d" \
42 --with-naemon-user="naemon" \
43 --with-naemon-group="naemon" \
44 --with-lockfile="/run/naemon.pid" \
45 --with-thruk-user="http" \
46 --with-thruk-group="naemon" \
47 --with-thruk-libs="/usr/lib/naemon/perl5" \
48 --with-thruk-tempdir="/var/cache/naemon/thruk" \
49 --with-thruk-vardir="/var/lib/naemon/thruk" \
50 --with-httpd-conf="/etc/httpd/conf/extra/" \
51 --with-htmlurl="/naemon"
52
53 make
54}
55
56check() {
57 cd $pkgbase-$pkgver/naemon-core
58
59 make check
60}
61
62package_naemon-core() {
63pkgdesc="System and network monitoring application"
64depends=('bash')
65optdepends=('logrotate'
66 'monitoring-plugins')
67backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg'
68 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg'
69 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg'
70 'etc/naemon/conf.d/templates/contacts.cfg'
71 'etc/naemon/conf.d/templates/hosts.cfg'
72 'etc/naemon/conf.d/templates/services.cfg'
73 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg'
74 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg')
75install=$pkgbase.install
76
77 cd $pkgbase-$pkgver
78
79 make DESTDIR="$pkgdir" install
80
81 chown -R 44:44 "$pkgdir"/var/{cache,log}/$pkgbase
82 chmod -R 770 "$pkgdir"/var/{cache,log}/$pkgbase
83
84 install -Dm644 "$srcdir"/$pkgbase.service \
85 "$pkgdir"/usr/lib/systemd/system/$pkgbase.service
86
87 # Remove init script
88 rm -rf "$pkgdir"/etc/init.d
89}
90
91package_naemon-livestatus() {
92pkgdesc="Standard API for Naemon"
93depends=('icu')
94
95 cd $pkgbase-$pkgver
96
97 make DESTDIR="$pkgdir" install-livestatus
98}
99
100package_naemon-thruk() {
101pkgdesc="Monitoring Webinterface for Naemon"
102depends=('gd' 'mariadb-clients' 'apache' 'mod_fcgid')
103backup=('etc/naemon/cgi.cfg' 'etc/naemon/htpasswd'
104 'etc/naemon/log4perl.conf' 'etc/naemon/menu_local.conf'
105 'etc/naemon/naglint.conf' 'etc/httpd/conf/extra/thruk.conf'
106 'etc/httpd/conf/extra/thruk_cookie_auth_vhost.conf'
107 'etc/naemon/thruk_local.conf' 'etc/naemon/thruk.conf'
108 'etc/naemon/conf.d/thruk_bp_generated.cfg'
109 'etc/naemon/conf.d/thruk_templates.cfg' 'etc/logrotate.d/thruk')
110
111 cd $pkgbase-$pkgver
112
113 make DESTDIR="$pkgdir" install-thruk
114
115 chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgbase
116 chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgbase
117
118 # Remove init script
119 rm -rf "$pkgdir"/etc/init.d
120}
diff --git a/naemon.install b/naemon.install
new file mode 100644
index 0000000..429505a
--- /dev/null
+++ b/naemon.install
@@ -0,0 +1,19 @@
1pre_install() {
2 getent group naemon &> /dev/null || groupadd -r naemon -g 44
3 getent passwd naemon &> /dev/null || useradd -r -u 44 -g naemon \
4 -d /var/lib/naemon -s /sbin/nologin -c "Naemon" naemon
5}
6
7pre_upgrade() {
8 pre_install
9}
10
11pre_remove() {
12 if [[ -f /run/naemon/naemon.pid ]]; then
13 systemctl stop naemon
14 fi
15}
16
17post_remove() {
18 userdel naemon
19}
diff --git a/naemon.service b/naemon.service
new file mode 100644
index 0000000..6b3edc8
--- /dev/null
+++ b/naemon.service
@@ -0,0 +1,18 @@
1[Unit]
2Description=Naemon Monitoring Daemon
3Documentation=http://naemon.org/documentation
4After=network.target
5
6[Service]
7Type=simple
8PIDFile=/run/naemon.pid
9ExecStartPre=/usr/bin/naemon -vp /etc/naemon/naemon.cfg
10ExecStart=/usr/bin/naemon /etc/naemon/naemon.cfg
11ExecReload=/bin/kill -HUP $MAINPID
12User=naemon
13Group=naemon
14StandardOutput=journal
15StandardError=inherit
16
17[Install]
18WantedBy=multi-user.target