diff options
author | Jonathan Steel <jsteel@archlinux.org> | 2015-06-08 18:37:33 +0100 |
---|---|---|
committer | Jonathan Steel <jsteel@archlinux.org> | 2015-06-08 18:37:33 +0100 |
commit | 403b591f0104d36ebd13eaddf6da2263941b8eae (patch) | |
tree | f924d70713ef8ef03283585c9a894445aa7c90af /PKGBUILD | |
download | AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.gz AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.tar.zst AUR-403b591f0104d36ebd13eaddf6da2263941b8eae.zip |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 120 |
1 files changed, 120 insertions, 0 deletions
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 | |||
3 | pkgbase=naemon | ||
4 | pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk') | ||
5 | pkgver=1.0.3 | ||
6 | pkgrel=1 | ||
7 | arch=('i686' 'x86_64') | ||
8 | url="http://naemon.org" | ||
9 | license=('GPL2') | ||
10 | makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients') | ||
11 | source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz | ||
12 | $pkgbase.service) | ||
13 | md5sums=('0d6873669bd44375978c97174529e258' | ||
14 | 'd6a77534e612e8f65ff3360336faec77') | ||
15 | |||
16 | prepare() { | ||
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 | |||
24 | build() { | ||
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 | |||
56 | check() { | ||
57 | cd $pkgbase-$pkgver/naemon-core | ||
58 | |||
59 | make check | ||
60 | } | ||
61 | |||
62 | package_naemon-core() { | ||
63 | pkgdesc="System and network monitoring application" | ||
64 | depends=('bash') | ||
65 | optdepends=('logrotate' | ||
66 | 'monitoring-plugins') | ||
67 | backup=('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') | ||
75 | install=$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 | |||
91 | package_naemon-livestatus() { | ||
92 | pkgdesc="Standard API for Naemon" | ||
93 | depends=('icu') | ||
94 | |||
95 | cd $pkgbase-$pkgver | ||
96 | |||
97 | make DESTDIR="$pkgdir" install-livestatus | ||
98 | } | ||
99 | |||
100 | package_naemon-thruk() { | ||
101 | pkgdesc="Monitoring Webinterface for Naemon" | ||
102 | depends=('gd' 'mariadb-clients' 'apache' 'mod_fcgid') | ||
103 | backup=('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 | } | ||