aboutsummaryrefslogblamecommitdiffstats
path: root/main/nagios/APKBUILD
blob: 859a5b8c6ceb309221edb8737835f2e24a1b7ec7 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                    
            
        

                                 
          
               
              
                              
                                                          
                                                                         
                           

                    


                            
                            

                  
 
                                    








                                                                        

                       










                                                      

                                            


                                        


           
                       










                                                                               
                     

                                                
                                                                                             

 
                                                              
                                                     
                                              
                                              

                                                      
# Contributor: Carlo Landmeter <clandmeter at gmail>
# Maintainer: Carlo Landmeter <clandmeter at gmail>
pkgname=nagios
pkgver=3.2.3
pkgrel=6
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"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	cve-2011-1523.patch
	nagios.confd
	nagios.initd
	lighttpd-nagios.conf
	CVE-2012-6096.patch
	"
subpackages="${pkgname}-web"
pkgusers="nagios"
pkggroups="nagios"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	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 \
		--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
	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="fe1be46e6976a52acdb021a782b5d04b  nagios-3.2.3.tar.gz
1d55432308d049f2c0dbbbbe1322d83e  cve-2011-1523.patch
431dfe7403323e247a88b97beade5d78  nagios.confd
2ead8695b32222abe922692664aa9de1  nagios.initd
d63c36f47d26f1f71ae2faf272eec640  lighttpd-nagios.conf
22239c4df4d5e7f8e3aea19b276a9974  CVE-2012-6096.patch"