1 |
commit: 6e47568d0a35cced1a6177b2ba5a8f7a9ac53183 |
2 |
Author: Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de> |
3 |
AuthorDate: Wed Mar 30 22:07:56 2011 +0000 |
4 |
Commit: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 22:07:56 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=6e47568d |
7 |
|
8 |
[app-admin/collectd] Version bump, for now disabling all new plugins |
9 |
|
10 |
(Portage version: 2.1.9.45/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-5.0.0.ebuild | 319 ++++++++++++++++++++++++++++++ |
16 |
3 files changed, 341 insertions(+), 14 deletions(-) |
17 |
|
18 |
diff --git a/app-admin/collectd/ChangeLog b/app-admin/collectd/ChangeLog |
19 |
index a3b0a9f..f2e083b 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-5.0.0 (30 Mar 2011) |
27 |
+ |
28 |
+ 30 Mar 2011; Andreas K. Huettel <dilfridge@g.o> |
29 |
+ +collectd-5.0.0.ebuild: |
30 |
+ Version bump, for now disabling all new plugins |
31 |
+ |
32 |
30 Mar 2011; Andreas K. Huettel <dilfridge@g.o> |
33 |
collectd-4.10.3.ebuild, metadata.xml: |
34 |
Added support for sys-power/nut |
35 |
|
36 |
diff --git a/app-admin/collectd/Manifest b/app-admin/collectd/Manifest |
37 |
index 2349048..1e4588c 100644 |
38 |
--- a/app-admin/collectd/Manifest |
39 |
+++ b/app-admin/collectd/Manifest |
40 |
@@ -12,28 +12,30 @@ AUX collectd.initd 1475 RMD160 13141c68cd0d22ca5ea84ca70187b835c1831783 SHA1 fca |
41 |
AUX logrotate 115 RMD160 bc70b0fbacde2021a96851f781e096597b161f8c SHA1 4c9f65faab5a43b142fe7f34163ca6d07b8ed704 SHA256 eb359631805b6bfb9f2a9ae5ed21be8f8b3b6f1ffeed8d506231043c9a77262c |
42 |
DIST collectd-4.10.2.tar.bz2 1419603 RMD160 13db504beb5cd560d60014183b67ce768fe4293e SHA1 8d83dd2d68ac4c0871774af99079564880abb5ef SHA256 17cd6741c360cb2544f00fbe902ec3e9aa0d04a7ab6a744e3e8ea5615bb794be |
43 |
DIST collectd-4.10.3.tar.bz2 1343806 RMD160 3c6257880de6385ee0ad891b5e8fff0916969be8 SHA1 fbeb672d9e1a32f9eb4a5df535519e2fdb8da636 SHA256 ffd1959273301b302c144057baf68128e62c42bcff156ba941336e7389439b65 |
44 |
+DIST collectd-5.0.0.tar.bz2 1372805 RMD160 7b0b9060a4dbde937fa2263076fdd81f328f46aa SHA1 720746ee2542ddec9ef7b42b5f3e00412d1b3b43 SHA256 2df6ef3b90d588b82a16da479ad652fdd5837fb9e6fd04b728c6427a3d767e3c |
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 |
EBUILD collectd-4.10.3.ebuild 11383 RMD160 d1ca4225cd5ebe4d4726eff46dac18b0d3f02535 SHA1 8caf55275c051ef6cb095ae1608ffca6d4cf2c98 SHA256 2eabc4f40e56e746f81ff1050a15f2f6a01475a30374969c438c27e36b7ce898 |
50 |
-MISC ChangeLog 5950 RMD160 3ea07fbce63980876ee7a8a68997784bd0138333 SHA1 73da294e1887c2826476eafbb8587d8b32265923 SHA256 883129fc7a98c684492fd8629273c8ec44187d631afaf094841d0744d3b1dad9 |
51 |
+EBUILD collectd-5.0.0.ebuild 11460 RMD160 ff6d362705fbae6a28026e22286f7790b6e3d6de SHA1 946f1b678f57afb8c766abcb378e3121f319ec6f SHA256 29f52644212a4bae4b3dd2443381129b52c083bae4d2acc630667ab50d7ae15c |
52 |
+MISC ChangeLog 6115 RMD160 807824078ea2f95905f62d68dc0609589959fa1f SHA1 d4b430e7d51a686ba8431bad14b08aeabaf7febd SHA256 c2f5ca3e04b79192603fdb518903ea76fda346cf4f95d5de8b53eb761d96070d |
53 |
MISC metadata.xml 11499 RMD160 91369dcd7b9a2b5920ff1ea2d9e82f51b9032b7a SHA1 6742b43d634ce58b252c1232f5d86e6784e9881d SHA256 dcf8cb5d991f766895a4d2a70ec964cb1bde2fa94c666ebda299c29a327490dc |
54 |
MISC notes.txt 1607 RMD160 298719e43ddce700a2eba689061e9e11344da408 SHA1 070967029632603b999c1088e9cded260df4014a SHA256 18c9c548d062e9b2dd71f4786ae985fa7b9bac7706d34f359c6d4518ac6b956f |
55 |
-----BEGIN PGP SIGNATURE----- |
56 |
Version: GnuPG v2.0.17 (GNU/Linux) |
57 |
|
58 |
-iQIcBAEBCgAGBQJNk5KBAAoJENwGBM22xffeZsoQAKfgGm1UP/JiQcXVAUipOo0M |
59 |
-6m88aYvwBHwbDyaFOYoDzuidgypLcxSktso/LlV9sv6dWX8sATqGYykiRgoaWHGU |
60 |
-4ov04Rm+F7eXo/bu30lSreGzcgbK48RGcWGnu4GIyBJtqdCquDJd9MwA6WYrmthS |
61 |
-qxGaMAkj0PezdbI04ckw317l2MrLnUnKH1mVwSHwkOCq8V4xJHXBPJBQzW6qaZgf |
62 |
-rR1B4ZbeAgV7Xuv9HRWdqcKoxEKCsKRdigNqng4CRjuiIUfIgHP/kBuIrfAS7NCF |
63 |
-FxSc/goKuHQFB9vu3QXD0PWveY31dXQhDCTSniwjTgMYncPuNjpUJ2T92To7IFFG |
64 |
-ZXYlEwMjJSdLz8GHkkn8srMFPcbXGUVOM5IjefjLR0wKszbM82R8IGVa23quDXjU |
65 |
-acj1N7kfheXokHoXayc0b9iTu8nYqXsAgEC4ISFw8ykwJL4S1Chf7CWefw2dh33U |
66 |
-r22fcAJfB3msRxJXpzaOEtJJufk2ugf7K4sf1E+7+RQWnLWetXhSeG9d/JBpzXC+ |
67 |
-24yqsXGjlruSMYljrRVhh2ivif8A5kWdXH8fXbNaAz80BXQwAEWPU0q6rstKc2Ve |
68 |
-cw4bRzpJSnyFfcUYnEhPsUSfYS4a4v6USBWDR2ooJ1jH0IX6IK2kMOwUUrWNoilB |
69 |
-W+yKO2vjc84KDpYCfPOU |
70 |
-=17IF |
71 |
+iQIcBAEBCgAGBQJNk6m8AAoJENwGBM22xffeLjQP/2EBhpBkmKnyEX2gKbc9HnaN |
72 |
+94TCVUaUlr4MwICYy2eyWJsHuEoMe4KvZ37u0ShIQFexX+kIrPaoxFWkhvDLwyxO |
73 |
+muuNgq34V+0EdVLzTiJbsxUtrZkz9gLKU7YY33+cm6x0tZCU76r+nABhfZyaj/gI |
74 |
+hrs8/m+qDBQVRJfZBgSSVshMF7Kviy6pljCbhl7SSme787nUzheWc2GWC8IB6Emp |
75 |
+oQhEuNYywOqeFcz+0sSXtgGq9m7XdNOq1WMLdw2S9P+2taf7T/X8IfU3rYuUlOYw |
76 |
+l9QkAKS6df/N3DdDfcru8NGxGpqjod0JZRCuT+RAPFczHJoDAykuNcEGzsNxRVO1 |
77 |
+R620+5sXBAFiEYJm+Hd7iev1JfWXOIiyHj8Av3ebSicrBzrsTero1gGzCQH6oR5q |
78 |
+hmeLmmjvWShFCx8CQp+U8xjUcbbc2EuwO1T6BnFAEHnw0VIAuqIN2KMGIA99Y+JZ |
79 |
+YkvVAT+FEwb1GIEK6CBC456z2YmOgcW1eY5GSo+oaHZ3HYq9jJMQvnd92NLrgtQo |
80 |
+CCxMCFc+8xiDkhTQU0iykGP383hf1lX4i8pLkeheDsFBxuJ/nx4QyGXBUZyEr/l3 |
81 |
+ZGpAQbTRi/vXuMOct+PeT9383V3rXSiB62cOeoiJKZ9EWLx0kwcosAwX8JV/AhB/ |
82 |
+4yBU/CpSBGzJALZbWPBm |
83 |
+=gPC5 |
84 |
-----END PGP SIGNATURE----- |
85 |
|
86 |
diff --git a/app-admin/collectd/collectd-5.0.0.ebuild b/app-admin/collectd/collectd-5.0.0.ebuild |
87 |
new file mode 100644 |
88 |
index 0000000..b25d77e |
89 |
--- /dev/null |
90 |
+++ b/app-admin/collectd/collectd-5.0.0.ebuild |
91 |
@@ -0,0 +1,319 @@ |
92 |
+# Copyright 1999-2011 Gentoo Foundation |
93 |
+# Distributed under the terms of the GNU General Public License v2 |
94 |
+# $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 $ |
95 |
+ |
96 |
+EAPI=4 |
97 |
+ |
98 |
+inherit eutils base linux-info perl-app autotools |
99 |
+ |
100 |
+DESCRIPTION="A small daemon which collects system performance statistics - with a near-infinite number of plugins" |
101 |
+HOMEPAGE="http://collectd.org" |
102 |
+SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2" |
103 |
+ |
104 |
+LICENSE="GPL-2" |
105 |
+SLOT="0" |
106 |
+KEYWORDS="~amd64 ~x86" |
107 |
+IUSE="contrib debug kernel_linux kernel_FreeBSD kernel_Darwin" |
108 |
+ |
109 |
+# The plugin lists have to follow here since they extend IUSE |
110 |
+ |
111 |
+# Plugins that to my knowledge cannot be supported (eg. dependencies not in gentoo) |
112 |
+COLLECTD_IMPOSSIBLE_PLUGINS="netapp pinba xmms" |
113 |
+ |
114 |
+# Plugins that still need some work |
115 |
+COLLECTD_UNTESTED_PLUGINS="ipvs apple_sensors routeros tape zfs_arc modbus amqp genericjmx lpar redis threshold varnish write_redis v5upgrade" |
116 |
+ |
117 |
+# Plugins that have been (compile) tested and can be enabled via COLLECTD_PLUGINS |
118 |
+COLLECTD_TESTED_PLUGINS="apache apcups ascent battery bind conntrack contextswitch |
119 |
+ cpu cpufreq curl curl_json curl_xml dbi df disk dns email entropy exec filecount fscache gmond |
120 |
+ hddtemp interface ipmi iptables irq java libvirt load madwifi mbmon memcachec |
121 |
+ memcached memory multimeter mysql netlink network nfs nginx ntpd nut olsrd |
122 |
+ onewire openvpn perl ping postgresql powerdns processes protocols python |
123 |
+ rrdcached sensors serial snmp swap table tail tcpconns teamspeak2 ted thermal |
124 |
+ tokyotyrant uptime users vmem vserver wireless csv exec logfile network |
125 |
+ notify_desktop notify_email oracle perl python rrdcached rrdtool syslog unixsock write_http |
126 |
+ match_empty_counter match_hashed match_regex match_timediff match_value |
127 |
+ target_notification target_replace target_scale target_set uuid" |
128 |
+ |
129 |
+COLLECTD_DISABLED_PLUGINS="${COLLECTD_IMPOSSIBLE_PLUGINS} ${COLLECTD_UNTESTED_PLUGINS}" |
130 |
+ |
131 |
+COLLECTD_ALL_PLUGINS=${COLLECTD_TESTED_PLUGINS} |
132 |
+ |
133 |
+for plugin in ${COLLECTD_ALL_PLUGINS}; do |
134 |
+ IUSE="${IUSE} collectd_plugins_${plugin}" |
135 |
+done |
136 |
+unset plugin |
137 |
+ |
138 |
+# Now come the dependencies. |
139 |
+ |
140 |
+COMMON_DEPEND=" |
141 |
+ collectd_plugins_apache? ( net-misc/curl ) |
142 |
+ collectd_plugins_ascent? ( net-misc/curl dev-libs/libxml2 ) |
143 |
+ collectd_plugins_bind? ( dev-libs/libxml2 ) |
144 |
+ collectd_plugins_curl? ( net-misc/curl ) |
145 |
+ collectd_plugins_curl_json? ( net-misc/curl dev-libs/yajl ) |
146 |
+ collectd_plugins_curl_xml? ( net-misc/curl dev-libs/libxml2 ) |
147 |
+ collectd_plugins_dbi? ( dev-db/libdbi ) |
148 |
+ collectd_plugins_dns? ( net-libs/libpcap ) |
149 |
+ collectd_plugins_gmond? ( sys-cluster/ganglia ) |
150 |
+ collectd_plugins_ipmi? ( >=sys-libs/openipmi-2.0.16-r1 ) |
151 |
+ collectd_plugins_iptables? ( >=net-firewall/iptables-1.4.9.1-r2 ) |
152 |
+ collectd_plugins_java? ( virtual/jre dev-java/java-config-wrapper ) |
153 |
+ collectd_plugins_libvirt? ( app-emulation/libvirt dev-libs/libxml2 ) |
154 |
+ collectd_plugins_memcachec? ( dev-libs/libmemcached ) |
155 |
+ collectd_plugins_mysql? ( >=virtual/mysql-5.0 ) |
156 |
+ collectd_plugins_netlink? ( >=sys-apps/iproute2-2.6.34 ) |
157 |
+ collectd_plugins_network? ( dev-libs/libgcrypt ) |
158 |
+ collectd_plugins_nginx? ( net-misc/curl ) |
159 |
+ collectd_plugins_notify_desktop? ( x11-libs/libnotify ) |
160 |
+ collectd_plugins_notify_email? ( >=net-libs/libesmtp-1.0.4 dev-libs/openssl ) |
161 |
+ collectd_plugins_nut? ( sys-power/nut ) |
162 |
+ collectd_plugins_onewire? ( sys-fs/owfs ) |
163 |
+ collectd_plugins_oracle? ( >=dev-db/oracle-instantclient-basic-11.2.0.1.0 ) |
164 |
+ collectd_plugins_perl? ( dev-lang/perl[ithreads] ( || ( sys-devel/libperl[ithreads] >=sys-devel/libperl-5.10 ) ) ) |
165 |
+ collectd_plugins_ping? ( net-libs/liboping ) |
166 |
+ collectd_plugins_postgresql? ( >=dev-db/postgresql-base-8.2 ) |
167 |
+ collectd_plugins_python? ( =dev-lang/python-2* ) |
168 |
+ collectd_plugins_rrdcached? ( >=net-analyzer/rrdtool-1.4 ) |
169 |
+ collectd_plugins_rrdtool? ( >=net-analyzer/rrdtool-1.2.27 ) |
170 |
+ collectd_plugins_sensors? ( sys-apps/lm_sensors ) |
171 |
+ collectd_plugins_snmp? ( net-analyzer/net-snmp ) |
172 |
+ collectd_plugins_tokyotyrant? ( net-misc/tokyotyrant ) |
173 |
+ collectd_plugins_write_http? ( net-misc/curl ) |
174 |
+ |
175 |
+ kernel_FreeBSD? ( |
176 |
+ collectd_plugins_disk? ( >=sys-libs/libstatgrab-0.16 ) |
177 |
+ collectd_plugins_interface? ( >=sys-libs/libstatgrab-0.16 ) |
178 |
+ collectd_plugins_load? ( >=sys-libs/libstatgrab-0.16 ) |
179 |
+ collectd_plugins_memory? ( >=sys-libs/libstatgrab-0.16 ) |
180 |
+ collectd_plugins_swap? ( >=sys-libs/libstatgrab-0.16 ) |
181 |
+ collectd_plugins_users? ( >=sys-libs/libstatgrab-0.16 ) |
182 |
+ )" |
183 |
+ |
184 |
+DEPEND="${COMMON_DEPEND} |
185 |
+ dev-util/pkgconfig |
186 |
+ kernel_linux? ( |
187 |
+ collectd_plugins_vserver? ( sys-kernel/vserver-sources ) |
188 |
+ )" |
189 |
+ |
190 |
+RDEPEND="${COMMON_DEPEND} |
191 |
+ collectd_plugins_syslog? ( virtual/logger )" |
192 |
+ |
193 |
+PATCHES=( |
194 |
+ "${FILESDIR}/${PN}-4.10.1"-{libperl,libiptc,noowniptc}.patch |
195 |
+ "${FILESDIR}/${PN}-4.10.2"-{libocci,libnotify-0.7,nohal}.patch |
196 |
+ ) |
197 |
+ |
198 |
+# @FUNCTION: collectd_plugin_kernel_linux |
199 |
+# @DESCRIPTION: |
200 |
+# USAGE: <plug-in name> <kernel_options> <severity> |
201 |
+# kernel_options is a list of kernel configurations options; the check tests whether at least |
202 |
+# one of them is enabled. If no, depending on the third argument an elog, ewarn, or eerror message |
203 |
+# is emitted. |
204 |
+collectd_plugin_kernel_linux() { |
205 |
+ local multi_opt opt |
206 |
+ if has ${1} ${COLLECTD_ALL_PLUGINS}; then |
207 |
+ if use collectd_plugins_${1}; then |
208 |
+ for opt in ${2}; do |
209 |
+ if linux_chkconfig_present ${opt}; then return 0; fi |
210 |
+ done |
211 |
+ multi_opt=${2//\ /\ or\ } |
212 |
+ case ${3} in |
213 |
+ (info) |
214 |
+ elog "The ${1} plug-in can use kernel features that are disabled now; enable ${multi_opt} in your kernel" |
215 |
+ ;; |
216 |
+ (warn) |
217 |
+ ewarn "The ${1} plug-in uses kernel features that are disabled now; enable ${multi_opt} in your kernel" |
218 |
+ ;; |
219 |
+ (error) |
220 |
+ eerror "The ${1} plug-in needs kernel features that are disabled now; enable ${multi_opt} in your kernel" |
221 |
+ ;; |
222 |
+ (*) |
223 |
+ die "function collectd_plugin_kernel_linux called with invalid third argument" |
224 |
+ ;; |
225 |
+ esac |
226 |
+ fi |
227 |
+ fi |
228 |
+} |
229 |
+ |
230 |
+collectd_linux_kernel_checks() { |
231 |
+ linux-info_pkg_setup |
232 |
+ |
233 |
+ # battery.c:/proc/pmu/battery_%i |
234 |
+ # battery.c:/proc/acpi/battery |
235 |
+ collectd_plugin_kernel_linux battery ACPI_BATTERY warn |
236 |
+ |
237 |
+ # cpufreq.c:/sys/devices/system/cpu/cpu%d/cpufreq/ |
238 |
+ collectd_plugin_kernel_linux cpufreq SYSFS warn |
239 |
+ collectd_plugin_kernel_linux cpufreq CPU_FREQ_STAT warn |
240 |
+ |
241 |
+ # nfs.c:/proc/net/rpc/nfs |
242 |
+ # nfs.c:/proc/net/rpc/nfsd |
243 |
+ collectd_plugin_kernel_linux nfs NFS_COMMON warn |
244 |
+ |
245 |
+ # serial.c:/proc/tty/driver/serial |
246 |
+ # serial.c:/proc/tty/driver/ttyS |
247 |
+ collectd_plugin_kernel_linux serial SERIAL_CORE warn |
248 |
+ |
249 |
+ # swap.c:/proc/meminfo |
250 |
+ collectd_plugin_kernel_linux swap SWAP warn |
251 |
+ |
252 |
+ # thermal.c:/proc/acpi/thermal_zone |
253 |
+ # thermal.c:/sys/class/thermal |
254 |
+ collectd_plugin_kernel_linux thermal "PROC_FS SYSFS" warn |
255 |
+ collectd_plugin_kernel_linux thermal ACPI_THERMAL warn |
256 |
+ |
257 |
+ # vmem.c:/proc/vmstat |
258 |
+ collectd_plugin_kernel_linux vmem VM_EVENT_COUNTERS warn |
259 |
+ |
260 |
+ # uuid.c:/sys/hypervisor/uuid |
261 |
+ collectd_plugin_kernel_linux uuid SYSFS info |
262 |
+ |
263 |
+ # wireless.c:/proc/net/wireless |
264 |
+ collectd_plugin_kernel_linux wireless "MAC80211 IEEE80211" warn |
265 |
+} |
266 |
+ |
267 |
+pkg_setup() { |
268 |
+ if use kernel_linux; then |
269 |
+ if linux_config_exists; then |
270 |
+ einfo "Checking your linux kernel configuration:" |
271 |
+ collectd_linux_kernel_checks |
272 |
+ else |
273 |
+ elog "Cannot find a linux kernel configuration. Continuing anyway." |
274 |
+ fi |
275 |
+ fi |
276 |
+ |
277 |
+ enewgroup collectd |
278 |
+} |
279 |
+ |
280 |
+src_prepare() { |
281 |
+ base_src_prepare |
282 |
+ |
283 |
+ # There's some strange prefix handling in the default config file, resulting in |
284 |
+ # paths like "/usr/var/..." |
285 |
+ sed -i -e "s:@prefix@/var:/var:g" src/collectd.conf.in || die |
286 |
+ |
287 |
+ # the tarball of 4.10.3 and 5.0.0 was generated with a different set of autotools, leading to odd problems |
288 |
+ _elibtoolize --ltdl |
289 |
+ |
290 |
+ eautoreconf |
291 |
+} |
292 |
+ |
293 |
+src_configure() { |
294 |
+ # Now come the lists of os-dependent plugins. Any plugin that is not listed anywhere here |
295 |
+ # should work independent of the operating system. |
296 |
+ |
297 |
+ local linux_plugins="battery cpu cpufreq disk entropy interface iptables ipvs irq load |
298 |
+ memory netlink nfs processes serial swap tcpconns thermal users vmem vserver |
299 |
+ wireless" |
300 |
+ |
301 |
+ local libstatgrab_plugins="cpu disk interface load memory swap users" |
302 |
+ local bsd_plugins="cpu tcpconns ${libstatgrab_plugins}" |
303 |
+ |
304 |
+ local darwin_plugins="apple_sensors battery cpu disk interface memory processes tcpconns" |
305 |
+ |
306 |
+ local osdependent_plugins="${linux_plugins} ${bsd_plugins} ${darwin_plugins}" |
307 |
+ local myos_plugins="" |
308 |
+ if use kernel_linux; then |
309 |
+ einfo "Enabling Linux plugins." |
310 |
+ myos_plugins=${linux_plugins} |
311 |
+ elif use kernel_FreeBSD; then |
312 |
+ einfo "Enabling FreeBSD plugins." |
313 |
+ myos_plugins=${bsd_plugins} |
314 |
+ elif use kernel_Darwin; then |
315 |
+ einfo "Enabling Darwin plugins." |
316 |
+ myos_plugins=${darwin_plugins} |
317 |
+ fi |
318 |
+ |
319 |
+ # Do we debug? |
320 |
+ local myconf="$(use_enable debug)" |
321 |
+ |
322 |
+ local plugin |
323 |
+ |
324 |
+ # Disable what needs to be disabled. |
325 |
+ for plugin in ${COLLECTD_DISABLED_PLUGINS}; do |
326 |
+ myconf+=" --disable-${plugin}" |
327 |
+ done |
328 |
+ |
329 |
+ # Set enable/disable for each single plugin. |
330 |
+ for plugin in ${COLLECTD_ALL_PLUGINS}; do |
331 |
+ if has ${plugin} ${osdependent_plugins}; then |
332 |
+ # plugin is os-dependent ... |
333 |
+ if has ${plugin} ${myos_plugins}; then |
334 |
+ # ... and available in this os |
335 |
+ myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
336 |
+ else |
337 |
+ # ... and NOT available in this os |
338 |
+ if use collectd_plugins_${plugin}; then |
339 |
+ ewarn "You try to enable the ${plugin} plugin, but it is not available for this" |
340 |
+ ewarn "kernel. Disabling it automatically." |
341 |
+ fi |
342 |
+ myconf+=" --disable-${plugin}" |
343 |
+ fi |
344 |
+ else |
345 |
+ myconf+=" $(use_enable collectd_plugins_${plugin} ${plugin})" |
346 |
+ fi |
347 |
+ done |
348 |
+ |
349 |
+ # Need JAVA_HOME for java. |
350 |
+ if use collectd_plugins_java; then |
351 |
+ myconf+=" --with-java=$(java-config -g JAVA_HOME)" |
352 |
+ fi |
353 |
+ |
354 |
+ # Need libiptc ONLY for iptables. If we try to use it otherwise bug 340109 happens. |
355 |
+ if ! use collectd_plugins_iptables; then |
356 |
+ myconf+=" --with-libiptc=no" |
357 |
+ fi |
358 |
+ |
359 |
+ # Finally, run econf. |
360 |
+ KERNEL_DIR="${KERNEL_DIR}" econf --config-cache --without-included-ltdl --disable-static --localstatedir=/var ${myconf} |
361 |
+} |
362 |
+ |
363 |
+src_install() { |
364 |
+ emake DESTDIR="${D}" install || die |
365 |
+ |
366 |
+ fixlocalpod |
367 |
+ |
368 |
+ find "${D}/usr/" -name "*.la" -exec rm -f {} + |
369 |
+ |
370 |
+ dodoc AUTHORS ChangeLog NEWS README TODO || die |
371 |
+ |
372 |
+ if use contrib ; then |
373 |
+ insinto /usr/share/doc/${PF} |
374 |
+ doins -r contrib || die |
375 |
+ fi |
376 |
+ |
377 |
+ keepdir /var/lib/${PN} || die |
378 |
+ |
379 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die |
380 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die |
381 |
+ |
382 |
+ insinto /etc/logrotate.d |
383 |
+ newins "${FILESDIR}/logrotate" collectd || die |
384 |
+ |
385 |
+ 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 |
386 |
+ 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 |
387 |
+} |
388 |
+ |
389 |
+collectd_rdeps() { |
390 |
+ if (use collectd_plugins_${1} && ! has_version "${2}"); then |
391 |
+ elog "The ${1} plug-in needs ${2} to be installed locally or remotely to work." |
392 |
+ fi |
393 |
+} |
394 |
+ |
395 |
+pkg_postinst() { |
396 |
+ collectd_rdeps apcups sys-power/apcupsd |
397 |
+ collectd_rdeps hddtemp app-admin/hddtemp |
398 |
+ collectd_rdeps mbmon sys-apps/xmbmon |
399 |
+ collectd_rdeps memcached ">=net-misc/memcached-1.2.2-r2" |
400 |
+ collectd_rdeps ntpd net-misc/ntp |
401 |
+ collectd_rdeps openvpn ">=net-misc/openvpn-2.0.9" |
402 |
+ |
403 |
+ if use collectd_plugins_email; then |
404 |
+ ewarn "The email plug-in is deprecated. To submit statistics please use the unixsock plugin." |
405 |
+ fi |
406 |
+ if use contrib; then |
407 |
+ elog "The scripts in /usr/share/doc/${PF}/collection3 for generating graphs need dev-perl/HTML-Parser," |
408 |
+ elog "dev-perl/config-general, dev-perl/regexp-common, and net-analyzer/rrdtool[perl] to be installed." |
409 |
+ fi |
410 |
+} |