aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios/APKBUILD
blob: 8e85f7afd445178a993e8c2b56bdab91517e8e7e (plain)
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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=nagios
pkgver=3.5.1
pkgrel=1
pkgdesc="Popular monitoring tool"
url="http://www.nagios.org/"
arch="all"
license="GPL-2"
depends="perl"
install="$pkgname.pre-install"
makedepends="gd-dev perl-dev libpng-dev libjpeg perl-net-snmp"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	nagios.confd
	nagios.initd
	lighttpd-nagios.conf"
subpackages="${pkgname}-web"
pkgusers="nagios"
pkggroups="nagios"

_builddir="$srcdir/$pkgname"

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/nagios \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--datadir=/usr/share/nagios \
		--localstatedir=/var \
		--bindir=/usr/sbin \
		--sbindir=/usr/lib/nagios/cgi-bin \
		--datadir=/usr/share/nagios/htdocs \
		--libexecdir=/usr/lib/nagios/plugins \
		--localstatedir=/var/nagios \
		--with-nagios-user=nagios \
		--with-nagios-group=nagios \
		--enable-embedded-perl \
		--with-perlcache \
		|| return 1
	make all || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	make DESTDIR="$pkgdir" install-config
	make DESTDIR="$pkgdir" install-commandmode

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}


web() {
	#depends="php lighttpd"
	arch="noarch"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/share "$subpkgdir"/usr/
	install -m644 -D "$srcdir"/lighttpd-nagios.conf "$subpkgdir"/etc/lighttpd/nagios.conf
}

md5sums="9947ed3d220b4da86710884260d42856  nagios-3.5.1.tar.gz
431dfe7403323e247a88b97beade5d78  nagios.confd
0d3361cb4b84b8332d06ad6dddd41d1b  nagios.initd
d63c36f47d26f1f71ae2faf272eec640  lighttpd-nagios.conf"
sha256sums="ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99  nagios-3.5.1.tar.gz
cfd075243bfca803f4aa254022a0a40cd4180fb4d433e16333b74e7bcef8cf0b  nagios.confd
eac8c8b96e039a597effb5b17f9d7b098baa3dfea42f51e369f6f8506c147f16  nagios.initd
dba2583022f8d0e6c9457d3cb333f3ce872b9f1c11075bc69fccdf1bbb0e6083  lighttpd-nagios.conf"
sha512sums="48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d  nagios-3.5.1.tar.gz
8575902dcb7252f195847f9997b424c1ef9bee7dfacdd124c922fc119f583923c34847ce77c505783662d91f7290b1a85dc5e382ac50d177406bfb3876d4e40a  nagios.confd
a004ed1cf8e7d9faeb849cd714095dbe5157c707618d2cce92c98c78604b896bb806b55aa69b2db8ca3e954bd629f9e3db5d2676015f87d6be5da32fa9ec5664  nagios.initd
6f1448db1964e378dbc7460a6d321638f4d0f7a08bc078824edca12fb6653fb0200b3be365fa519e7b2ff566802701878975bb97e65d65dc54d3da34dae21588  lighttpd-nagios.conf"