public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/
Date: Wed, 30 Nov 2016 23:44:37 +0000 (UTC)	[thread overview]
Message-ID: <1480549349.982a97b2acad008069b9cfb6c21574cc97ec3654.monsieurp@gentoo> (raw)

commit:     982a97b2acad008069b9cfb6c21574cc97ec3654
Author:     Louis Sautier <sautier.louis <AT> gmail <DOT> com>
AuthorDate: Mon Nov 28 16:04:51 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 23:42:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=982a97b2

net-analyzer/pnp4nagios: remove dep. on outdated apache eclass, various fixes.

Package-Manager: portage-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/2943

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../pnp4nagios/pnp4nagios-0.6.25-r3.ebuild         | 56 ++++++++++------------
 1 file changed, 24 insertions(+), 32 deletions(-)

diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.25-r3.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25-r3.ebuild
index 974810a..ee5fadd 100644
--- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.25-r3.ebuild
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.25-r3.ebuild
@@ -4,15 +4,13 @@
 
 EAPI=6
 
-inherit depend.apache eutils
-
 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=""
+IUSE="apache2"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
 
 # A lot of things (sync mode, for one) are broken with nagios-4.x.
@@ -37,38 +35,28 @@ PATCHES=(
 	"${FILESDIR}/${P}-rrdtool-0.6.0-support.patch"
 )
 
-# There is no want_apache2_4, but we needed to specify that manually
-# anyway to be able to include the list of modules.
-want_apache2
-
-pkg_setup() {
-	depend.apache_pkg_setup
-}
-
 src_configure() {
-	local var_dir=
-	local user_group=
+	local var_dir user_group
 
 	if has_version net-analyzer/nagios-core; then
-		var_dir=/var/nagios/
+		var_dir=/var/nagios
 		user_group=nagios
 	elif has_version net-analyzer/icinga2; then
-		var_dir=/var/lib/icinga2/
+		var_dir=/var/lib/icinga2
 		user_group=icinga
 	else
-		var_dir=/var/lib/icinga/
+		var_dir=/var/lib/icinga
 		user_group=icinga
 	fi
 
 	econf \
-		--sysconfdir=/etc/pnp \
-		--datarootdir=/usr/share/pnp \
-		--mandir=/usr/share/man \
-		--with-perfdata-dir=${var_dir}/perfdata \
+		--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=${var_dir}/perfdata.log \
-		--with-perfdata-spool-dir=/var/spool/pnp
+		--with-perfdata-logfile="${EPREFIX}"${var_dir}/perfdata.log \
+		--with-perfdata-spool-dir="${EPREFIX}"/var/spool/pnp
 }
 
 src_compile() {
@@ -78,9 +66,10 @@ src_compile() {
 
 src_install() {
 	emake DESTDIR="${D}" install install-config
+	einstalldocs
 	newinitd "${FILESDIR}"/npcd.initd npcd
-	rm "${D}/usr/share/pnp/install.php" || \
-		die "unable to remove ${D}/usr/share/pnp/install.php"
+	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}"
@@ -88,21 +77,24 @@ src_install() {
 
 		# Allow the apache user to read our config files. This same
 		# approach is used in net-analyzer/nagios-core.
-		chgrp -R apache "${D}/etc/pnp" \
-			|| die "failed to change group of ${ROOT}etc/pnp"
+		chgrp -R apache "${ED%/}/etc/pnp" \
+			|| die "failed to change group of ${ED%/}/etc/pnp"
 	fi
 
 	# Bug 430358 - CVE-2012-3457
-	find "${D}/etc/pnp" -type f -exec chmod 0640 '{}' + || \
-		die "unable to set file permissions under ${D}/etc/pnp"
-
-	find "${D}/etc/pnp" -type d -exec chmod 0750 '{}' + || \
-		die "unable to set directory permissions under ${D}/etc/pnp"
+	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 "${ROOT}etc/conf.d/apache2 and add \"-D PNP -D PHP5\""
+	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"


             reply	other threads:[~2016-11-30 23:44 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30 23:44 Patrice Clement [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-21 21:19 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/ Sam James
2023-11-04 13:35 Sam James
2023-11-04 12:25 Sam James
2023-11-04 10:49 Sam James
2023-09-23 15:07 Michael Orlitzky
2023-09-23 15:07 Michael Orlitzky
2022-12-23 13:48 Arthur Zamarin
2022-12-23 13:48 Arthur Zamarin
2022-12-23 12:17 Sam James
2022-08-30 10:06 Michael Orlitzky
2022-08-29 12:38 Jakov Smolić
2022-08-12 14:27 Sam James
2022-08-03 16:12 Arthur Zamarin
2020-03-17  7:32 Matthew Thode
2020-02-17 23:37 Matthew Thode
2018-06-19 22:24 Michael Orlitzky
2018-03-19 23:24 Sergei Trofimovich
2018-03-19 22:39 Sergei Trofimovich
2017-11-29 18:52 Thomas Deutschmann
2017-11-29 13:38 Agostino Sarubbo
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2017-11-04 23:40 Michael Orlitzky
2016-03-15 11:08 Agostino Sarubbo
2016-02-06 23:31 Matt Thode
2016-02-01 14:45 Matt Thode
2015-12-16 22:11 Matt Thode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480549349.982a97b2acad008069b9cfb6c21574cc97ec3654.monsieurp@gentoo \
    --to=monsieurp@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox