# Copyright 2000-2002 Achim Gottinger # Distributed under the GPL by Gentoo Technologies, Inc. # $Header: /home/cvsroot/gentoo-x86/net-analyzer/nessus/nessus-1.2.2-r1.ebuild,v 1.2 2002/07/18 23:22:50 seemant Exp $ S=${WORKDIR}/${P/_beta/b} DESCRIPTION="Network hosts and services monitor for Linux" HOMEPAGE="http://www.nagios.org/" SRC_URI="http://twtelecom.dl.sourceforge.net/sourceforge/${PN}/${P/_beta/b}.tar.gz" DEPEND="net-www/apache >=media-libs/jpeg-6b media-libs/libpng sys-apps/textutils sys-apps/gawk sys-apps/grep sys-apps/shadow gd? =media-libs/libgd-1.8 #mysql? dev-db/mysql " SLOT="0" LICENSE="GPL-2" KEYWORDS="x86 ppc" src_compile() { local myconf use gd \ && myconf="${myconf} --with-gd-inc=/usr/include --with-gd-lib=/usr/lib" \ || myconf="${myconf}" use mysql \ && myconf="${myconf} --with-mysql-xdata --with-mysql-status --with-mysql-comments --with-mysql-extinfo --with-mysql-retention --with-mysql-downtime" \ || myconf="${myconf} --with-default-status --with-default-comments --with-default-perfdata --with-default-retention --with-default-objects --with-default-downtime --with-default-extinfo" ./configure \ --with-cgiurl=/nagios/cgi-bin \ --with-htmurl=/nagios \ --with-lockfile=/var/run/nagios.pid \ --with-nagios-user=nagios \ --with-nagios-grp=nagios \ --with-command-user=apache \ --with-command-grp=apache \ --prefix=/usr \ --exec-prefix=/usr/sbin \ --bindir=/usr/sbin \ --sbindir=/usr/lib/nagios/cgi \ --libexecdir=/usr/lib/nagios/plugins \ --mandir=/usr/share/man \ --datadir=/usr/share/nagios \ --sysconfdir=/etc/nagios \ --localstatedir=/var/log/nagios \ --with-init-dir=/etc/init.d \ --with-perlcache \ --enable-embedded-perl \ ${myconf} || die "Configure failed" make all || die "Compile failed nagios." cd ${S}/contrib make || die "Compile failed nagios contribs." } src_install() { cd ${S} make \ prefix=${D}/usr \ exec_prefix=i${D}/usr/sbin \ LOGDIR=${D}/var/log/nagios \ CFGDIR=${D}/etc/nagios \ BINDIR=${D}/usr/sbin \ CGIDIR=${D}/usr/lib/nagios/cgi \ HTMLDIR=${D}/usr/share/nagios \ INIT_DIR=${D}/etc/init.d \ fullinstall install-config install-commandmode || die "Install failed nagios." mv ${S}/contrib/htaccess.sample ${S}/nagios-apache.conf insinto /etc/nagios doins ${S}/nagios-apache.conf insinto /etc/nagios/template-object insopts "-o nagios -g nagios -m644" doins ${S}/sample-config/template-object/*.cfg exeinto /etc/init.d newexe ${FILESDIR}/nagios cd ${S}/contrib make \ prefix=${D}/usr \ exec_prefix=i${D}/usr/sbin \ LOGDIR=${D}/var/log/nagios \ CFGDIR=${D}/etc/nagios \ BINDIR=${D}/usr/sbin \ CGIDIR=${D}/usr/lib/nagios/cgi \ HTMLDIR=${D}/usr/share/nagios \ INIT_DIR=${D}/etc/init.d \ INSTALL=install \ INSTALL_OPTS="" \ COMMAND_OPTS="" \ CGIDIR=${D}/usr/lib/nagios/cgi install || die "Install contribs failed." cd ${S}/sample-config mv nagios.cfg nagios.tmp sed -e 's=/var/log/nagios/rw/=/var/spool/nagios/=' nagios.tmp > nagios.cfg cd ${S} dodoc README* INSTALLING UPGRADING LICENSE }