-MD5 37a348177b4d8deda4fd0eef01439781 ChangeLog 10669
+MD5 bdd92ee912ffe38ad978a2e540fb7c49 ChangeLog 11323
MD5 bb0bc884a0383e5be0a4bae6cba836dc metadata.xml 1049
+MD5 4eb11e1fa400659baf1cdae2c72bfcf3 nagios-core-1.3.ebuild 7484
MD5 92fb214ff93f5f66c997ea1b00fab6c5 nagios-core-1.2-r4.ebuild 7183
-MD5 dbd0b333806191c66e82ecdc6803d2de nagios-core-2.0b_p1.ebuild 5835
-MD5 fb8d04b5d7ad9b1a9cb4e2b618e26c59 nagios-core-2.0b_p2.ebuild 5866
+MD5 9b7730eb90dcc98a0cdbf0d24cfd5982 nagios-core-2.0b_p5.ebuild 5972
MD5 af171cb84450787a92481d9d3b7e132b nagios-core-2.0b_p4.ebuild 5866
-MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767
MD5 673bda0ac6ab9230d23331e7f3846b7b files/99_nagios.conf 350
MD5 565ce2a690d50aeb542e7afe44b8c733 files/Makefile-distclean.diff.bz2 1133
+MD5 f83fb59efe215d8191866a95685b4b39 files/nagios 1416
+MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767
+MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r4 63
+MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362
MD5 f2947dec6b9a839da79606bcc394036b files/conf.d 409
MD5 6b679390ce57974a0f69145e0918372f files/nagios-2.0b.cfg-sample.gz 8990
MD5 faad55511f21831997f9150547aa4e7d files/nagios.cfg-sample.gz 7224
-MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r4 63
-MD5 aa5bb53aee1f5609395e8184f2eff4a6 files/digest-nagios-core-2.0b_p1 65
-MD5 19566d92e4989244216c7fb6d19d688c files/digest-nagios-core-2.0b_p2 65
-MD5 d062be8c632fbfa88dd1194e0bea2abf files/nagios 1389
-MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362
MD5 cee7d66cc61be3558af44ab177d99e1f files/submit_check_result_via_nsca.patch 585
MD5 7a96e80dbe17f26441d3266662b58a51 files/digest-nagios-core-2.0b_p4 65
+MD5 484d128eff6e79cfcb09e37a92e1926f files/digest-nagios-core-1.3 63
+MD5 c6cc963b6a3cc45558ebbc5890908bb0 files/digest-nagios-core-2.0b_p5 65
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p1.ebuild,v 1.7 2005/10/15 23:22:12 soulse Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-1.3.ebuild,v 1.1 2005/11/19 23:07:46 ramereth Exp $
inherit eutils apache-module toolchain-funcs
-MY_P=${PN/-core}-${PV/_p}
+MY_P=${P/-core}
DESCRIPTION="Nagios Core - Check daemon, CGIs, docs"
HOMEPAGE="http://www.nagios.org/"
SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz"
+RESTRICT="nomirror"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~x86 ~sparc ~ppc ~amd64"
-IUSE="noweb perl debug apache2"
-# mysql postgres
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="noweb mysql postgres perl debug apache2"
+
DEPEND="virtual/mailx
!noweb? (
>=media-libs/jpeg-6b-r3
>=media-libs/libpng-1.2.5-r4
>=media-libs/gd-1.8.3-r5
${NEED_APACHE_DEPEND}
- perl? ( net-analyzer/traceroute )
)
- perl? ( >=dev-lang/perl-5.6.1-r7 )"
+ perl? ( >=dev-lang/perl-5.6.1-r7 )
+ mysql? ( >=dev-db/mysql-3.23.56 )
+ postgres? ( !mysql? ( >=dev-db/postgresql-7.3.2 ) )"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
# If there's a gd lib on the system, it will try to build with it.
# check if gdlib-config is on, and then check its output.
- if [[ -x ${ROOT}usr/bin/gdlib-config ]]; then
- if [[ ! $(${ROOT}usr/bin/gdlib-config --libs | grep -- -ljpeg) ]]; then
+ if [[ -x /usr/bin/gdlib-config ]]; then
+ if [[ ! $(gdlib-config --libs | grep -- -ljpeg) ]]; then
eerror "Your gd has been compiled without jpeg support."
eerror "Please re-emerge gd:"
eerror "# USE="jpeg" emerge gd"
die "pkg_setup failed"
fi
fi
+
+ enewgroup nagios
+
+ if use noweb; then
+ enewuser nagios -1 /bin/bash /dev/null nagios
+ else
+ enewuser nagios -1 /bin/bash /dev/null apache
+ usermod -G apache nagios
+ fi
}
src_unpack() {
unpack ${A}
cd ${S}
- epatch ${FILESDIR}/2.x-series-nsca.patch
- gunzip -c ${FILESDIR}/nagios-2.0b.cfg-sample.gz > ./nagios.cfg-sample
+
+ epatch ${FILESDIR}/Makefile-distclean.diff.bz2
+
+ # libpq-fe.h isnt in psgql/
+ cd xdata/
+ sed -i -e "s:pgsql/::" *.c
+
+ cp ${FILESDIR}/nagios.cfg-sample.gz ./
+ gunzip nagios.cfg-sample.gz
}
src_compile() {
local myconf
- if use perl
- then
- myconf="${myconf} --enable-embedded-perl --with-perlcache"
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "Using MySQL as default."
+
+ has_version ">=sys-apps/portage-2.0.50" && (
+ einfo "You can add -"
+ echo
+ einfo "net-analyzer/nagios-core [use flags]"
+ echo
+ einfo "to /etc/portage/package.use to permanently set this package's USE flags"
+ einfo "More info on package.use is available on:"
+ einfo " man 5 portage"
+ )
+ elif use postgres ; then
+ myconf="${myconf} \
+ --with-pgsql-xdata \
+ --with-pgsql-status \
+ --with-pgsql-comments \
+ --with-pgsql-extinfo \
+ --with-pgsql-retention \
+ --with-pgsql-downtime"
+
+ if [ -r /usr/include/postgresql/libpq-fe.h ] ; then
+ myconf="${myconf} --with-pgsql-inc=/usr/include/postgresql"
+ fi
fi
+ use mysql && myconf="${myconf} \
+ --with-file-perfdata \
+ --with-template-extinfo \
+ --with-mysql-xdata \
+ --with-mysql-status \
+ --with-mysql-comments \
+ --with-mysql-retention \
+ --with-mysql-downtime"
+
+ use perl && myconf="${myconf} \
+ --enable-embedded-perl \
+ --with-perlcache"
+
if use debug; then
myconf="${myconf} --enable-DEBUG0"
myconf="${myconf} --enable-DEBUG1"
--mandir=/usr/share/man \
${myconf} || die "./configure failed"
- emake CC=$(tc-getCC) nagios contrib || die "make failed"
+ make CC=$(tc-getCC) DESTDIR=${D} nagios contrib || die "make failed"
if use !noweb ; then
# Only compile the CGI's if "noweb" useflag is not set.
make CC=$(tc-getCC) DESTDIR=${D} cgis || die
fi
- # convert config files
- emake -C contrib convertcfg || "config convert died"
-
+ emake -C contrib all || "contrib make filed"
}
src_install() {
- dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING
+ dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING contrib/htaccess.sample
+ docinto contrib
+ dodoc contrib/README
if use noweb; then
- sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \
- -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' \
- Makefile
+ sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
+ sed -i -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile
fi
- sed -i -e 's/^contactgroups$//g' Makefile
-
make DESTDIR=${D} install
make DESTDIR=${D} install-config
make DESTDIR=${D} install-commandmode
dodoc ${D}/etc/nagios/*
rm ${D}/etc/nagios/*
- dodoc ${S}/nagios.cfg-sample
+ # contribs are not configured by the configure script, we'll configure them overselves...
+ find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
+ s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
+ s:/usr/local/nagios/etc:/etc/nagios:;
+ s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
+
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/database contrib/eventhandlers
exeinto /etc/init.d
doexe ${FILESDIR}/nagios
insinto /etc/conf.d
newins ${FILESDIR}/conf.d nagios
-
- rm ${S}/contrib/Makefile* ${S}/contrib/*.c ${S}/contrib/*.h
-
- #contribs are not configured by the configure script, we'll configure them overselves...
- find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
- s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
- s:/usr/local/nagios/etc:/etc/nagios:;
- s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
-
- mv contrib/ ${D}usr/nagios
-
- for dir in etc/nagios usr/nagios var/nagios usr/nagios/contrib
- do
- chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ chmod 644 ${S}/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin $bin
done
- #Apache Module
+ # Apache Module
if use !noweb; then
if use apache2; then
insinto ${APACHE2_MODULES_CONFDIR}
doins ${FILESDIR}/nagios.conf
fi
if use perl; then
- mv ${D}usr/nagios/contrib/traceroute.cgi ${D}usr/nagios/sbin
- fperms a+x /usr/nagios/sbin/traceroute.cgi
+ into /usr/nagios
+ for cgi in `find contrib/ -name "*.cgi" -maxdepth 1` ; do
+ dosbin $cgi
+ done
fi
fi
+
+ for dir in etc/nagios usr/nagios var/nagios ; do
+ chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ done
+
}
pkg_preinst() {
keepdir /usr/nagios/share/ssi
keepdir /var/nagios/rw
- enewgroup nagios
-
if use noweb; then
- enewuser nagios -1 /bin/bash /dev/null nagios
- chown -R nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ chown nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
else
- enewuser nagios -1 /bin/bash /dev/null apache
- usermod -G apache nagios
- chown -R nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
+ chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
fi
- chmod ug+s ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 2750 ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
}
pkg_postinst() {
einfo "Thank you!"
fi
+ if use mysql && use postgres; then
+ ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time."
+ ewarn "as a default, MySQL support was built."
+ ewarn "To build nagios with PostgreSQL you'll have to emerge nagios without the mysql useflag."
+ fi
+
+ einfo
+ einfo "If you are using distributed monitoring, check the contrib scripts."
+ einfo "configure the central nagios server for the nsca in /etc/conf.d/nagios."
einfo
einfo "If your kernel has /proc protection, nagios"
einfo "will not be happy as it relies on accessing the proc"
einfo "filesystem. You can fix this by adding nagios into"
einfo "the group wheel, but this is not recomended."
einfo
-
- einfo
- ewarn "Use /usr/nagios/contrib/convertcfg for configuration file conversion"
- einfo
}
pkg_prerm() {
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p2.ebuild,v 1.7 2005/10/15 23:22:12 soulse Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p5.ebuild,v 1.1 2005/11/19 23:07:46 ramereth Exp $
inherit eutils apache-module toolchain-funcs
--mandir=/usr/share/man \
${myconf} || die "./configure failed"
- emake CC=$(tc-getCC) nagios contrib || die "make failed"
+ emake CC=$(tc-getCC) nagios || die "make failed"
if use !noweb ; then
# Only compile the CGI's if "noweb" useflag is not set.
make CC=$(tc-getCC) DESTDIR=${D} cgis || die
fi
- # convert config files
- emake -C contrib convertcfg || "config convert died"
+ emake -C contrib all || "contrib make filed"
}
src_install() {
dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING
+ docinto contrib
+ dodoc contrib/README
if use noweb; then
sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \
dodoc ${S}/nagios.cfg-sample
- exeinto /etc/init.d
- doexe ${FILESDIR}/nagios
-
- insinto /etc/conf.d
- newins ${FILESDIR}/conf.d nagios
-
-
- rm ${S}/contrib/Makefile* ${S}/contrib/*.c ${S}/contrib/*.h
-
#contribs are not configured by the configure script, we'll configure them overselves...
find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
s:/usr/local/nagios/etc:/etc/nagios:;
s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
- mv contrib/ ${D}usr/nagios
+ insinto /usr/share/doc/${PF}/contrib
+ doins -r contrib/eventhandlers
- for dir in etc/nagios usr/nagios var/nagios usr/nagios/contrib
- do
- chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ exeinto /etc/init.d
+ doexe ${FILESDIR}/nagios
+
+ insinto /etc/conf.d
+ newins ${FILESDIR}/conf.d nagios
+
+ chmod 644 ${S}/contrib/*.cgi
+ into /usr/nagios
+ for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
+ dobin $bin
done
- #Apache Module
+ # Apache Module
if use !noweb; then
if use apache2; then
insinto ${APACHE2_MODULES_CONFDIR}
doins ${FILESDIR}/nagios.conf
fi
if use perl; then
- mv ${D}usr/nagios/contrib/traceroute.cgi ${D}usr/nagios/sbin
- fperms a+x /usr/nagios/sbin/traceroute.cgi
+ into /usr/nagios ; dosbin contrib/traceroute.cgi
fi
fi
+
+ for dir in etc/nagios usr/nagios var/nagios ; do
+ chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}"
+ done
}
pkg_preinst() {
fi
chmod ug+s ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
+ chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
}
pkg_postinst() {