summaryrefslogtreecommitdiffstats
path: root/main/nagios/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/nagios/APKBUILD')
-rw-r--r--main/nagios/APKBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/main/nagios/APKBUILD b/main/nagios/APKBUILD
new file mode 100644
index 000000000..37ac05db4
--- /dev/null
+++ b/main/nagios/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Carlo Landmeter <clandmeter at gmail>
+# Maintainer: Carlo Landmeter <clandmeter at gmail>
+pkgname=nagios
+pkgver=3.2.1
+pkgrel=1
+pkgdesc="Popular monitoring tool"
+url="http://www.nagios.org/"
+license="GPL-2"
+depends="perl"
+makedepends="gd-dev pkgconfig perl-dev"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+nagios.confd
+nagios.initd
+lighttpd-nagios.conf"
+subpackages="${pkgname}-web"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./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=nobody \
+ --with-nagios-group=nobody \
+ --enable-embedded-perl \
+ --with-perlcache
+ make all || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ 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="d4655ee8c95c9679fd4fd53dac34bbe3 nagios-3.2.1.tar.gz
+431dfe7403323e247a88b97beade5d78 nagios.confd
+2ead8695b32222abe922692664aa9de1 nagios.initd
+d63c36f47d26f1f71ae2faf272eec640 lighttpd-nagios.conf"