summaryrefslogtreecommitdiffstats
path: root/testing/pnp4nagios/APKBUILD
diff options
context:
space:
mode:
authorPeter de Zoeten <peter@dezoeten.mine.nu>2011-11-16 12:54:36 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-11-16 12:31:38 +0000
commit7081d24228a151738d53941e07071c8ed24839fb (patch)
treed7d1f396ed0e8bfe8c98269d70de7538d08c119b /testing/pnp4nagios/APKBUILD
parent8b400bec2ff24c792104be87bce6f6ee50c91463 (diff)
downloadaports-7081d24228a151738d53941e07071c8ed24839fb.tar.bz2
aports-7081d24228a151738d53941e07071c8ed24839fb.tar.xz
PNP4Nagios Nagios Graphing Utility
more info: http://www.pnp4nagios.org Remember to look at /etc/pnp4nagios/npcd.cfg for the correct paths And look at /etc/lighttpd/pnp4nagios.conf.sample
Diffstat (limited to 'testing/pnp4nagios/APKBUILD')
-rw-r--r--testing/pnp4nagios/APKBUILD76
1 files changed, 76 insertions, 0 deletions
diff --git a/testing/pnp4nagios/APKBUILD b/testing/pnp4nagios/APKBUILD
new file mode 100644
index 000000000..f08d322e0
--- /dev/null
+++ b/testing/pnp4nagios/APKBUILD
@@ -0,0 +1,76 @@
+# Contributor: Peter de Zoeten <peter@dezoeten.mine.nu>
+# Maintainer: Peter de Zoeten <peter@dezoeten.mine.nu>
+pkgname=pnp4nagios
+pkgver=0.6.15
+pkgrel=0
+pkgdesc="PNP4Nagios"
+url="http://www.pnp4nagios.org"
+arch="all"
+license="GPL"
+depends="nagios perl-time-hires perl-rrd php-zlib"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/pnp4nagios/files/PNP-0.6/pnp4nagios-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr/share/webapps/pnp4nagios \
+ --exec-prefix=/usr \
+ --libexecdir=/usr/lib/pnp4nagios \
+ --sysconfdir=/etc/pnp4nagios \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var/run \
+ --datarootdir=/usr/share/webapps/pnp4nagios \
+ --with-perfdata-logfile=/var/pnp4nagios/perfdata/process_perfdata.pl \
+ --with-perfdata-dir=/var/pnp4nagios/perfdata \
+ --with-perfdata-spool-dir=/var/pnp4nagios/perfdata/spool \
+ || return 1
+ make all || return 1
+}
+doc() {
+ arch="noarch"
+ # Man pages
+ mkdir -p "$subpkgdir"/usr/share/man || return 1
+ mv "$pkgdir"/usr/share/webapps/pnp4nagios/man/man* "$subpkgdir"/usr/share/man/ \
+ || return 1
+
+ # Doc files
+ _docs="INSTALL README"
+ for _doc in $_docs; do
+ install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+ rmdir "$pkgdir"/usr/share/webapps/pnp4nagios/man
+}
+
+package() {
+ cd "$_builddir"
+ make fullinstall DESTDIR="$pkgdir" || return 1
+ mkdir -p "$pkgdir"/usr/share/nagios/htdocs/ssi
+ rm -f "$pkgdir"/usr/lib/*.la
+ cp "$_builddir"/contrib/ssi/status-header.ssi "$pkgdir"/usr/share/nagios/htdocs/ssi/status-header.ssi
+# rm -rf "$pkgdir"/etc/httpd
+ mkdir -p "$pkgdir"/etc/lighttpd
+ cp "$_builddir"/sample-config/lighttpd.pnp4nagios.conf "$pkgdir"/etc/lighttpd/pnp4nagios.conf.sample
+ install -D -m644 ../../npcd.cfg "$pkgdir"/etc/pnp4nagios/npcd.cfg
+ rm -f "$pkgdir"/etc/init.d/npcd
+ install -D -m755 ../../npcd "$pkgdir"/etc/init.d/npcd
+ chown nagios.nagios "$pkgdir"/var/pnp4nagios
+}
+
+
+md5sums="27cdab96510e15cfa0f4b7c2bf15dd2b pnp4nagios-0.6.15.tar.gz"