aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/pnp4nagios/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/pnp4nagios/APKBUILD')
-rw-r--r--unmaintained/pnp4nagios/APKBUILD75
1 files changed, 75 insertions, 0 deletions
diff --git a/unmaintained/pnp4nagios/APKBUILD b/unmaintained/pnp4nagios/APKBUILD
new file mode 100644
index 0000000000..0f64a75f98
--- /dev/null
+++ b/unmaintained/pnp4nagios/APKBUILD
@@ -0,0 +1,75 @@
+# 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
+ 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"