# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=nagios pkgver=3.5.0 pkgrel=3 pkgdesc="Popular monitoring tool" url="http://www.nagios.org/" arch="all" license="GPL-2" depends="perl" install="$pkgname.pre-install" makedepends="gd-dev pkgconfig 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" 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="aeef195d2033cc362bf6cb972bcc8f07 nagios-3.5.0.tar.gz 431dfe7403323e247a88b97beade5d78 nagios.confd 2ead8695b32222abe922692664aa9de1 nagios.initd d63c36f47d26f1f71ae2faf272eec640 lighttpd-nagios.conf" sha256sums="469381b2954392689c85d3db733e8da4bd43b806b3d661d1a7fbd52dacc084db nagios-3.5.0.tar.gz cfd075243bfca803f4aa254022a0a40cd4180fb4d433e16333b74e7bcef8cf0b nagios.confd e287556e9c73faf60f988a75866119596352e4fb8fe132a887f45f2930a6ae46 nagios.initd dba2583022f8d0e6c9457d3cb333f3ce872b9f1c11075bc69fccdf1bbb0e6083 lighttpd-nagios.conf" sha512sums="80f79b85b286dcd4153bff134fd7b88a46ef130a39c17e2263c7e3614a507be0e630e62032f31500c18c920c856e2f4f4e4ebd4c94bb3024b203a9bb744584b4 nagios-3.5.0.tar.gz 8575902dcb7252f195847f9997b424c1ef9bee7dfacdd124c922fc119f583923c34847ce77c505783662d91f7290b1a85dc5e382ac50d177406bfb3876d4e40a nagios.confd 2b7c9677e15b1e33a56b6d65ce6c489e019ddf2d777c3798a7b3082e61584ca4cd2630cdf177710b38f2780873dd0f2333e3e769633e402332043a129137d50b nagios.initd 6f1448db1964e378dbc7460a6d321638f4d0f7a08bc078824edca12fb6653fb0200b3be365fa519e7b2ff566802701878975bb97e65d65dc54d3da34dae21588 lighttpd-nagios.conf"