1 |
commit: 3a4f9177b1a1e4b2c80999baade54480b904d4f6 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 22 19:26:03 2017 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 22 19:55:38 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a4f9177 |
7 |
|
8 |
net-analyzer/monitoring-plugins: new revision adding radius support. |
9 |
|
10 |
The monitoring-plugins build system has automagic support for radius |
11 |
that can be disabled via the --without-radius flag. Doing so allows |
12 |
(or prevents) the check_radius plugin from being built. This new |
13 |
revision adds "radius" to IUSE for monitoring-plugins, and builds |
14 |
check_radius (and pulls in its dependencies) only with USE=radius. |
15 |
|
16 |
Thanks to Martin Samek who noticed the missing flag. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/634582 |
19 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
20 |
|
21 |
.../monitoring-plugins-2.2-r1.ebuild | 102 +++++++++++++++++++++ |
22 |
1 file changed, 102 insertions(+) |
23 |
|
24 |
diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..951992d4302 |
27 |
--- /dev/null |
28 |
+++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r1.ebuild |
29 |
@@ -0,0 +1,102 @@ |
30 |
+# Copyright 1999-2017 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+inherit eutils flag-o-matic multilib user |
36 |
+ |
37 |
+DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu" |
38 |
+HOMEPAGE="https://www.monitoring-plugins.org/" |
39 |
+SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-3" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86" |
44 |
+IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl" |
45 |
+ |
46 |
+# Most of the plugins use automagic dependencies, i.e. the plugin will |
47 |
+# get built if the binary it uses is installed. For example, check_snmp |
48 |
+# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is |
49 |
+# installed. End result: most of our runtime dependencies are required |
50 |
+# at build time as well. |
51 |
+# |
52 |
+# REAL_DEPEND contains the dependencies that are actually needed to |
53 |
+# build. DEPEND contains those plus the automagic dependencies. |
54 |
+# |
55 |
+REAL_DEPEND="dev-lang/perl |
56 |
+ ldap? ( net-nds/openldap ) |
57 |
+ mysql? ( virtual/mysql ) |
58 |
+ postgres? ( dev-db/postgresql:= ) |
59 |
+ ssl? ( |
60 |
+ !gnutls? ( |
61 |
+ !libressl? ( dev-libs/openssl:0= ) |
62 |
+ libressl? ( dev-libs/libressl:= ) |
63 |
+ ) |
64 |
+ gnutls? ( net-libs/gnutls ) |
65 |
+ ) |
66 |
+ radius? ( net-dialup/freeradius-client )" |
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 |
+ $(use_with radius) \ |
112 |
+ "${myconf[@]}" \ |
113 |
+ --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ |
114 |
+ --sysconfdir="/etc/nagios" |
115 |
+} |
116 |
+ |
117 |
+DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \ |
118 |
+ NEWS README REQUIREMENTS SUPPORT THANKS ) |
119 |
+ |
120 |
+pkg_preinst() { |
121 |
+ enewgroup nagios |
122 |
+ enewuser nagios -1 /bin/bash /var/nagios/home nagios |
123 |
+} |
124 |
+ |
125 |
+pkg_postinst() { |
126 |
+ elog "This ebuild has a number of USE flags that determine what you" |
127 |
+ elog "are able to monitor. Depending on what you want to monitor, some" |
128 |
+ elog "or all of these USE flags need to be set." |
129 |
+ elog |
130 |
+ elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins" |
131 |
+} |