1 |
commit: 6acde778c7ae79968d75618a6429c1dbbc783c6f |
2 |
Author: Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de> |
3 |
AuthorDate: Tue Mar 29 22:39:58 2011 +0000 |
4 |
Commit: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 22:39:58 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=6acde778 |
7 |
|
8 |
[app-admin/collectd] Version bump, fails in eautoreconf |
9 |
|
10 |
(Portage version: 2.1.9.44/git/Linux x86_64, signed Manifest commit with key B6C5F7DE) |
11 |
|
12 |
--- |
13 |
app-admin/collectd/ChangeLog | 6 + |
14 |
app-admin/collectd/Manifest | 30 ++-- |
15 |
app-admin/collectd/collectd-4.10.3.ebuild | 315 +++++++++++++++++++++++++++++ |
16 |
3 files changed, 337 insertions(+), 14 deletions(-) |
17 |
|
18 |
diff --git a/app-admin/collectd/ChangeLog b/app-admin/collectd/ChangeLog |
19 |
index 92300f1..096379f 100644 |
20 |
--- a/app-admin/collectd/ChangeLog |
21 |
+++ b/app-admin/collectd/ChangeLog |
22 |
@@ -2,6 +2,12 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
24 |
# $Header: $ |
25 |
|
26 |
+*collectd-4.10.3 (29 Mar 2011) |
27 |
+ |
28 |
+ 29 Mar 2011; Andreas K. Huettel <dilfridge@g.o> |
29 |
+ +collectd-4.10.3.ebuild: |
30 |
+ Version bump, fails in eautoreconf |
31 |
+ |
32 |
*collectd-4.10.2-r3 (29 Mar 2011) |
33 |
|
34 |
29 Mar 2011; Andreas K. Huettel <dilfridge@g.o> |
35 |
|
36 |
diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest |
37 |
index 604795f..da871ce 100644 |
38 |
--- a/app-admin/collectd/Manifest |
39 |
+++ b/app-admin/collectd/Manifest |
40 |
@@ -11,27 +11,29 @@ AUX collectd.confd 633 RMD160 46f81e3f73d577c3f59df404012e33c419188acc SHA1 85f5 |
41 |
AUX collectd.initd 1475 RMD160 13141c68cd0d22ca5ea84ca70187b835c1831783 SHA1 fca53c6ad12139176033c992fc361a4cf3879245 SHA256 3a322c53b199661eafdf11af192cffd9a1ed54d618a0fd29bcbab9e214b1071d |
42 |
AUX logrotate 115 RMD160 bc70b0fbacde2021a96851f781e096597b161f8c SHA1 4c9f65faab5a43b142fe7f34163ca6d07b8ed704 SHA256 eb359631805b6bfb9f2a9ae5ed21be8f8b3b6f1ffeed8d506231043c9a77262c |
43 |
DIST collectd-4.10.2.tar.bz2 1419603 RMD160 13db504beb5cd560d60014183b67ce768fe4293e SHA1 8d83dd2d68ac4c0871774af99079564880abb5ef SHA256 17cd6741c360cb2544f00fbe902ec3e9aa0d04a7ab6a744e3e8ea5615bb794be |
44 |
+DIST collectd-4.10.3.tar.bz2 1343806 RMD160 3c6257880de6385ee0ad891b5e8fff0916969be8 SHA1 fbeb672d9e1a32f9eb4a5df535519e2fdb8da636 SHA256 ffd1959273301b302c144057baf68128e62c42bcff156ba941336e7389439b65 |
45 |
EBUILD collectd-4.10.2-r1.ebuild 10640 RMD160 fbb7533f826bada4ba457d42e4e2f648852389d3 SHA1 c68a33cf1c5382bdfdf6910405683e2993e6af65 SHA256 fff8f6c361a5e731dacfa65aa6679c8ea25b35956a5e8d68a686b9c13b11f82e |
46 |
EBUILD collectd-4.10.2-r2.ebuild 11168 RMD160 17cdc2cf5c63248bc78f36f83e1f415e8ecc0a1c SHA1 35d8baabcedbf9939744a36f27016dc64e7e1d43 SHA256 d2341b470bf93465e3a322edfe2d7ba810a8b9ea8041cf13034ebda20494a3bb |
47 |
EBUILD collectd-4.10.2-r3.ebuild 11214 RMD160 09dbcb98d4c40d3bf7647ecc694a546c7a245763 SHA1 432001d9d8b610cb4c5c22c4aef66f8ec274c4d3 SHA256 afcc4a0f5a34937b92a0384954def40d3635be8853703770fdd7f16e42be5814 |
48 |
EBUILD collectd-4.10.2.ebuild 10592 RMD160 16570e9e090eecb4c9c69d4b331d529f6074d188 SHA1 e2c9c909abaa0436eced0cfbb62dd1b3359036dd SHA256 eac5dcbebcefa18d510466047055d1578d760245a2b5e69632db786cb350c357 |
49 |
-MISC ChangeLog 5513 RMD160 30025630f16b089f90e04479204c2620c425801d SHA1 cf8d6d65d944bb23268df27a0157e3024057a623 SHA256 5950778c0a30ea45a7cf53ccc10b202f000dc25acf96d15d9061f5c283ee77ed |
50 |
+EBUILD collectd-4.10.3.ebuild 11222 RMD160 f2b2c0673f49f168041c669153a77e16dfa32eb1 SHA1 fc327e90867c18b6c21214c41e28c6efd38d4353 SHA256 ef9002362eafb3393061add74792ccf181574b8b8338e98726f313f3a138a4f5 |
51 |
+MISC ChangeLog 5667 RMD160 77c418da2c808e09a59b1b20550091a6dec4624d SHA1 76873287cdd2ac351374eb4113746710891cfeea SHA256 56122a0426a09337c62fb17e61a413ac81fdc1a9503184ca16be19aca9b4df80 |
52 |
MISC metadata.xml 11374 RMD160 d55c891c2b22898dd8d4f09e635bddbd61988ea9 SHA1 f725b0c3a45c6c3098dd84b29b39dc7a95a0267f SHA256 f849d03105461a54bce4e59f96530a8ab9471ab8620efee506076ef4e546eb88 |
53 |
MISC notes.txt 1607 RMD160 298719e43ddce700a2eba689061e9e11344da408 SHA1 070967029632603b999c1088e9cded260df4014a SHA256 18c9c548d062e9b2dd71f4786ae985fa7b9bac7706d34f359c6d4518ac6b956f |
54 |
-----BEGIN PGP SIGNATURE----- |
55 |
Version: GnuPG v2.0.17 (GNU/Linux) |
56 |
|
57 |
-iQIcBAEBCgAGBQJNklrBAAoJENwGBM22xffejPsP/iHLy1wVewtyftX0eTO2yuUw |
58 |
-Gn0VL4qzyM7Rp6nj8Dq0ECXjqBIL/tGzKsTegZZqPIhf39xESiR7jRI6mxRODEjH |
59 |
-F1hlSXbbchOKEtzJAHJtUKo92s3FG397p6Br9J1wX6mF8yxE68tADMPWkswZkUCS |
60 |
-cl5tu/zCdci2LTEDa8JxJodzlUXcVbndfD1Hg3oK2WtupvyjCaEhqX8/RuA9/h21 |
61 |
-NPrT7VY1MpFqb23YYwb4EPnBUbXImjcJPi2Sg3KAMmrugpmOz1umh7uSz0RaYrAw |
62 |
-BocIaqx1bwV27akQsoRQPrwF7EXqAHCJvZ90dHU3No0WhXalbocQYIEY1OhVgzSt |
63 |
-KQUPB0HnKVSrlzw1pGab1og0Bojg6XXDtPPz9snc0/LrzOw7CDVLF+ZNPUoYVyat |
64 |
-+CuE3ilyng+OK7JQv3R5ND1DtP6AhrccLpgtjNbgZ7Km336zmHv8b6T7uFq7IS+f |
65 |
-o8rPKHOoepxLyI2OAHBrJWBI+bQT8+qrMCtz4uqIMJfUZ3uhnmCGr0KmbnK1ggOO |
66 |
-ouIt3hDy9p3do96PXTXjKBV3HAD1BWk3J6RYhkEDPxrk7u5hldsFVU97LtsRheHF |
67 |
-sDPuwkA9z42ahBwUOASDaoUGHnMETmh66GKTQlvvoSLcP2lG3D2G69XS7j0RTsoZ |
68 |
-UsF86E6jwykTqCsclTmX |
69 |
-=mpbB |
70 |
+iQIcBAEBCgAGBQJNkl++AAoJENwGBM22xffeN6sQAJbjO8uS1n3FXgRvTm1Nl+J6 |
71 |
+pWqZBdgJqG1LP/k2s/fb43QYSjpqxZeTnO3BQq0Pv7fyxyBOtVPdnhRS9wU9UQ+V |
72 |
+3KUGiQT2pgn1VJhER7zlX8epe20JvD7bZo+d9CzOxguWhdIecSBFg6DR3HSpGaiR |
73 |
+nntt8Crirzfm+0k2XtX4UAWbfp19tTJ6TijrN6EAZmWq/Tfkr0+OvruQWQcVhnCi |
74 |
+wIwyDEU3+mmDkinq9pabXYa/WTtaJiXGSdM6zjsU+A3ldYwNWH5+WQCuw785v2ir |
75 |
+q0G8/bVZ/gVl+vmVMQlCYswQiS178k068S+8/oXBcoPYfMKG+QBOzSkaKZdqf7IW |
76 |
+lpW+r4LagcsjCm50Q4e1VnVplal366hh47Lhs+MMWaQ1HMOTOGgVlmoFYd0m7Ach |
77 |
+g+uYgkf4SW90Z6RTRDVPPxMAHWHh/Vk3x6TCiorxZfnaMTdPKadJHLDiiONfjYJ5 |
78 |
+UjiwN67YvqIYH4BYKQMaCDi5+cawj8iEZpOD3OSSIu3OWTT/3E9O5Xw6uPxz2WGc |
79 |
+4VWTEMYx2qu7ihRYGVSwi7B56+twmDipbTxkms1PNfqKtiY0KNp620lk4akY9WTQ |
80 |
+FaYRLy/l1W9JHY08SeYkveOHQtEF4lUcnje0qfuWMl2CpY2twf/gamK1+JtAey/H |
81 |
+XZfUZ28n3YGpQf9TtKT/ |
82 |
+=Ixtj |
83 |
-----END PGP SIGNATURE----- |
84 |
|
85 |
diff --git a/app-admin/collectd/collectd-4.10.3.ebuild b/app-admin/collectd/collectd-4.10.3.ebuild |
86 |
new file mode 100644 |
87 |
index 0000000..c8be9db |
88 |
--- /dev/null |
89 |
+++ b/app-admin/collectd/collectd-4.10.3.ebuild |
90 |
@@ -0,0 +1,315 @@ |
91 |
+# Copyright 1999-2011 Gentoo Foundation |
92 |
+# Distributed under the terms of the GNU General Public License v2 |
93 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/collectd/collectd-4.10.2-r3.ebuild,v 1.1 2011/02/07 21:21:52 dilfridge Exp $ |
94 |
+ |
95 |
+EAPI="2" |
96 |
+ |
97 |
+inherit eutils base linux-info perl-app autotools |
98 |
+ |
99 |
+DESCRIPTION="A small daemon which collects system performance statistics - with a near-infinite number of plugins" |
100 |
+HOMEPAGE="http://collectd.org" |
101 |
+SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" |
102 |
+ |
103 |
+LICENSE="GPL-2" |
104 |
+SLOT="0" |
105 |
+KEYWORDS="~amd64 ~x86" |
106 |
+IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin" |
107 |
+ |
108 |
+# The plugin lists have to follow here since they extend IUSE |
109 |
+ |
110 |
+# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo) |
111 |
+COLLECTD_IMPOSSIBLE_PLUGINS="netapp pinba xmms" |
112 |
+ |
113 |
+# Plugins that still need some work |
114 |
+COLLECTD_UNTESTED_PLUGINS="ipvs apple_sensors routeros tape zfs_arc nut modbus" |
115 |
+ |
116 |
+# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
117 |
+COLLECTD_TESTED_PLUGINS="apache apcups ascent battery bind conntrack contextswitch |
118 |
+ cpu cpufreq curl curl_json curl_xml dbi df disk dns email entropy exec filecount fscache gmond |
119 |
+ hddtemp interface ipmi iptables irq java libvirt load madwifi mbmon memcachec |
120 |
+ memcached memory multimeter mysql netlink network nfs nginx ntpd olsrd |
121 |
+ onewire openvpn perl ping postgresql powerdns processes protocols python |
122 |
+ rrdcached sensors serial snmp swap table tail tcpconns teamspeak2 ted thermal |
123 |
+ tokyotyrant uptime users vmem vserver wireless csv exec logfile network |
124 |
+ notify_desktop notify_email oracle perl python rrdcached rrdtool syslog unixsock write_http |
125 |
+ match_empty_counter match_hashed match_regex match_timediff match_value |
126 |
+ target_notification target_replace target_scale target_set uuid" |
127 |
+ |
128 |
+COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" |
129 |
+ |
130 |
+COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
131 |
+ |
132 |
+for plugin in ${COLLECTD_ALL_PLUGINS}; do |
133 |
+ IUSE="${IUSE} collectd_plugins_${plugin}" |
134 |
+done |
135 |
+unset plugin |
136 |
+ |
137 |
+# Now come the dependencies. |
138 |
+ |
139 |
+COMMON_DEPEND=" |
140 |
+ collectd_plugins_apache? ( net-misc/curl ) |
141 |
+ collectd_plugins_ascent? ( net-misc/curl dev-libs/libxml2 ) |
142 |
+ collectd_plugins_bind? ( dev-libs/libxml2 ) |
143 |
+ collectd_plugins_curl? ( net-misc/curl ) |
144 |
+ collectd_plugins_curl_json? ( net-misc/curl dev-libs/yajl ) |
145 |
+ collectd_plugins_curl_xml? ( net-misc/curl dev-libs/libxml2 ) |
146 |
+ collectd_plugins_dbi? ( dev-db/libdbi ) |
147 |
+ collectd_plugins_dns? ( net-libs/libpcap ) |
148 |
+ collectd_plugins_gmond? ( sys-cluster/ganglia ) |
149 |
+ collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
150 |
+ collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.9.1-r2 ) |
151 |
+ collectd_plugins_java? ( virtual/jre dev-java/java-config-wrapper ) |
152 |
+ collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) |
153 |
+ collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
154 |
+ collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) |
155 |
+ collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 ) |
156 |
+ collectd_plugins_network? ( dev-libs/libgcrypt ) |
157 |
+ collectd_plugins_nginx? ( net-misc/curl ) |
158 |
+ collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
159 |
+ collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) |
160 |
+ collectd_plugins_onewire? ( sys-fs/owfs ) |
161 |
+ collectd_plugins_oracle? ( >=dev-db/oracle-instantclient-basic-11.2.0.1.0 ) |
162 |
+ collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
163 |
+ collectd_plugins_ping? ( net-libs/liboping ) |
164 |
+ collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
165 |
+ collectd_plugins_python? ( =dev-lang/python-2* ) |
166 |
+ collectd_plugins_rrdcached? ( >=net-analyzer/rrdtool-1.4 ) |
167 |
+ collectd_plugins_rrdtool? ( >=net-analyzer/rrdtool-1.2.27 ) |
168 |
+ collectd_plugins_sensors? ( sys-apps/lm_sensors ) |
169 |
+ collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
170 |
+ collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
171 |
+ collectd_plugins_write_http? ( net-misc/curl ) |
172 |
+ |
173 |
+ kernel_FreeBSD? ( |
174 |
+ collectd_plugins_disk? ( >=sys-libs/libstatgrab-0.16 ) |
175 |
+ collectd_plugins_interface? ( >=sys-libs/libstatgrab-0.16 ) |
176 |
+ collectd_plugins_load? ( >=sys-libs/libstatgrab-0.16 ) |
177 |
+ collectd_plugins_memory? ( >=sys-libs/libstatgrab-0.16 ) |
178 |
+ collectd_plugins_swap? ( >=sys-libs/libstatgrab-0.16 ) |
179 |
+ collectd_plugins_users? ( >=sys-libs/libstatgrab-0.16 ) |
180 |
+ )" |
181 |
+ |
182 |
+DEPEND="${COMMON_DEPEND} |
183 |
+ dev-util/pkgconfig |
184 |
+ kernel_linux? ( |
185 |
+ collectd_plugins_vserver? ( sys-kernel/vserver-sources ) |
186 |
+ )" |
187 |
+ |
188 |
+RDEPEND="${COMMON_DEPEND} |
189 |
+ collectd_plugins_syslog? ( virtual/logger )" |
190 |
+ |
191 |
+PATCHES=( |
192 |
+ "${FILESDIR}/${PN}-4.10.1"-{libperl,libiptc,noowniptc}.patch |
193 |
+ "${FILESDIR}/${PN}-4.10.2"-{libocci,libnotify-0.7,nohal}.patch |
194 |
+ ) |
195 |
+ |
196 |
+# @FUNCTION: collectd_plugin_kernel_linux |
197 |
+# @DESCRIPTION: |
198 |
+# USAGE: <plug-in name> <kernel_options> <severity> |
199 |
+# kernel_options is a list of kernel configurations options; the check tests whether at least |
200 |
+# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
201 |
+# is emitted. |
202 |
+collectd_plugin_kernel_linux() { |
203 |
+ local multi_opt opt |
204 |
+ if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
205 |
+ if use collectd_plugins_${1}; then |
206 |
+ for opt in ${2}; do |
207 |
+ if linux_chkconfig_present ${opt}; then return 0; fi |
208 |
+ done |
209 |
+ multi_opt=${2//\ /\ or\ } |
210 |
+ case ${3} in |
211 |
+ (info) |
212 |
+ elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
213 |
+ ;; |
214 |
+ (warn) |
215 |
+ ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
216 |
+ ;; |
217 |
+ (error) |
218 |
+ eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
219 |
+ ;; |
220 |
+ (*) |
221 |
+ die "function collectd_plugin_kernel_linux called with invalid third argument" |
222 |
+ ;; |
223 |
+ esac |
224 |
+ fi |
225 |
+ fi |
226 |
+} |
227 |
+ |
228 |
+collectd_linux_kernel_checks() { |
229 |
+ linux-info_pkg_setup |
230 |
+ |
231 |
+ # battery.c:/proc/pmu/battery_%i |
232 |
+ # battery.c:/proc/acpi/battery |
233 |
+ collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
234 |
+ |
235 |
+ # cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/ |
236 |
+ collectd_plugin_kernel_linux cpufreq SYSFS warn |
237 |
+ collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
238 |
+ |
239 |
+ # nfs.c:/proc/net/rpc/nfs |
240 |
+ # nfs.c:/proc/net/rpc/nfsd |
241 |
+ collectd_plugin_kernel_linux nfs NFS_COMMON warn |
242 |
+ |
243 |
+ # serial.c:/proc/tty/driver/serial |
244 |
+ # serial.c:/proc/tty/driver/ttyS |
245 |
+ collectd_plugin_kernel_linux serial SERIAL_CORE warn |
246 |
+ |
247 |
+ # swap.c:/proc/meminfo |
248 |
+ collectd_plugin_kernel_linux swap SWAP warn |
249 |
+ |
250 |
+ # thermal.c:/proc/acpi/thermal_zone |
251 |
+ # thermal.c:/sys/class/thermal |
252 |
+ collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn |
253 |
+ collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
254 |
+ |
255 |
+ # vmem.c:/proc/vmstat |
256 |
+ collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
257 |
+ |
258 |
+ # uuid.c:/sys/hypervisor/uuid |
259 |
+ collectd_plugin_kernel_linux uuid SYSFS info |
260 |
+ |
261 |
+ # wireless.c:/proc/net/wireless |
262 |
+ collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn |
263 |
+} |
264 |
+ |
265 |
+pkg_setup() { |
266 |
+ if use kernel_linux; then |
267 |
+ if linux_config_exists; then |
268 |
+ einfo "Checking your linux kernel configuration:" |
269 |
+ collectd_linux_kernel_checks |
270 |
+ else |
271 |
+ elog "Cannot find a linux kernel configuration. Continuing anyway." |
272 |
+ fi |
273 |
+ fi |
274 |
+ |
275 |
+ enewgroup collectd |
276 |
+} |
277 |
+ |
278 |
+src_prepare() { |
279 |
+ base_src_prepare |
280 |
+ |
281 |
+ # There's some strange prefix handling in the default config file, resulting in |
282 |
+ # paths like "/usr/var/..." |
283 |
+ sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
284 |
+ |
285 |
+ eautoreconf |
286 |
+} |
287 |
+ |
288 |
+src_configure() { |
289 |
+ # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
290 |
+ # should work independent of the operating system. |
291 |
+ |
292 |
+ local linux_plugins="battery cpu cpufreq disk entropy interface iptables ipvs irq load |
293 |
+ memory netlink nfs processes serial swap tcpconns thermal users vmem vserver |
294 |
+ wireless" |
295 |
+ |
296 |
+ local libstatgrab_plugins="cpu disk interface load memory swap users" |
297 |
+ local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}" |
298 |
+ |
299 |
+ local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
300 |
+ |
301 |
+ local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
302 |
+ local myos_plugins="" |
303 |
+ if use kernel_linux; then |
304 |
+ einfo "Enabling Linux plugins." |
305 |
+ myos_plugins=${linux_plugins} |
306 |
+ elif use kernel_FreeBSD; then |
307 |
+ einfo "Enabling FreeBSD plugins." |
308 |
+ myos_plugins=${bsd_plugins} |
309 |
+ elif use kernel_Darwin; then |
310 |
+ einfo "Enabling Darwin plugins." |
311 |
+ myos_plugins=${darwin_plugins} |
312 |
+ fi |
313 |
+ |
314 |
+ # Do we debug? |
315 |
+ local myconf="$(use_enable debug)" |
316 |
+ |
317 |
+ local plugin |
318 |
+ |
319 |
+ # Disable what needs to be disabled. |
320 |
+ for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
321 |
+ myconf+=" --disable-${plugin}" |
322 |
+ done |
323 |
+ |
324 |
+ # Set enable/disable for each single plugin. |
325 |
+ for plugin in ${COLLECTD_ALL_PLUGINS}; do |
326 |
+ if has ${plugin} ${osdependent_plugins}; then |
327 |
+ # plugin is os-dependent ... |
328 |
+ if has ${plugin} ${myos_plugins}; then |
329 |
+ # ... and available in this os |
330 |
+ myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
331 |
+ else |
332 |
+ # ... and NOT available in this os |
333 |
+ if use collectd_plugins_${plugin}; then |
334 |
+ ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
335 |
+ ewarn "kernel. Disabling it automatically." |
336 |
+ fi |
337 |
+ myconf+=" --disable-${plugin}" |
338 |
+ fi |
339 |
+ else |
340 |
+ myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
341 |
+ fi |
342 |
+ done |
343 |
+ |
344 |
+ # Need JAVA_HOME for java. |
345 |
+ if use collectd_plugins_java; then |
346 |
+ myconf+=" --with-java=$(java-config -g JAVA_HOME)" |
347 |
+ fi |
348 |
+ |
349 |
+ # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
350 |
+ if ! use collectd_plugins_iptables; then |
351 |
+ myconf+=" --with-libiptc=no" |
352 |
+ fi |
353 |
+ |
354 |
+ # Finally, run econf. |
355 |
+ KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl --disable-static --localstatedir=/var ${myconf} |
356 |
+} |
357 |
+ |
358 |
+src_install() { |
359 |
+ emake DESTDIR="${D}" install || die |
360 |
+ |
361 |
+ fixlocalpod |
362 |
+ |
363 |
+ find "${D}/usr/" -name "*.la" -exec rm -f {} + |
364 |
+ |
365 |
+ dodoc AUTHORS ChangeLog NEWS README TODO || die |
366 |
+ |
367 |
+ if use contrib ; then |
368 |
+ insinto /usr/share/doc/${PF} |
369 |
+ doins -r contrib || die |
370 |
+ fi |
371 |
+ |
372 |
+ keepdir /var/lib/${PN} || die |
373 |
+ |
374 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die |
375 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die |
376 |
+ |
377 |
+ insinto /etc/logrotate.d |
378 |
+ newins "${FILESDIR}/logrotate" collectd || die |
379 |
+ |
380 |
+ sed -i -e 's:^.*LoadPlugin perl$:# The new, correct way to load the perl plugin -- \n# <LoadPlugin perl>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
381 |
+ sed -i -e 's:^.*LoadPlugin python$:# The new, correct way to load the python plugin -- \n# <LoadPlugin python>\n# Globals true\n# </LoadPlugin>:' "${D}"/etc/collectd.conf || die |
382 |
+} |
383 |
+ |
384 |
+collectd_rdeps() { |
385 |
+ if (use collectd_plugins_${1} && ! has_version "${2}"); then |
386 |
+ elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work." |
387 |
+ fi |
388 |
+} |
389 |
+ |
390 |
+pkg_postinst() { |
391 |
+ collectd_rdeps apcups sys-power/apcupsd |
392 |
+ collectd_rdeps hddtemp app-admin/hddtemp |
393 |
+ collectd_rdeps mbmon sys-apps/xmbmon |
394 |
+ collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2" |
395 |
+ collectd_rdeps ntpd net-misc/ntp |
396 |
+ collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9" |
397 |
+ |
398 |
+ if use collectd_plugins_email; then |
399 |
+ ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
400 |
+ fi |
401 |
+ if use contrib; then |
402 |
+ elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
403 |
+ elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
404 |
+ fi |
405 |
+} |