From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-979792-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A07C3139083
	for <garchives@archives.gentoo.org>; Sun, 22 Oct 2017 19:59:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E7CA2E0EC1;
	Sun, 22 Oct 2017 19:59:47 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id AC3CDE0ECB
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Oct 2017 19:59:47 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5323A33BEC0
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Oct 2017 19:59:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 13498309
	for <gentoo-commits@lists.gentoo.org>; Sun, 22 Oct 2017 19:59:45 +0000 (UTC)
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" <mjo@gentoo.org>
Message-ID: <1508702138.3a4f9177b1a1e4b2c80999baade54480b904d4f6.mjo@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/monitoring-plugins/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild
X-VCS-Directories: net-analyzer/monitoring-plugins/
X-VCS-Committer: mjo
X-VCS-Committer-Name: Michael Orlitzky
X-VCS-Revision: 3a4f9177b1a1e4b2c80999baade54480b904d4f6
X-VCS-Branch: master
Date: Sun, 22 Oct 2017 19:59:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 7743699b-57d7-4055-baa1-72a71c924c52
X-Archives-Hash: f34a7d1850d974d07ffa67ab2123302b

commit:     3a4f9177b1a1e4b2c80999baade54480b904d4f6
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 19:26:03 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sun Oct 22 19:55:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a4f9177

net-analyzer/monitoring-plugins: new revision adding radius support.

The monitoring-plugins build system has automagic support for radius
that can be disabled via the --without-radius flag. Doing so allows
(or prevents) the check_radius plugin from being built. This new
revision adds "radius" to IUSE for monitoring-plugins, and builds
check_radius (and pulls in its dependencies) only with USE=radius.

Thanks to Martin Samek who noticed the missing flag.

Closes: https://bugs.gentoo.org/634582
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 .../monitoring-plugins-2.2-r1.ebuild               | 102 +++++++++++++++++++++
 1 file changed, 102 insertions(+)

diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild
new file mode 100644
index 00000000000..951992d4302
--- /dev/null
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic multilib user
+
+DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
+HOMEPAGE="https://www.monitoring-plugins.org/"
+SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86"
+IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl"
+
+# Most of the plugins use automagic dependencies, i.e. the plugin will
+# get built if the binary it uses is installed. For example, check_snmp
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
+# installed. End result: most of our runtime dependencies are required
+# at build time as well.
+#
+# REAL_DEPEND contains the dependencies that are actually needed to
+# build. DEPEND contains those plus the automagic dependencies.
+#
+REAL_DEPEND="dev-lang/perl
+	ldap? ( net-nds/openldap )
+	mysql? ( virtual/mysql )
+	postgres? ( dev-db/postgresql:= )
+	ssl? (
+		!gnutls? (
+			!libressl? ( dev-libs/openssl:0= )
+			libressl? ( dev-libs/libressl:= )
+		)
+		gnutls? ( net-libs/gnutls )
+	)
+	radius? ( net-dialup/freeradius-client )"
+
+DEPEND="${REAL_DEPEND}
+	dns? ( net-dns/bind-tools )
+	game? ( games-util/qstat )
+	fping? ( net-analyzer/fping )
+	samba? ( net-fs/samba )
+	ssh? ( net-misc/openssh )
+	snmp? ( dev-perl/Net-SNMP
+			net-analyzer/net-snmp[-minimal] )"
+
+# Basically everything collides with nagios-plugins.
+RDEPEND="${DEPEND}
+	!net-analyzer/nagios-plugins"
+
+# At least one test is interactive.
+RESTRICT="test"
+
+src_configure() {
+	append-flags -fno-strict-aliasing
+
+	# Use an array to prevent econf from mangling the ping args.
+	local myconf=()
+
+	if use ssl; then
+		myconf+=( $(use_with !gnutls openssl /usr)
+				  $(use_with gnutls gnutls /usr) )
+	else
+		myconf+=( --without-openssl )
+		myconf+=( --without-gnutls )
+	fi
+
+	# The autodetection for these two commands can hang if localhost is
+	# down or ICMP traffic is filtered. Bug #468296.
+	myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" )
+
+	if use ipv6; then
+		myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" )
+	fi
+
+	econf \
+		$(use_with mysql) \
+		$(use_with ipv6) \
+		$(use_with ldap) \
+		$(use_with postgres pgsql /usr) \
+		$(use_with radius) \
+		"${myconf[@]}" \
+		--libexecdir="/usr/$(get_libdir)/nagios/plugins" \
+		--sysconfdir="/etc/nagios"
+}
+
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
+		NEWS README REQUIREMENTS SUPPORT THANKS )
+
+pkg_preinst() {
+	enewgroup nagios
+	enewuser nagios -1 /bin/bash /var/nagios/home nagios
+}
+
+pkg_postinst() {
+	elog "This ebuild has a number of USE flags that determine what you"
+	elog "are able to monitor. Depending on what you want to monitor, some"
+	elog "or all of these USE flags need to be set."
+	elog
+	elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins"
+}