diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 103 |
1 files changed, 35 insertions, 68 deletions
@@ -1,28 +1,36 @@ | |||
1 | # Maintainer: Jonathan Steel <jsteel at archlinux.org> | 1 | # Maintainer: Jonathan Steel <jsteel at archlinux.org> |
2 | 2 | ||
3 | pkgbase=naemon | 3 | pkgname=naemon |
4 | pkgname=('naemon-core' 'naemon-livestatus' 'naemon-thruk') | 4 | pkgver=1.0.6 |
5 | pkgver=1.0.4 | ||
6 | pkgrel=1 | 5 | pkgrel=1 |
6 | pkgdesc="System and network monitoring application" | ||
7 | arch=('i686' 'x86_64') | 7 | arch=('i686' 'x86_64') |
8 | url="http://naemon.org" | 8 | url="http://naemon.org" |
9 | license=('GPL2') | 9 | license=('GPL2') |
10 | makedepends=('gperf' 'rsync' 'gd' 'mariadb-clients' 'help2man') | 10 | depends=('bash' 'icu') |
11 | source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgbase-$pkgver.tar.gz | 11 | optdepends=('logrotate' |
12 | $pkgbase.service) | 12 | 'thruk: Web interface for Naemon' |
13 | md5sums=('f0d5b8ce43debf78e82994c7ad995d57' | 13 | 'monitoring-plugins') |
14 | makedepends=('gperf' 'help2man') | ||
15 | provides=('naemon-core' 'naemon-livestatus') | ||
16 | conflicts=('naemon-core' 'naemon-livestatus') | ||
17 | replaces=('naemon-core' 'naemon-livestatus') | ||
18 | source=(http://labs.consol.de/naemon/release/v$pkgver/src/$pkgname-$pkgver.tar.gz | ||
19 | $pkgname.service) | ||
20 | md5sums=('6c9b95a737a8f232e114f4cff200ff92' | ||
14 | 'd6a77534e612e8f65ff3360336faec77') | 21 | 'd6a77534e612e8f65ff3360336faec77') |
15 | 22 | backup=('etc/logrotate.d/naemon' 'etc/naemon/conf.d/commands.cfg' | |
16 | prepare() { | 23 | 'etc/naemon/conf.d/contacts.cfg' 'etc/naemon/conf.d/localhost.cfg' |
17 | cd $pkgbase-$pkgver | 24 | 'etc/naemon/conf.d/printer.cfg' 'etc/naemon/conf.d/switch.cfg' |
18 | 25 | 'etc/naemon/conf.d/templates/contacts.cfg' | |
19 | # Break up the install process so we can package the separate components | 26 | 'etc/naemon/conf.d/templates/hosts.cfg' |
20 | sed -i '51iinstall-livestatus:' Makefile | 27 | 'etc/naemon/conf.d/templates/services.cfg' |
21 | sed -i '53iinstall-thruk:' Makefile | 28 | 'etc/naemon/conf.d/timeperiods.cfg' 'etc/naemon/conf.d/windows.cfg' |
22 | } | 29 | 'etc/naemon/naemon.cfg' 'etc/naemon/resource.cfg') |
30 | install=$pkgname.install | ||
23 | 31 | ||
24 | build() { | 32 | build() { |
25 | cd $pkgbase-$pkgver | 33 | cd $pkgname-$pkgver |
26 | 34 | ||
27 | ./configure --prefix=/usr \ | 35 | ./configure --prefix=/usr \ |
28 | --bindir=/usr/bin \ | 36 | --bindir=/usr/bin \ |
@@ -54,67 +62,26 @@ build() { | |||
54 | } | 62 | } |
55 | 63 | ||
56 | check() { | 64 | check() { |
57 | cd $pkgbase-$pkgver/naemon-core | 65 | cd $pkgname-$pkgver/naemon-core |
58 | 66 | ||
59 | make check | 67 | make check |
60 | } | 68 | } |
61 | 69 | ||
62 | package_naemon-core() { | 70 | package() { |
63 | pkgdesc="System and network monitoring application" | 71 | cd $pkgname-$pkgver |
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 | 72 | ||
79 | make DESTDIR="$pkgdir" install | 73 | make DESTDIR="$pkgdir" install |
80 | 74 | ||
81 | chown -R 44:44 "$pkgdir"/var/{cache,log}/$pkgbase | 75 | install -d "$pkgdir"/etc/naemon/module-conf.d |
82 | chmod -R 770 "$pkgdir"/var/{cache,log}/$pkgbase | 76 | install -d "$pkgdir"/var/lib/naemon |
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 | 77 | ||
113 | make DESTDIR="$pkgdir" install-thruk | 78 | chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgname |
79 | chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgname | ||
114 | 80 | ||
115 | chown -R 44:44 "$pkgdir"/var/{cache,lib,log}/$pkgbase | 81 | install -Dm644 "$srcdir"/$pkgname.service \ |
116 | chmod -R 770 "$pkgdir"/var/{cache,lib,log}/$pkgbase | 82 | "$pkgdir"/usr/lib/systemd/system/$pkgname.service |
117 | 83 | ||
118 | # Remove init script | 84 | # Remove non-Arch directories |
119 | rm -rf "$pkgdir"/etc/init.d | 85 | rm -rf "$pkgdir"/etc/init.d |
86 | rm -rf "$pkgdir"/etc/apache2 | ||
120 | } | 87 | } |