# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=nagios pkgver=3.5.1 pkgrel=0 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 2ead8695b32222abe922692664aa9de1 nagios.initd d63c36f47d26f1f71ae2faf272eec640 lighttpd-nagios.conf" sha256sums="ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 nagios-3.5.1.tar.gz cfd075243bfca803f4aa254022a0a40cd4180fb4d433e16333b74e7bcef8cf0b nagios.confd e287556e9c73faf60f988a75866119596352e4fb8fe132a887f45f2930a6ae46 nagios.initd dba2583022f8d0e6c9457d3cb333f3ce872b9f1c11075bc69fccdf1bbb0e6083 lighttpd-nagios.conf" sha512sums="48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d nagios-3.5.1.tar.gz 8575902dcb7252f195847f9997b424c1ef9bee7dfacdd124c922fc119f583923c34847ce77c505783662d91f7290b1a85dc5e382ac50d177406bfb3876d4e40a nagios.confd 2b7c9677e15b1e33a56b6d65ce6c489e019ddf2d777c3798a7b3082e61584ca4cd2630cdf177710b38f2780873dd0f2333e3e769633e402332043a129137d50b nagios.initd 6f1448db1964e378dbc7460a6d321638f4d0f7a08bc078824edca12fb6653fb0200b3be365fa519e7b2ff566802701878975bb97e65d65dc54d3da34dae21588 lighttpd-nagios.conf"