1 # Maintainer: Idares <idares@seznam.cz>
6 pkgdesc="Nagios is an open source host, service and network monitoring program."
9 url="http://www.nagios.org"
10 depends=('gd' 'freetype2' 'libtool' 'glib2')
11 source=("http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz" "rc.nagios" "nagios.install")
12 backup=('etc/httpd/conf/extra/nagios.conf')
13 install='nagios.install'
16 _nagios_group="nagios"
17 _instdir="usr/share/nagios"
21 _httpdconfdir="etc/httpd/conf/extra"
22 _checkresultdir="var/nagios/spool/checkresults"
23 _perldir="$_instdir/bin"
25 getent group $_nagios_group > /dev/null || _nagios_group=30
26 getent passwd $_nagios_user > /dev/null || _nagios_user=30
32 --with-nagios-user=$_nagios_user \
33 --with-nagios-group=$_nagios_group \
34 --prefix="/$_instdir" \
35 --bindir="/$_bindir" \
36 --localstatedir="/$_vardir" \
37 --sysconfdir="/$_confdir" \
38 --with-httpd-conf="/$_httpdconfdir" \
39 --with-checkresultdir="/$_checkresultdir" \
40 --enable-embedded-perl
48 # Fix install-html Make target
49 sed -i 's:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g' ./html/Makefile
50 sed -i 's:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g' ./html/Makefile
53 prefix=$pkgdir/$_instdir \
54 BINDIR=$pkgdir/$_bindir \
55 LOGDIR=$pkgdir/$_vardir \
56 CFGDIR=$pkgdir/$_confdir \
57 HTTPD_CONF=$pkgdir/$_httpdconfdir \
58 CHECKRESULTDIR=$pkgdir/$_checkresultdir \
59 install install-config
61 install -D -m 755 daemon-init $pkgdir/etc/nagios/
62 install -D -m 755 $srcdir/rc.nagios $pkgdir/etc/rc.d/nagios
63 install -D -m 644 sample-config/httpd.conf $pkgdir/$_httpdconfdir/nagios.conf
65 mkdir $pkgdir/var/nagios/rw
66 chown $_nagios_user.$_nagios_group $pkgdir/var/nagios/rw
67 chmod 755 $pkgdir/var/nagios/rw
69 find $pkgdir/etc/nagios -name '*cfg' -exec mv "{}" "{}.sample" \; > /dev/null
71 mkdir -p -m 755 $pkgdir/$_perldir
72 mv $pkgdir/$_bindir/p1.pl $pkgdir/$_perldir/
73 sed -i "s:^p1_file=.*:p1_file=/$_perldir/p1.pl:" $pkgdir/etc/nagios/nagios.cfg.sample
76 md5sums=('c935354ce0d78a63bfabc3055fa77ad5'
77 'c5c98b2e609794c6ab2622dcf01ba373'
78 '17f2610a9d07a236eb541c92f18470b1')
79 sha1sums=('7b2523de0dacb51b5162dd53fc4c909397800125'
80 '73614f71041fecb0670f2d9ac118c01660d01e5b'
81 'f5ef0df7e673982493601de3dd55b01d2bd11c7d')