aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios/APKBUILD
blob: 1194b98bc6e5f14403b0567d1b3176ad9433d473 (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
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Carlo Landmeter <clandmeter at gmail>
pkgname=nagios
pkgver=3.2.2
pkgrel=1
pkgdesc="Popular monitoring tool"
url="http://www.nagios.org/"
license="GPL-2"
depends="perl"
install="$pkgname.pre-install"
makedepends="gd-dev pkgconfig perl-dev libpng-dev libjpeg"
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-$pkgver"

build() {
	cd "$_builddir"
	./configure --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
	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"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/share "$subpkgdir"/usr/
	install -m644 -D "$srcdir"/lighttpd-nagios.conf "$subpkgdir"/etc/lighttpd/nagios.conf
}

md5sums="e73004f401bfd680631ba900b5a8e60a  nagios-3.2.2.tar.gz
431dfe7403323e247a88b97beade5d78  nagios.confd
2ead8695b32222abe922692664aa9de1  nagios.initd
d63c36f47d26f1f71ae2faf272eec640  lighttpd-nagios.conf"