Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nagios-plugins/
Date: Mon, 31 Aug 2015 14:13:36
Message-Id: 1441030387.623bd520a9216fc02d5933d47b7604af7090fc00.mjo@gentoo
1 commit: 623bd520a9216fc02d5933d47b7604af7090fc00
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 31 13:19:20 2015 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 31 14:13:07 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=623bd520
7
8 net-analyzer/nagios-plugins: version bump to v2.1.1.
9
10 Package-Manager: portage-2.2.20.1
11
12 net-analyzer/nagios-plugins/Manifest | 1 +
13 .../nagios-plugins/nagios-plugins-2.1.1.ebuild | 98 ++++++++++++++++++++++
14 2 files changed, 99 insertions(+)
15
16 diff --git a/net-analyzer/nagios-plugins/Manifest b/net-analyzer/nagios-plugins/Manifest
17 index 17345c7..0351c034 100644
18 --- a/net-analyzer/nagios-plugins/Manifest
19 +++ b/net-analyzer/nagios-plugins/Manifest
20 @@ -1 +1,2 @@
21 DIST nagios-plugins-2.0.3.tar.gz 2659772 SHA256 8f0021442dce0138f0285ca22960b870662e28ae8973d49d439463588aada04a SHA512 2753e6f3fc7433a5583fee01e63a65b9ea74155964f2b6e6bf3458e56cb29ea5dbd020f83816044a717b66d6548d203b3a082fba0faedcd629c7a8457bc19b36 WHIRLPOOL 4b0e4024833373df3f0db44657345a1f4495c4022e56bf6b369cc2846f9127e565520f6b7cdf1b94384592e78327d584da7d939a3ac0586e0ae67fd1258c138b
22 +DIST nagios-plugins-2.1.1.tar.gz 2677352 SHA256 c7daf95ecbf6909724258e55a319057b78dcca23b2a6cc0a640b90c90d4feae3 SHA512 6ef872a6aca50f4b575cae8b484766103bbeace7118090c81df3e62f9a30f9a156bb2bed4dbfa3e483e22a6b7505816e668b56bf3c91fcef8eafa9038c93dd26 WHIRLPOOL 80db3155ef0d31301822ac62fbc68a64f0ab79c7836b7592aab04a6e689fd96965ab45b58a5da7d687b58ce411c38d374b07e1ec82f23bad9b3981aae9dfe6e9
23
24 diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.1.1.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.1.1.ebuild
25 new file mode 100644
26 index 0000000..eb1b93e
27 --- /dev/null
28 +++ b/net-analyzer/nagios-plugins/nagios-plugins-2.1.1.ebuild
29 @@ -0,0 +1,98 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +inherit eutils multilib user
37 +
38 +DESCRIPTION="Official plugins for Nagios"
39 +HOMEPAGE="http://nagios-plugins.org/"
40 +SRC_URI="http://nagios-plugins.org/download/${P}.tar.gz"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
45 +IUSE="ipv6 ldap mysql nagios-dns nagios-ping nagios-game postgres samba snmp ssh +ssl"
46 +
47 +# Most of the plugins use automagic dependencies, i.e. the plugin will
48 +# get built if the binary it uses is installed. For example, check_snmp
49 +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is
50 +# installed. End result: most of our runtime dependencies are required
51 +# at build time as well.
52 +#
53 +# REAL_DEPEND contains the dependencies that are actually needed to
54 +# build. DEPEND contains those plus the automagic dependencies.
55 +#
56 +REAL_DEPEND="dev-lang/perl
57 + ldap? ( net-nds/openldap )
58 + mysql? ( virtual/mysql )
59 + postgres? ( dev-db/postgresql:* )
60 + ssl? ( dev-libs/openssl:0 )"
61 +
62 +DEPEND="${REAL_DEPEND}
63 + nagios-dns? ( net-dns/bind-tools )
64 + nagios-game? ( games-util/qstat )
65 + nagios-ping? ( net-analyzer/fping )
66 + samba? ( net-fs/samba )
67 + ssh? ( net-misc/openssh )
68 + snmp? ( dev-perl/Net-SNMP
69 + net-analyzer/net-snmp[-minimal] )"
70 +
71 +# Basically everything collides with nagios-plugins.
72 +RDEPEND="${DEPEND}
73 + !net-analyzer/monitoring-plugins"
74 +
75 +# At least one test is interactive.
76 +RESTRICT="test"
77 +
78 +src_prepare() {
79 + # Fix the path to our perl interpreter
80 + sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \
81 + "${S}"/plugins-scripts/*.pl || die
82 +}
83 +
84 +src_configure() {
85 + # Use an array to prevent econf from mangling the ping args.
86 + local myconf=()
87 +
88 + if use ssl; then
89 + myconf+=( $(use_with ssl openssl /usr) )
90 + else
91 + myconf+=( --without-openssl )
92 + myconf+=( --without-gnutls )
93 + fi
94 +
95 + # The autodetection for these two commands can hang if localhost is
96 + # down or ICMP traffic is filtered. Bug #468296.
97 + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" )
98 +
99 + if use ipv6; then
100 + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" )
101 + fi
102 +
103 + econf \
104 + $(use_with mysql) \
105 + $(use_with ipv6) \
106 + $(use_with ldap) \
107 + $(use_with postgres pgsql /usr) \
108 + "${myconf[@]}" \
109 + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
110 + --sysconfdir="/etc/nagios"
111 +}
112 +
113 +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
114 + NEWS README REQUIREMENTS SUPPORT THANKS )
115 +
116 +pkg_preinst() {
117 + enewgroup nagios
118 + enewuser nagios -1 /bin/bash /var/nagios/home nagios
119 +}
120 +
121 +pkg_postinst() {
122 + elog "This ebuild has a number of USE flags that determine what you"
123 + elog "are able to monitor. Depending on what you want to monitor, some"
124 + elog "or all of these USE flags need to be set."
125 + elog
126 + elog "The plugins are installed in ${ROOT}usr/$(get_libdir)/nagios/plugins"
127 +}