1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/pnp4nagios/pnp4nagios-0.6.24.ebuild,v 1.5 2014/11/10 13:51:44 ago Exp $
7 inherit depend.apache eutils
9 DESCRIPTION="A performance data analyzer for nagios"
10 HOMEPAGE="http://www.pnp4nagios.org"
11 SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
16 KEYWORDS="amd64 ppc ppc64 ~sparc x86"
19 dev-lang/php[json,simplexml,zlib,xml,filter]
21 >=net-analyzer/rrdtool-1.2[graph,perl]
22 || ( net-analyzer/nagios-core net-analyzer/icinga net-analyzer/icinga2 )"
24 virtual/perl-Getopt-Long
25 virtual/perl-Time-HiRes
27 apache2? ( www-servers/apache[apache2_modules_rewrite] )"
32 depend.apache_pkg_setup
36 epatch "${FILESDIR}"/${PN}-0.6.14-makefile.patch
43 if has_version net-analyzer/nagios-core; then
47 var_dir=/var/lib/icinga/
52 --sysconfdir=/etc/pnp \
53 --datarootdir=/usr/share/pnp \
54 --mandir=/usr/share/man \
55 --with-perfdata-dir=${var_dir}/perfdata \
56 --with-nagios-user=${user_group} \
57 --with-nagios-group=${user_group} \
58 --with-perfdata-logfile=${var_dir}/perfdata.log \
59 --with-perfdata-spool-dir=/var/spool/pnp
63 # The default target just shows a help
68 emake DESTDIR="${D}" install install-config
69 newinitd "${FILESDIR}"/npcd.initd npcd
70 rm "${D}"/usr/share/pnp/install.php || die
73 insinto "${APACHE_MODULES_CONFDIR}"
74 doins "${FILESDIR}"/98_pnp4nagios.conf
77 # Bug 430358 - CVE-2012-3457
78 find "${D}/etc/pnp" -type f -exec chmod 0640 {} \; || die
79 find "${D}/etc/pnp" -type d -exec chmod 0750 {} \; || die
83 elog "Please make sure to enable URL rewriting in Apache or any other"
84 elog "webserver you're using, to get pnp4nagios running!"