summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-analyzer/pnp4nagios/metadata.xml16
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild (renamed from net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild)25
2 files changed, 32 insertions, 9 deletions
diff --git a/net-analyzer/pnp4nagios/metadata.xml b/net-analyzer/pnp4nagios/metadata.xml
index 379fdde3e076..d5799ab49c93 100644
--- a/net-analyzer/pnp4nagios/metadata.xml
+++ b/net-analyzer/pnp4nagios/metadata.xml
@@ -5,7 +5,23 @@
<email>sysadmin@gentoo.org</email>
<name>Gentoo Sysadmin Project</name>
</maintainer>
+
+ <use>
+ <flag name="nagios">
+ Build against <pkg>net-analyzer/nagios-core</pkg> (the default)
+ </flag>
+ <flag name="icinga">
+ Build against <pkg>net-analyzer/icinga</pkg> instead of
+ <pkg>net-analyzer/nagios-core</pkg>
+ </flag>
+ <flag name="icinga2">
+ Build against <pkg>net-analyzer/icinga2</pkg> instead of
+ <pkg>net-analyzer/nagios-core</pkg>
+ </flag>
+ </use>
+
<upstream>
<remote-id type="sourceforge">pnp4nagios</remote-id>
+ <remote-id type="github">lingej/pnp4nagios</remote-id>
</upstream>
</pkgmetadata>
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild
index 06416fc0d985..c15a8c98de6f 100644
--- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26.ebuild
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild
@@ -9,14 +9,20 @@ SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-IUSE="apache2"
+IUSE="apache2 icinga icinga2 +nagios"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
-# A lot of things (sync mode, for one) are broken with nagios-4.x.
+REQUIRED_USE="^^ ( icinga icinga2 nagios )"
+
+# Some things (sync mode, for one) are broken with nagios-4.x, but since
+# nagios-3.x has been end-of-life'd, we don't have much choice here but
+# to accept it.
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 )"
+ icinga? ( net-analyzer/icinga )
+ icinga2? ( net-analyzer/icinga2 )
+ nagios? ( net-analyzer/nagios-core )"
# A list of modules used in our Apache config file.
APACHE_MODS="apache2_modules_alias," # "Alias" directive
@@ -34,15 +40,16 @@ 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
+ if use icinga; then
+ var_dir=/var/lib/icinga
+ user_group=icinga
+ elif use icinga2; then
var_dir=/var/lib/icinga2
user_group=icinga
else
- var_dir=/var/lib/icinga
- user_group=icinga
+ # Thanks to REQUIRED_USE, "use nagios" is the only other case.
+ var_dir=/var/nagios
+ user_group=nagios
fi
econf \