summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-11-02 12:14:02 -0400
committerMichael Orlitzky <mjo@gentoo.org>2017-11-04 19:37:17 -0400
commit42744d418f1fe9fa3b593dcec59e3f8afacf195d (patch)
treedb8270fb4054aaab8e362011469d5e333630927e /net-analyzer/pnp4nagios
parentwww-client/qutebrowser: remove old (diff)
downloadgentoo-42744d418f1fe9fa3b593dcec59e3f8afacf195d.tar.gz
gentoo-42744d418f1fe9fa3b593dcec59e3f8afacf195d.tar.bz2
gentoo-42744d418f1fe9fa3b593dcec59e3f8afacf195d.zip
net-analyzer/pnp4nagios: new version 0.6.26.
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'net-analyzer/pnp4nagios')
-rw-r--r--net-analyzer/pnp4nagios/Manifest1
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild98
2 files changed, 99 insertions, 0 deletions
diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest
index 8f1c42a86f9d..eafa0a86fcc6 100644
--- a/net-analyzer/pnp4nagios/Manifest
+++ b/net-analyzer/pnp4nagios/Manifest
@@ -1,2 +1,3 @@
DIST pnp4nagios-0.6.24.tar.gz 2919182 SHA256 87412ef01257c6096aa5c84fdb47db950b851c596e1306180be8ba45401793cf SHA512 7e8c32e0ac69ab747a57e8ab6cc59fddfb63e16598fda9c1e6270d6309ff0885cd1bd0876d05aa1d30bffa76b281d41dc8fbe59e430778bf4d3bdddc4a7bee9f WHIRLPOOL 4f48b406a7d82a4370701ede2625ed2c247bb933a9197d3417c4eb18f18b879465aeb4775e9a0f0300ac1140159df6c6130466b5434c0b33bccb7fff04de86f8
DIST pnp4nagios-0.6.25.tar.gz 2921068 SHA256 62d9cdcb132326753373b18fafebd716ec27dc5cbe1ef42204440fca21ca7a0c SHA512 e561fcac8243e6b1ab401312b4a05a6c752e2869da7366a22e4e48d54ae1e9c17c52cb2dffb1ca5748179f3bc856f779317196992643e9862eb09c4debf277c8 WHIRLPOOL 9267bbb04b3cdfdd4d12601508a6d602aa9513a096aac06adf4631fcb1218d2e24fef7a6be1defd8a3ac87106a9cdf6b689b50c432fe0f07ca45d7fbf665d810
+DIST pnp4nagios-0.6.26.tar.gz 3039265 SHA256 ab59a8a02d0f70de3cf89b12fe1e9216e4b1127bc29c04a036cd06dde72ee8fb SHA512 caf6dcced74967174d9e6f09dd1a5bee17397c10a68d0f577c37dcc836f928d78c20d75a0189539e9ffa93715ab7b6e732e9f36b9698cf4dd9c09cfb65184427 WHIRLPOOL 9e4d3565f37ace45d509b86b5b603d37aebed0fde385f27d78b2a1c231ff9f2cba6973a7f29b216755e76b139dce087411e22ceaafcbe51e890691f49e2161d9
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild
new file mode 100644
index 000000000000..06416fc0d985
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org/"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="apache2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+# A lot of things (sync mode, for one) are broken with nagios-4.x.
+DEPEND="
+ dev-lang/php:*[filter,gd,json,simplexml,xml,zlib]
+ >=net-analyzer/rrdtool-1.2[graph,perl]
+ || ( <net-analyzer/nagios-core-4 net-analyzer/icinga net-analyzer/icinga2 )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core," # "Require" directive
+APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends
+
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )"
+
+PATCHES=( "${FILESDIR}/${PN}-0.6.14-makefile.patch" )
+
+src_configure() {
+ local var_dir user_group
+
+ if has_version net-analyzer/nagios-core; then
+ var_dir=/var/nagios
+ user_group=nagios
+ elif has_version net-analyzer/icinga2; then
+ var_dir=/var/lib/icinga2
+ user_group=icinga
+ else
+ var_dir=/var/lib/icinga
+ user_group=icinga
+ fi
+
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/pnp \
+ --datarootdir="${EPREFIX}"/usr/share/pnp \
+ --with-perfdata-dir="${EPREFIX}"${var_dir}/perfdata \
+ --with-nagios-user=${user_group} \
+ --with-nagios-group=${user_group} \
+ --with-perfdata-logfile="${EPREFIX}"${var_dir}/perfdata.log \
+ --with-perfdata-spool-dir="${EPREFIX}"/var/spool/pnp
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-config
+ einstalldocs
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${ED%/}/usr/share/pnp/install.php" || \
+ die "unable to remove ${ED%/}/usr/share/pnp/install.php"
+
+ if use apache2 ; then
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
+
+ # Allow the apache user to read our config files. This same
+ # approach is used in net-analyzer/nagios-core.
+ chgrp -R apache "${ED%/}/etc/pnp" \
+ || die "failed to change group of ${ED%/}/etc/pnp"
+ fi
+
+ # Bug 430358 - CVE-2012-3457
+ local f
+ while IFS="" read -d $'\0' -r f ; do
+ chmod 0640 "${f}" || die
+ done < <(find "${ED%/}/etc/pnp" -type f)
+
+ while IFS="" read -d $'\0' -r f ; do
+ chmod 0750 "${f}" || die
+ done < <(find "${ED%/}/etc/pnp" -type d)
+}
+
+pkg_postinst() {
+ elog "To enable the pnp4nagios web front-end, please visit"
+ elog "${EROOT%/}/etc/conf.d/apache2 and add \"-D PNP -D PHP5\""
+ elog "to APACHE2_OPTS. Then pnp4nagios will be available at,"
+ elog
+ elog " http://localhost/pnp4nagios"
+ elog
+}