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/monitoring-plugins/
Date: Fri, 23 Dec 2016 18:51:12
Message-Id: 1482519058.97acecd2a67cc1a1da1c29ea98fd6e9592acc6b8.mjo@gentoo
1 commit: 97acecd2a67cc1a1da1c29ea98fd6e9592acc6b8
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Dec 22 23:56:57 2016 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 23 18:50:58 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97acecd2
7
8 net-analyzer/monitoring-plugins: bump to 2.2
9
10 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
11
12 net-analyzer/monitoring-plugins/Manifest | 1 +
13 .../monitoring-plugins-2.2.ebuild | 101 +++++++++++++++++++++
14 2 files changed, 102 insertions(+)
15
16 diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest
17 index 46c48c3..53329e6 100644
18 --- a/net-analyzer/monitoring-plugins/Manifest
19 +++ b/net-analyzer/monitoring-plugins/Manifest
20 @@ -1 +1,2 @@
21 DIST monitoring-plugins-2.1.2.tar.gz 2613060 SHA256 76c6b58f0867ab7b6c8c86c7e94fcce7183618f6daab63488990d0355f5600aa SHA512 845eb7636691aa5402119384c3d4256969e959fbc29ef5257c24fc4c21536cad3dade30747f36c9ad998cb37df0f325df66ea679d3d5b96c2993b59a9a325fed WHIRLPOOL aea22e1a3d3c7622b4645118cf8b5d499882bd30b6af8bdd81287fb99fe42bff7f906b54fda411ac2c33ff6e42872a6ea6af4dcd7611bdc95d308c0fcd954e43
22 +DIST monitoring-plugins-2.2.tar.gz 2461548 SHA256 296a538f00a9cbef7f528ff2d43af357a44b384dc98a32389a675b62a6dd3665 SHA512 5f8cfa132891d6d96e69bee3f2c26f7d4546f572be6a18f25ea5d9069f162cb2e424361289a5c26bec60d7b63d28a269437fd6f25645903a1c142fdcbbf77f27 WHIRLPOOL 5ca16cbc63cbbe3472f82b87b2c4111df4877bc33b0a9bf638507aaf8020194adc6e8244c5a002ae636121ae58d7a112cb2c5cba6e384c136e5636bbfc4a6141
23
24 diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2.ebuild
25 new file mode 100644
26 index 00000000..8e3cd45
27 --- /dev/null
28 +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2.ebuild
29 @@ -0,0 +1,101 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=6
35 +
36 +inherit eutils flag-o-matic multilib user
37 +
38 +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu"
39 +HOMEPAGE="https://www.monitoring-plugins.org/"
40 +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz"
41 +
42 +LICENSE="GPL-3"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~x86"
45 +IUSE="gnutls ipv6 ldap libressl mysql dns fping 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? (
61 + !gnutls? (
62 + !libressl? ( dev-libs/openssl:0= )
63 + libressl? ( dev-libs/libressl:= )
64 + )
65 + gnutls? ( net-libs/gnutls )
66 + )"
67 +
68 +DEPEND="${REAL_DEPEND}
69 + dns? ( net-dns/bind-tools )
70 + game? ( games-util/qstat )
71 + fping? ( net-analyzer/fping )
72 + samba? ( net-fs/samba )
73 + ssh? ( net-misc/openssh )
74 + snmp? ( dev-perl/Net-SNMP
75 + net-analyzer/net-snmp[-minimal] )"
76 +
77 +# Basically everything collides with nagios-plugins.
78 +RDEPEND="${DEPEND}
79 + !net-analyzer/nagios-plugins"
80 +
81 +# At least one test is interactive.
82 +RESTRICT="test"
83 +
84 +src_configure() {
85 + append-flags -fno-strict-aliasing
86 +
87 + # Use an array to prevent econf from mangling the ping args.
88 + local myconf=()
89 +
90 + if use ssl; then
91 + myconf+=( $(use_with !gnutls openssl /usr)
92 + $(use_with gnutls gnutls /usr) )
93 + else
94 + myconf+=( --without-openssl )
95 + myconf+=( --without-gnutls )
96 + fi
97 +
98 + # The autodetection for these two commands can hang if localhost is
99 + # down or ICMP traffic is filtered. Bug #468296.
100 + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" )
101 +
102 + if use ipv6; then
103 + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" )
104 + fi
105 +
106 + econf \
107 + $(use_with mysql) \
108 + $(use_with ipv6) \
109 + $(use_with ldap) \
110 + $(use_with postgres pgsql /usr) \
111 + "${myconf[@]}" \
112 + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \
113 + --sysconfdir="/etc/nagios"
114 +}
115 +
116 +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \
117 + NEWS README REQUIREMENTS SUPPORT THANKS )
118 +
119 +pkg_preinst() {
120 + enewgroup nagios
121 + enewuser nagios -1 /bin/bash /var/nagios/home nagios
122 +}
123 +
124 +pkg_postinst() {
125 + elog "This ebuild has a number of USE flags that determine what you"
126 + elog "are able to monitor. Depending on what you want to monitor, some"
127 + elog "or all of these USE flags need to be set."
128 + elog
129 + elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins"
130 +}