Merge pull request #1710 from rpv-tomsk/perl-plugin-fixes
[collectd.git] / contrib / redhat / collectd.spec
1 #
2 # q: What is this ?
3 # a: A specfile for building RPM packages of current collectd releases, for
4 #    RHEL/CentOS versions 5, 6 and 7. By default all the plugins which are
5 #    buildable based on the libraries available in the distribution + the
6 #    EPEL repository, will be built. Plugins depending on external libs will
7 #    be packaged in separate RPMs.
8 #
9 # q: And how can I do that ?
10 # a: By following these instructions, using mock:
11 #
12 # - install and configure mock (https://fedoraproject.org/wiki/Projects/Mock)
13 #
14 # - enable the EPEL repository (http://dl.fedoraproject.org/pub/epel/) in the
15 #   configuration files for your target systems (/etc/mock/*.cfg).
16 #
17 # - fetch the desired collectd release file from https://collectd.org/files/
18 #   and save it in your ~/rpmbuild/SOURCES/ directory (or build your own out of
19 #   the git repository: ./build.sh && ./configure && make-dist-bz2)
20 #
21 # - copy this file in your ~/rpmbuild/SPECS/ directory. Make sure the
22 #   "Version:" tag matches the version from the tarball.
23 #
24 # - build the SRPM first:
25 #   mock -r centos-6-x86_64 --buildsrpm --spec ~/rpmbuild/SPECS/collectd.spec \
26 #     --sources ~/rpmbuild/SOURCES/
27 #
28 # - then build the RPMs:
29 #   mock -r centos-6-x86_64 --no-clean --rebuild \
30 #     /var/lib/mock/centos-6-x86_64/result/collectd-X.Y.Z-NN.src.rpm
31 #
32 # - you can also optionally enable/disable plugins which are disabled/enabled
33 #   by default:
34 #   mock -r centos-6-x86_64 --no-clean --without=java --with=oracle --rebuild \
35 #     /var/lib/mock/centos-6-x86_64/result/collectd-X.Y.Z-NN.src.rpm
36 #
37
38 %global _hardened_build 1
39 %{?perl_default_filter}
40
41 # plugins only buildable on RHEL6
42 # (NB: %{elN} macro is not available on RHEL < 6)
43 %{?el6:%global _has_libyajl 1}
44 %{?el6:%global _has_recent_libpcap 1}
45 %{?el6:%global _has_recent_sockios_h 1}
46 %{?el6:%global _has_recent_libganglia 1}
47 %{?el6:%global _has_working_libiptc 1}
48 %{?el6:%global _has_ip_vs_h 1}
49 %{?el6:%global _has_lvm2app_h 1}
50 %{?el6:%global _has_libmodbus 1}
51 %{?el6:%global _has_libudev 1}
52 %{?el6:%global _has_iproute 1}
53 %{?el6:%global _has_atasmart 1}
54 %{?el6:%global _has_hiredis 1}
55 %{?el6:%global _has_asm_msr_index 1}
56
57 %{?el7:%global _has_libyajl 1}
58 %{?el7:%global _has_recent_libpcap 1}
59 %{?el7:%global _has_recent_sockios_h 1}
60 %{?el7:%global _has_working_libiptc 1}
61 %{?el7:%global _has_ip_vs_h 1}
62 %{?el7:%global _has_lvm2app_h 1}
63 %{?el7:%global _has_libudev 1}
64 %{?el7:%global _has_recent_librrd 1}
65 %{?el7:%global _has_iproute 1}
66 %{?el7:%global _has_atasmart 1}
67 %{?el7:%global _has_hiredis 1}
68 %{?el7:%global _has_asm_msr_index 1}
69 %{?el7:%global _has_libmosquitto 1}
70 %{?el7:%global _has_libmodbus 1}
71 %{?el7:%global _has_xmms 1}
72
73 # plugins enabled by default
74 %define with_aggregation 0%{!?_without_aggregation:1}
75 %define with_amqp 0%{!?_without_amqp:1}
76 %define with_apache 0%{!?_without_apache:1}
77 %define with_apcups 0%{!?_without_apcups:1}
78 %define with_ascent 0%{!?_without_ascent:1}
79 %define with_battery 0%{!?_without_battery:1}
80 %define with_bind 0%{!?_without_bind:1}
81 %define with_ceph 0%{!?_without_ceph:0%{?_has_libyajl}}
82 %define with_cgroups 0%{!?_without_cgroups:1}
83 %define with_conntrack 0%{!?_without_conntrack:1}
84 %define with_contextswitch 0%{!?_without_contextswitch:1}
85 %define with_cpu 0%{!?_without_cpu:1}
86 %define with_cpufreq 0%{!?_without_cpufreq:1}
87 %define with_csv 0%{!?_without_csv:1}
88 %define with_curl 0%{!?_without_curl:1}
89 %define with_curl_json 0%{!?_without_curl_json:0%{?_has_libyajl}}
90 %define with_curl_xml 0%{!?_without_curl_xml:1}
91 %define with_dbi 0%{!?_without_dbi:1}
92 %define with_df 0%{!?_without_df:1}
93 %define with_disk 0%{!?_without_disk:1}
94 %define with_dns 0%{!?_without_dns:0%{?_has_recent_libpcap}}
95 %define with_drbd 0%{!?_without_drbd:1}
96 %define with_email 0%{!?_without_email:1}
97 %define with_entropy 0%{!?_without_entropy:1}
98 %define with_ethstat 0%{!?_without_ethstat:0%{?_has_recent_sockios_h}}
99 %define with_exec 0%{!?_without_exec:1}
100 %define with_fhcount 0%{!?_without_fhcount:1}
101 %define with_filecount 0%{!?_without_filecount:1}
102 %define with_fscache 0%{!?_without_fscache:1}
103 %define with_gmond 0%{!?_without_gmond:0%{?_has_recent_libganglia}}
104 %define with_hddtemp 0%{!?_without_hddtemp:1}
105 %define with_interface 0%{!?_without_interface:1}
106 %define with_ipc 0%{!?_without_ipc:1}
107 %define with_ipmi 0%{!?_without_ipmi:1}
108 %define with_iptables 0%{!?_without_iptables:0%{?_has_working_libiptc}}
109 %define with_ipvs 0%{!?_without_ipvs:0%{?_has_ip_vs_h}}
110 %define with_irq 0%{!?_without_irq:1}
111 %define with_java 0%{!?_without_java:1}
112 %define with_virt 0%{!?_without_virt:1}
113 %define with_load 0%{!?_without_load:1}
114 %define with_logfile 0%{!?_without_logfile:1}
115 %define with_log_logstash 0%{!?_without_log_logstash:0%{?_has_libyajl}}
116 %define with_lvm 0%{!?_without_lvm:0%{?_has_lvm2app_h}}
117 %define with_madwifi 0%{!?_without_madwifi:1}
118 %define with_mbmon 0%{!?_without_mbmon:1}
119 %define with_md 0%{!?_without_md:1}
120 %define with_memcachec 0%{!?_without_memcachec:1}
121 %define with_memcached 0%{!?_without_memcached:1}
122 %define with_memory 0%{!?_without_memory:1}
123 %define with_multimeter 0%{!?_without_multimeter:1}
124 %define with_modbus 0%{!?_without_modbus:0%{?_has_libmodbus}}
125 %define with_mqtt 0%{!?_without_mqtt:0%{?_has_libmosquitto}}
126 %define with_mysql 0%{!?_without_mysql:1}
127 %define with_netlink 0%{!?_without_netlink:0%{?_has_iproute}}
128 %define with_network 0%{!?_without_network:1}
129 %define with_nfs 0%{!?_without_nfs:1}
130 %define with_nginx 0%{!?_without_nginx:1}
131 %define with_notify_desktop 0%{!?_without_notify_desktop:1}
132 %define with_notify_email 0%{!?_without_notify_email:1}
133 %define with_notify_nagios 0%{!?_without_notify_nagios:1}
134 %define with_ntpd 0%{!?_without_ntpd:1}
135 %define with_numa 0%{!?_without_numa:1}
136 %define with_nut 0%{!?_without_nut:1}
137 %define with_olsrd 0%{!?_without_olsrd:1}
138 %define with_openldap 0%{!?_without_openldap:1}
139 %define with_openvpn 0%{!?_without_openvpn:1}
140 %define with_perl 0%{!?_without_perl:1}
141 %define with_pinba 0%{!?_without_pinba:1}
142 %define with_ping 0%{!?_without_ping:1}
143 %define with_postgresql 0%{!?_without_postgresql:1}
144 %define with_powerdns 0%{!?_without_powerdns:1}
145 %define with_processes 0%{!?_without_processes:1}
146 %define with_protocols 0%{!?_without_protocols:1}
147 %define with_python 0%{!?_without_python:1}
148 %define with_redis 0%{!?_without_redis:0%{?_has_hiredis}}
149 %define with_rrdcached 0%{!?_without_rrdcached:0%{?_has_recent_librrd}}
150 %define with_rrdtool 0%{!?_without_rrdtool:1}
151 %define with_sensors 0%{!?_without_sensors:1}
152 %define with_serial 0%{!?_without_serial:1}
153 %define with_smart 0%{!?_without_smart:0%{?_has_atasmart}}
154 %define with_snmp 0%{!?_without_snmp:1}
155 %define with_statsd 0%{!?_without_statsd:1}
156 %define with_swap 0%{!?_without_swap:1}
157 %define with_syslog 0%{!?_without_syslog:1}
158 %define with_table 0%{!?_without_table:1}
159 %define with_tail 0%{!?_without_tail:1}
160 %define with_tail_csv 0%{!?_without_tail_csv:1}
161 %define with_tcpconns 0%{!?_without_tcpconns:1}
162 %define with_teamspeak2 0%{!?_without_teamspeak2:1}
163 %define with_ted 0%{!?_without_ted:1}
164 %define with_thermal 0%{!?_without_thermal:1}
165 %define with_threshold 0%{!?_without_threshold:1}
166 %define with_turbostat 0%{!?_without_turbostat:0%{?_has_asm_msr_index}}
167 %define with_unixsock 0%{!?_without_unixsock:1}
168 %define with_uptime 0%{!?_without_uptime:1}
169 %define with_users 0%{!?_without_users:1}
170 %define with_uuid 0%{!?_without_uuid:1}
171 %define with_varnish 0%{!?_without_varnish:1}
172 %define with_vmem 0%{!?_without_vmem:1}
173 %define with_vserver 0%{!?_without_vserver:1}
174 %define with_wireless 0%{!?_without_wireless:1}
175 %define with_write_graphite 0%{!?_without_write_graphite:1}
176 %define with_write_http 0%{!?_without_write_http:1}
177 %define with_write_log 0%{!?_without_write_log:1}
178 %define with_write_redis 0%{!?_without_write_redis:0%{?_has_hiredis}}
179 %define with_write_riemann 0%{!?_without_write_riemann:0%{?_has_recent_riemann_c_client}}
180 %define with_write_sensu 0%{!?_without_write_sensu:1}
181 %define with_write_tsdb 0%{!?_without_write_tsdb:1}
182 %define with_xmms 0%{!?_without_xmms:0%{?_has_xmms}}
183 %define with_zfs_arc 0%{!?_without_zfs_arc:1}
184 %define with_zookeeper 0%{!?_without_zookeeper:1}
185
186 # Plugins not built by default because of dependencies on libraries not
187 # available in RHEL or EPEL:
188
189 # plugin apple_sensors disabled, requires a Mac
190 %define with_apple_sensors 0%{!?_without_apple_sensors:0}
191 # plugin aquaero disabled, requires a libaquaero5
192 %define with_aquaero 0%{!?_without_aquaero:0}
193 # plugin barometer disabled, requires a libi2c
194 %define with_barometer 0%{!?_without_barometer:0}
195 # plugin lpar disabled, requires AIX
196 %define with_lpar 0%{!?_without_lpar:0}
197 # plugin mic disabled, requires Mic
198 %define with_mic 0%{!?_without_mic:0}
199 # plugin netapp disabled, requires libnetapp
200 %define with_netapp 0%{!?_without_netapp:0}
201 # plugin onewire disabled, requires libowfs
202 %define with_onewire 0%{!?_without_onewire:0}
203 # plugin oracle disabled, requires Oracle
204 %define with_oracle 0%{!?_without_oracle:0}
205 # plugin oracle disabled, requires BSD
206 %define with_pf 0%{!?_without_pf:0}
207 # plugin routeros disabled, requires librouteros
208 %define with_routeros 0%{!?_without_routeros:0}
209 # plugin sigrok disabled, requires libsigrok
210 %define with_sigrok 0%{!?_without_sigrok:0}
211 # plugin tape disabled, requires libkstat
212 %define with_tape 0%{!?_without_tape:0}
213 # plugin tokyotyrant disabled, requires tcrdb.h
214 %define with_tokyotyrant 0%{!?_without_tokyotyrant:0}
215 # plugin write_kafka disabled, requires librdkafka
216 %define with_write_kafka 0%{!?_without_write_kafka:0}
217 # plugin write_mongodb disabled, requires libmongoc
218 %define with_write_mongodb 0%{!?_without_write_mongodb:0}
219 # plugin xencpu disabled, requires xen-devel from non-default repo
220 %define with_xencpu 0%{!?_without_xencpu:0}
221 # plugin zone disabled, requires Solaris
222 %define with_zone 0%{!?_without_zone:0}
223
224 Summary:        statistics collection and monitoring daemon
225 Name:           collectd
226 Version:        5.5.1
227 Release:        1%{?dist}
228 URL:            http://collectd.org
229 Source:         http://collectd.org/files/%{name}-%{version}.tar.bz2
230 License:        GPLv2
231 Group:          System Environment/Daemons
232 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
233 BuildRequires:  libgcrypt-devel, kernel-headers, libtool-ltdl-devel, libcap-devel
234 Vendor:         collectd development team <collectd@verplant.org>
235
236 %if 0%{?el7:1}
237 Requires(pre):          initscripts
238 Requires(post):         systemd
239 Requires(preun):        systemd
240 Requires(postun):       systemd
241 %else
242 Requires(post):         chkconfig
243 Requires(preun):        chkconfig, initscripts
244 Requires(postun):       initscripts
245 %endif
246
247 %description
248 collectd is a small daemon which collects system information periodically and
249 provides mechanisms to monitor and store the values in a variety of ways. It
250 is written in C for performance. Since the daemon doesn't need to start up
251 every time it wants to update the values it's very fast and easy on the
252 system. Also, the statistics are very fine grained since the files are updated
253 every 10 seconds by default.
254
255 %if %{with_amqp}
256 %package amqp
257 Summary:        AMQP plugin for collectd
258 Group:          System Environment/Daemons
259 Requires:       %{name}%{?_isa} = %{version}-%{release}
260 BuildRequires:  librabbitmq-devel
261 %description amqp
262 The AMQP plugin transmits or receives values collected by collectd via the
263 Advanced Message Queuing Protocol (AMQP).
264 %endif
265
266 %if %{with_apache}
267 %package apache
268 Summary:        Apache plugin for collectd
269 Group:          System Environment/Daemons
270 Requires:       %{name}%{?_isa} = %{version}-%{release}
271 BuildRequires:  curl-devel
272 %description apache
273 This plugin collects data provided by Apache's `mod_status'.
274 %endif
275
276 %if %{with_aquaero}
277 %package aquaero
278 Summary:        aquaero plugin for collectd
279 Group:          System Environment/Daemons
280 Requires:       %{name}%{?_isa} = %{version}-%{release}
281 %description aquaero
282 Various sensors in the Aquaero 5 watercooling board made by Aquacomputer.
283 %endif
284
285 %if %{with_ascent}
286 %package ascent
287 Summary:        Ascent plugin for collectd
288 Group:          System Environment/Daemons
289 Requires:       %{name}%{?_isa} = %{version}-%{release}
290 BuildRequires:  libxml2-devel, curl-devel
291 %description ascent
292 The Ascent plugin reads and parses the statistics page of Ascent, a free and
293 open-source server software for the game World of Warcraft by Blizzard
294 Entertainment.
295 %endif
296
297 %if %{with_barometer}
298 %package barometer
299 Summary:       barometer plugin for collectd
300 Group:         System Environment/Daemons
301 Requires:      %{name}%{?_isa} = %{version}-%{release}
302 %description barometer
303 Collects pressure and temperature from digital barometers.
304 %endif
305
306 %if %{with_bind}
307 %package bind
308 Summary:        Bind plugin for collectd
309 Group:          System Environment/Daemons
310 Requires:       %{name}%{?_isa} = %{version}-%{release}
311 BuildRequires:  libxml2-devel, curl-devel
312 %description bind
313 The BIND plugin retrieves this information that's encoded in XML and provided
314 via HTTP and submits the values to collectd.
315 %endif
316
317 %if %{with_ceph}
318 %package ceph
319 Summary:       Ceph plugin for collectd
320 Group:         System Environment/Daemons
321 Requires:      %{name}%{?_isa} = %{version}-%{release}
322 BuildRequires: yajl-devel
323 %description ceph
324 Ceph plugin for collectd
325 %endif
326
327 %if %{with_curl}
328 %package curl
329 Summary:        Curl plugin for collectd
330 Group:          System Environment/Daemons
331 Requires:       %{name}%{?_isa} = %{version}-%{release}
332 BuildRequires:  curl-devel
333 %description curl
334 The cURL plugin uses libcurl to read files and then parses them according to
335 the configuration.
336 %endif
337
338 %if %{with_curl_json}
339 %package curl_json
340 Summary:        Curl_json plugin for collectd
341 Group:          System Environment/Daemons
342 Requires:       %{name}%{?_isa} = %{version}-%{release}
343 BuildRequires:  curl-devel, yajl-devel
344 %description curl_json
345 The cURL-JSON plugin queries JavaScript Object Notation (JSON) data using the
346 cURL library and parses it according to the user's configuration.
347 %endif
348
349 %if %{with_curl_xml}
350 %package curl_xml
351 Summary:        Curl_xml plugin for collectd
352 Group:          System Environment/Daemons
353 Requires:       %{name}%{?_isa} = %{version}-%{release}
354 BuildRequires:  curl-devel, libxml2-devel
355 %description curl_xml
356 The cURL-XML plugin reads files using libcurl and parses it as Extensible
357 Markup Language (XML).
358 %endif
359
360 %if %{with_dbi}
361 %package dbi
362 Summary:        DBI plugin for collectd
363 Group:          System Environment/Daemons
364 Requires:       %{name}%{?_isa} = %{version}-%{release}
365 BuildRequires:  libdbi-devel
366 %description dbi
367 The DBI plugin uses libdbi, a database abstraction library, to execute SQL
368 statements on a database and read back the result.
369 %endif
370
371 %if %{with_disk}
372 %package disk
373 Summary:        disk plugin for collectd
374 Group:          System Environment/Daemons
375 Requires:       %{name}%{?_isa} = %{version}-%{release}
376 %{?_has_libudev:BuildRequires:  libudev-devel}
377 %description disk
378 The "disk" plugin collects information about the usage of physical disks and
379 logical disks (partitions).
380 %endif
381
382 %if %{with_dns}
383 %package dns
384 Summary:        DNS plugin for collectd
385 Group:          System Environment/Daemons
386 Requires:       %{name}%{?_isa} = %{version}-%{release}, libpcap >= 1.0
387 BuildRequires:  libpcap-devel >= 1.0
388 %description dns
389 The DNS plugin has a similar functionality to dnstop: It uses libpcap to get a
390 copy of all traffic from/to port UDP/53 (that's the DNS port), interprets the
391 packets and collects statistics of your DNS traffic.
392 %endif
393
394 %if %{with_email}
395 %package email
396 Summary:        Email plugin for collectd
397 Group:          System Environment/Daemons
398 Requires:       %{name}%{?_isa} = %{version}-%{release}, spamassassin
399 %description email
400 This plugin collects data provided by spamassassin.
401 %endif
402
403 %if %{with_gmond}
404 %package gmond
405 Summary:        Gmond plugin for collectd
406 Group:          System Environment/Daemons
407 Requires:       %{name}%{?_isa} = %{version}-%{release}
408 BuildRequires:  ganglia-devel
409 %description gmond
410 The gmond plugin subscribes to a Multicast group to receive data from gmond,
411 the client daemon of the Ganglia project.
412 %endif
413
414 %if %{with_hddtemp}
415 %package hddtemp
416 Summary:        Hddtemp plugin for collectd
417 Group:          System Environment/Daemons
418 Requires:       %{name}%{?_isa} = %{version}-%{release}, hddtemp
419 %description hddtemp
420 The HDDTemp plugin collects the temperature of hard disks. The temperatures are
421 provided via SMART and queried by the external hddtemp daemon.
422 %endif
423
424 %if %{with_ipmi}
425 %package ipmi
426 Summary:        IPMI plugin for collectd
427 Group:          System Environment/Daemons
428 Requires:       %{name}%{?_isa} = %{version}-%{release}
429 BuildRequires:  OpenIPMI-devel
430 %description ipmi
431 The IPMI plugin uses the OpenIPMI library to read hardware sensors from servers
432 using the Intelligent Platform Management Interface (IPMI).
433 %endif
434
435 %if %{with_iptables}
436 %package iptables
437 Summary:        IPtables plugin for collectd
438 Group:          System Environment/Daemons
439 Requires:       %{name}%{?_isa} = %{version}-%{release}
440 BuildRequires:  iptables-devel
441 %description iptables
442 The IPtables plugin can gather statistics from your ip_tables based packet
443 filter (aka. firewall) for both the IPv4 and the IPv6 protocol. It can collect
444 the byte- and packet-counters of selected rules and submit them to collectd.
445 %endif
446
447 %if %{with_java}
448 %package java
449 Summary:        Java plugin for collectd
450 Group:          System Environment/Daemons
451 Requires:       %{name}%{?_isa} = %{version}-%{release}
452 BuildRequires:  java-devel, jpackage-utils
453 Requires:       java, jpackage-utils
454 %description java
455 This plugin for collectd allows plugins to be written in Java and executed
456 in an embedded JVM.
457 %endif
458
459 %if %{with_log_logstash}
460 %package log_logstash
461 Summary:       log_logstash plugin for collectd
462 Group:         System Environment/Daemons
463 Requires:      %{name}%{?_isa} = %{version}-%{release}
464 BuildRequires: yajl-devel
465 %description log_logstash
466 This plugin logs in logstash JSON format
467 %endif
468
469 %if %{with_lvm}
470 %package lvm
471 Summary:        LVM plugin for collectd
472 Group:          System Environment/Daemons
473 Requires:       %{name}%{?_isa} = %{version}-%{release}
474 BuildRequires:  lvm2-devel
475 %description lvm
476 This plugin collects size of “Logical Volumes” (LV) and “Volume Groups” (VG)
477 of Linux' “Logical Volume Manager” (LVM).
478 %endif
479
480 %if %{with_memcachec}
481 %package memcachec
482 Summary:        Memcachec plugin for collectd
483 Group:          System Environment/Daemons
484 Requires:       %{name}%{?_isa} = %{version}-%{release}
485 BuildRequires:  libmemcached-devel
486 %description memcachec
487 The Memcachec plugin uses libmemcached to read statistics from a Memcached
488 instance. Note that another plugin, named `memcached', exists and does a
489 similar job, without requiring the installation of libmemcached.
490 %endif
491
492 %if %{with_mic}
493 %package mic
494 Summary:        mic plugin for collectd
495 Group:          System Environment/Daemons
496 Requires:       %{name}%{?_isa} = %{version}-%{release}
497 %description mic
498 The mic plugin collects CPU usage, memory usage, temperatures and power
499 consumption from Intel Many Integrated Core (MIC) CPUs.
500 %endif
501
502 %if %{with_modbus}
503 %package modbus
504 Summary:       modbus plugin for collectd
505 Group:         System Environment/Daemons
506 Requires:      %{name}%{?_isa} = %{version}-%{release}
507 BuildRequires:  libmodbus-devel
508 %description modbus
509 The modbus plugin collects values from Modbus/TCP enabled devices
510 %endif
511
512 %if %{with_mysql}
513 %package mysql
514 Summary:        MySQL plugin for collectd
515 Group:          System Environment/Daemons
516 Requires:       %{name}%{?_isa} = %{version}-%{release}
517 BuildRequires:  mysql-devel
518 %description mysql
519 MySQL querying plugin. This plugin provides data of issued commands, called
520 handlers and database traffic.
521 %endif
522
523 %if %{with_mqtt}
524 %package mqtt
525 Summary:        mqtt plugin for collectd
526 Group:          System Environment/Daemons
527 Requires:       %{name}%{?_isa} = %{version}-%{release}
528 BuildRequires:  mosquitto-devel
529 %description mqtt
530 The MQTT plugin publishes and subscribes to MQTT topics.
531 %endif
532
533 %if %{with_netlink}
534 %package netlink
535 Summary:        netlink plugin for collectd
536 Group:          System Environment/Daemons
537 Requires:       %{name}%{?_isa} = %{version}-%{release}
538 BuildRequires:  libmnl-devel, iproute-devel
539 %description netlink
540 The netlink plugin collects detailed network interface and routing statistics.
541 %endif
542
543 %if %{with_nginx}
544 %package nginx
545 Summary:        Nginx plugin for collectd
546 Group:          System Environment/Daemons
547 Requires:       %{name}%{?_isa} = %{version}-%{release}
548 BuildRequires:  curl-devel
549 %description nginx
550 This plugin gets data provided by nginx.
551 %endif
552
553 %if %{with_notify_desktop}
554 %package notify_desktop
555 Summary:        Notify_desktop plugin for collectd
556 Group:          System Environment/Daemons
557 Requires:       %{name}%{?_isa} = %{version}-%{release}
558 BuildRequires:  libnotify-devel, gtk2-devel
559 %description notify_desktop
560 The Notify Desktop plugin uses libnotify to display notifications to the user
561 via the desktop notification specification, i. e. on an X display.
562 %endif
563
564 %if %{with_notify_email}
565 %package notify_email
566 Summary:        Notify_email plugin for collectd
567 Group:          System Environment/Daemons
568 Requires:       %{name}%{?_isa} = %{version}-%{release}
569 BuildRequires:  libesmtp-devel
570 %description notify_email
571 The Notify Email plugin uses libESMTP to send notifications to a configured
572 email address.
573 %endif
574
575 %if %{with_nut}
576 %package nut
577 Summary:        Nut plugin for collectd
578 Group:          System Environment/Daemons
579 Requires:       %{name}%{?_isa} = %{version}-%{release}
580 BuildRequires:  nut-devel
581 %description nut
582 This plugin for collectd provides Network UPS Tools support.
583 %endif
584
585 %if %{with_openldap}
586 %package openldap
587 Summary:       Openldap plugin for collectd
588 Group:         System Environment/Daemons
589 Requires:      %{name}%{?_isa} = %{version}-%{release}
590 BuildRequires: openldap-devel
591 %description openldap
592 This plugin reads monitoring information from OpenLDAP's cn=Monitor subtree.
593 %endif
594
595 %if %{with_perl}
596 %package perl
597 Summary:        Perl plugin for collectd
598 Group:          System Environment/Daemons
599 Requires:       %{name}%{?_isa} = %{version}-%{release}
600 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
601         %if 0%{?rhel} >= 6
602 BuildRequires:  perl-ExtUtils-Embed
603         %else
604 BuildRequires:  perl
605         %endif
606 %description perl
607 The Perl plugin embeds a Perl interpreter into collectd and exposes the
608 application programming interface (API) to Perl-scripts.
609 %endif
610
611 %if %{with_pinba}
612 %package pinba
613 Summary:        Pinba plugin for collectd
614 Group:          System Environment/Daemons
615 Requires:       %{name}%{?_isa} = %{version}-%{release}
616 BuildRequires:  protobuf-c-devel
617 %description pinba
618 The Pinba plugin receives and dispatches timing values from Pinba, a profiling
619 extension for PHP.
620 %endif
621
622 %if %{with_ping}
623 %package ping
624 Summary:        Ping plugin for collectd
625 Group:          System Environment/Daemons
626 Requires:       %{name}%{?_isa} = %{version}-%{release}
627 BuildRequires:  liboping-devel
628 %description ping
629 The Ping plugin measures network latency using ICMP “echo requests”, usually
630 known as “ping”.
631 %endif
632
633 %if %{with_postgresql}
634 %package postgresql
635 Summary:        PostgreSQL plugin for collectd
636 Group:          System Environment/Daemons
637 Requires:       %{name}%{?_isa} = %{version}-%{release}
638 BuildRequires:  postgresql-devel
639 %description postgresql
640 The PostgreSQL plugin connects to and executes SQL statements on a PostgreSQL
641 database.
642 %endif
643
644 %if %{with_python}
645 %package python
646 Summary:        Python plugin for collectd
647 Group:          System Environment/Daemons
648 Requires:       %{name}%{?_isa} = %{version}-%{release}
649         %if 0%{?rhel} >= 6
650 BuildRequires: python-devel
651         %else
652 BuildRequires: python26-devel
653         %endif
654 %description python
655 The Python plugin embeds a Python interpreter into collectd and exposes the
656 application programming interface (API) to Python-scripts.
657 %endif
658
659 %if %{with_redis}
660 %package redis
661 Summary:        Redis plugin for collectd
662 Group:          System Environment/Daemons
663 Requires:       %{name}%{?_isa} = %{version}-%{release}
664 BuildRequires:  hiredis-devel
665 %description redis
666 The Redis plugin connects to one or more instances of Redis, a key-value store,
667 and collects usage information using the hiredis library.
668 %endif
669
670 %if %{with_rrdcached}
671 %package rrdcached
672 Summary:        RRDCached plugin for collectd
673 Group:          System Environment/Daemons
674 Requires:       %{name}%{?_isa} = %{version}-%{release}, rrdtool >= 1.4
675 BuildRequires:  rrdtool-devel
676 %description rrdcached
677 The RRDCacheD plugin connects to the “RRD caching daemon”, rrdcached and
678 submits updates for RRD files to that daemon.
679 %endif
680
681 %if %{with_rrdtool}
682 %package rrdtool
683 Summary:        RRDtool plugin for collectd
684 Group:          System Environment/Daemons
685 Requires:       %{name}%{?_isa} = %{version}-%{release}
686 BuildRequires:  rrdtool-devel
687 %description rrdtool
688 The RRDtool plugin writes values to RRD-files using librrd.
689 %endif
690
691 %if %{with_sensors}
692 %package sensors
693 Summary:        Sensors plugin for collectd
694 Group:          System Environment/Daemons
695 Requires:       %{name}%{?_isa} = %{version}-%{release}
696 BuildRequires:  lm_sensors-devel
697 %description sensors
698 This plugin for collectd provides querying of sensors supported by lm_sensors.
699 %endif
700
701 %if %{with_sigrok}
702 %package sigrok
703 Summary:        sigrok plugin for collectd
704 Group:          System Environment/Daemons
705 Requires:       %{name}%{?_isa} = %{version}-%{release}
706 %description sigrok
707 Uses libsigrok as a backend, allowing any sigrok-supported device to have its
708 measurements fed to collectd. This includes multimeters, sound level meters,
709 thermometers, and much more.
710 %endif
711
712 %if %{with_smart}
713 %package smart
714 Summary:       SMART plugin for collectd
715 Group:         System Environment/Daemons
716 Requires:      %{name}%{?_isa} = %{version}-%{release}
717 BuildRequires: libatasmart-devel
718 %description smart
719 Collect SMART statistics, notably load cycle count, temperature and bad
720 sectors.
721 %endif
722
723 %if %{with_snmp}
724 %package snmp
725 Summary:        SNMP plugin for collectd
726 Group:          System Environment/Daemons
727 Requires:       %{name}%{?_isa} = %{version}-%{release}
728 BuildRequires:  net-snmp-devel
729 %description snmp
730 This plugin for collectd allows querying of network equipment using SNMP.
731 %endif
732
733 %if %{with_varnish}
734 %package varnish
735 Summary:        Varnish plugin for collectd
736 Group:          System Environment/Daemons
737 Requires:       %{name}%{?_isa} = %{version}-%{release}
738 BuildRequires:  varnish-libs-devel
739 %description varnish
740 The Varnish plugin collects information about Varnish, an HTTP accelerator.
741 %endif
742
743 %if %{with_virt}
744 %package virt
745 Summary:        Virt plugin for collectd
746 Group:          System Environment/Daemons
747 Requires:       %{name}%{?_isa} = %{version}-%{release}
748 BuildRequires:  libvirt-devel
749 %description virt
750 This plugin collects information from virtualized guests.
751 %endif
752
753 %if %{with_write_http}
754 %package write_http
755 Summary:        Write-HTTP plugin for collectd
756 Group:          System Environment/Daemons
757 Requires:       %{name}%{?_isa} = %{version}-%{release}
758 BuildRequires:  curl-devel
759 %description write_http
760 The Write-HTTP plugin sends the values collected by collectd to a web-server
761 using HTTP POST requests.
762 %endif
763
764 %if %{with_write_kafka}
765 %package write_kafka
766 Summary:       Write-kafka plugin for collectd
767 Group:         System Environment/Daemons
768 Requires:      %{name}%{?_isa} = %{version}-%{release}
769 BuildRequires: rdkafka-devel
770 %description write_kafka
771 The write_kafka plugin sends values to kafka, a distributed messaging system.
772 %endif
773
774 %if %{with_write_redis}
775 %package write_redis
776 Summary:        Write-Redis plugin for collectd
777 Group:          System Environment/Daemons
778 Requires:       %{name}%{?_isa} = %{version}-%{release}
779 BuildRequires:  hiredis-devel
780 %description write_redis
781 The Write Redis plugin stores values in Redis, a “data structures server”.
782 %endif
783
784 %if %{with_write_riemann}
785 %package write_riemann
786 Summary:        riemann plugin for collectd
787 Group:          System Environment/Daemons
788 Requires:       %{name}%{?_isa} = %{version}-%{release}
789 BuildRequires:  protobuf-c-devel
790 %description write_riemann
791 The riemann plugin submits values to Riemann, an event stream processor.
792 %endif
793
794 %if %{with_xencpu}
795 %package xencpu
796 Summary:        xencpu plugin for collectd
797 Group:          System Environment/Daemons
798 Requires:       %{name}%{?_isa} = %{version}-%{release}
799 BuildRequires:  xen-devel
800 %description xencpu
801 The xencpu plugin collects CPU statistics from Xen.
802 %endif
803
804 %if %{with_xmms}
805 %package xmms
806 Summary:        XMMS plugin for collectd
807 Group:          System Environment/Daemons
808 Requires:       %{name}%{?_isa} = %{version}-%{release}
809 BuildRequires:  xmms-devel
810 %description xmms
811 The xmms plugin collects information from the XMMS music player.
812 %endif
813
814 %package collection3
815 Summary:        Web-based viewer for collectd
816 Group:          System Environment/Daemons
817 Requires:       %{name}%{?_isa} = %{version}-%{release}
818 Requires: httpd
819 %description collection3
820 collection3 is a graphing front-end for the RRD files created by and filled
821 with collectd. It is written in Perl and should be run as an CGI-script.
822 Graphs are generated on-the-fly, so no cron job or similar is necessary.
823
824 %package php-collection
825 Summary:        collect php webfrontent
826 Group:          System Environment/Daemons
827 Requires:       collectd = %{version}-%{release}
828 Requires:       httpd
829 Requires:       php
830 Requires:       php-rrdtool
831 %description php-collection
832 PHP graphing frontend for RRD files created by and filled with collectd.
833
834 %package contrib
835 Summary:        Contrib files for collectd
836 Group:          System Environment/Daemons
837 Requires:       %{name}%{?_isa} = %{version}-%{release}
838 %description contrib
839 All the files found under contrib/ in the source tree are bundled in this
840 package.
841
842 %package -n libcollectdclient
843 Summary:        Collectd client library
844 Group:          System Environment/Daemons
845 %description -n libcollectdclient
846 Collectd client library
847
848 %package -n libcollectdclient-devel
849 Summary:        Development files for libcollectdclient
850 Group:          System Environment/Daemons
851 Requires:       pkgconfig
852 Requires:       libcollectdclient%{?_isa} = %{version}-%{release}
853 %description -n libcollectdclient-devel
854 Development files for libcollectdclient
855
856 %package -n collectd-utils
857 Summary:        Collectd utilities
858 Group:          System Environment/Daemons
859 Requires:       libcollectdclient%{?_isa} = %{version}-%{release}
860 Requires:       collectd%{?_isa} = %{version}-%{release}
861 %description -n collectd-utils
862 Collectd utilities
863
864 %prep
865 %setup -q
866
867 %build
868 %if %{with_aggregation}
869 %define _with_aggregation --enable-aggregation
870 %else
871 %define _with_aggregation --disable-aggregation
872 %endif
873
874 %if %{with_amqp}
875 %define _with_amqp --enable-amqp
876 %else
877 %define _with_amqp --disable-amqp
878 %endif
879
880 %if %{with_apache}
881 %define _with_apache --enable-apache
882 %else
883 %define _with_apache --disable-apache
884 %endif
885
886 %if %{with_apcups}
887 %define _with_apcups --enable-apcups
888 %else
889 %define _with_apcups --disable-apcups
890 %endif
891
892 %if %{with_apple_sensors}
893 %define _with_apple_sensors --enable-apple_sensors
894 %else
895 %define _with_apple_sensors --disable-apple_sensors
896 %endif
897
898 %if %{with_aquaero}
899 %define _with_aquaero --enable-aquaero
900 %else
901 %define _with_aquaero --disable-aquaero
902 %endif
903
904 %if %{with_ascent}
905 %define _with_ascent --enable-ascent
906 %else
907 %define _with_ascent --disable-ascent
908 %endif
909
910 %if %{with_barometer}
911 %define _with_barometer --enable-barometer
912 %else
913 %define _with_barometer --disable-barometer
914 %endif
915
916 %if %{with_battery}
917 %define _with_battery --enable-battery
918 %else
919 %define _with_battery --disable-battery
920 %endif
921
922 %if %{with_bind}
923 %define _with_bind --enable-bind
924 %else
925 %define _with_bind --disable-bind
926 %endif
927
928 %if %{with_cgroups}
929 %define _with_cgroups --enable-cgroups
930 %else
931 %define _with_cgroups --disable-cgroups
932 %endif
933
934 %if %{with_conntrack}
935 %define _with_conntrack --enable-conntrack
936 %else
937 %define _with_conntrack --disable-conntrack
938 %endif
939
940 %if %{with_contextswitch}
941 %define _with_contextswitch --enable-contextswitch
942 %else
943 %define _with_contextswitch --disable-contextswitch
944 %endif
945
946 %if %{with_cpu}
947 %define _with_cpu --enable-cpu
948 %else
949 %define _with_cpu --disable-cpu
950 %endif
951
952 %if %{with_cpufreq}
953 %define _with_cpufreq --enable-cpufreq
954 %else
955 %define _with_cpufreq --disable-cpufreq
956 %endif
957
958 %if %{with_csv}
959 %define _with_csv --enable-csv
960 %else
961 %define _with_csv --disable-csv
962 %endif
963
964 %if %{with_ceph}
965 %define _with_ceph --enable-ceph
966 %else
967 %define _with_ceph --disable-ceph
968 %endif
969
970 %if %{with_curl}
971 %define _with_curl --enable-curl
972 %else
973 %define _with_curl --disable-curl
974 %endif
975
976 %if %{with_curl_json}
977 %define _with_curl_json --enable-curl_json
978 %else
979 %define _with_curl_json --disable-curl_json
980 %endif
981
982 %if %{with_curl_xml}
983 %define _with_curl_xml --enable-curl_xml
984 %else
985 %define _with_curl_xml --disable-curl_xml
986 %endif
987
988 %if %{with_dbi}
989 %define _with_dbi --enable-dbi
990 %else
991 %define _with_dbi --disable-dbi
992 %endif
993
994 %if %{with_df}
995 %define _with_df --enable-df
996 %else
997 %define _with_df --disable-df
998 %endif
999
1000 %if %{with_disk}
1001 %define _with_disk --enable-disk
1002 %else
1003 %define _with_disk --disable-disk
1004 %endif
1005
1006 %if %{with_dns}
1007 %define _with_dns --enable-dns
1008 %else
1009 %define _with_dns --disable-dns
1010 %endif
1011
1012 %if %{with_drbd}
1013 %define _with_drbd --enable-drbd
1014 %else
1015 %define _with_drbd --disable-drbd
1016 %endif
1017
1018 %if %{with_email}
1019 %define _with_email --enable-email
1020 %else
1021 %define _with_email --disable-email
1022 %endif
1023
1024 %if %{with_entropy}
1025 %define _with_entropy --enable-entropy
1026 %else
1027 %define _with_entropy --disable-entropy
1028 %endif
1029
1030 %if %{with_ethstat}
1031 %define _with_ethstat --enable-ethstat
1032 %else
1033 %define _with_ethstat --disable-ethstat
1034 %endif
1035
1036 %if %{with_exec}
1037 %define _with_exec --enable-exec
1038 %else
1039 %define _with_exec --disable-exec
1040 %endif
1041
1042 %if %{with_fhcount}
1043 %define _with_fhcount --enable-fhcount
1044 %else
1045 %define _with_fhcount --disable-fhcount
1046 %endif
1047
1048 %if %{with_filecount}
1049 %define _with_filecount --enable-filecount
1050 %else
1051 %define _with_filecount --disable-filecount
1052 %endif
1053
1054 %if %{with_fscache}
1055 %define _with_fscache --enable-fscache
1056 %else
1057 %define _with_fscache --disable-fscache
1058 %endif
1059
1060 %if %{with_gmond}
1061 %define _with_gmond --enable-gmond
1062 %else
1063 %define _with_gmond --disable-gmond
1064 %endif
1065
1066 %if %{with_hddtemp}
1067 %define _with_hddtemp --enable-hddtemp
1068 %else
1069 %define _with_hddtemp --disable-hddtemp
1070 %endif
1071
1072 %if %{with_interface}
1073 %define _with_interface --enable-interface
1074 %else
1075 %define _with_interface --disable-interface
1076 %endif
1077
1078 %if %{with_ipc}
1079 %define _with_ipc --enable-ipc
1080 %else
1081 %define _with_ipc --disable-ipc
1082 %endif
1083
1084 %if %{with_ipmi}
1085 %define _with_ipmi --enable-ipmi
1086 %else
1087 %define _with_ipmi --disable-ipmi
1088 %endif
1089
1090 %if %{with_iptables}
1091 %define _with_iptables --enable-iptables
1092 %else
1093 %define _with_iptables --disable-iptables
1094 %endif
1095
1096 %if %{with_ipvs}
1097 %define _with_ipvs --enable-ipvs
1098 %else
1099 %define _with_ipvs --disable-ipvs
1100 %endif
1101
1102 %if %{with_irq}
1103 %define _with_irq --enable-irq
1104 %else
1105 %define _with_irq --disable-irq
1106 %endif
1107
1108 %if %{with_java}
1109 %define _with_java --enable-java --with-java=%{java_home}/
1110 %else
1111 %define _with_java --disable-java
1112 %endif
1113
1114 %if %{with_virt}
1115 %define _with_virt --enable-virt
1116 %else
1117 %define _with_virt --disable-virt
1118 %endif
1119
1120 %if %{with_load}
1121 %define _with_load --enable-load
1122 %else
1123 %define _with_load --disable-load
1124 %endif
1125
1126 %if %{with_logfile}
1127 %define _with_logfile --enable-logfile
1128 %else
1129 %define _with_logfile --disable-logfile
1130 %endif
1131
1132 %if %{with_log_logstash}
1133 %define _with_log_logstash --enable-log_logstash
1134 %else
1135 %define _with_log_logstash --disable-log_logstash
1136 %endif
1137
1138 %if %{with_lpar}
1139 %define _with_lpar --enable-lpar
1140 %else
1141 %define _with_lpar --disable-lpar
1142 %endif
1143
1144 %if %{with_lvm}
1145 %define _with_lvm --enable-lvm
1146 %else
1147 %define _with_lvm --disable-lvm
1148 %endif
1149
1150 %if %{with_madwifi}
1151 %define _with_madwifi --enable-madwifi
1152 %else
1153 %define _with_madwifi --disable-madwifi
1154 %endif
1155
1156 %if %{with_mbmon}
1157 %define _with_mbmon --enable-mbmon
1158 %else
1159 %define _with_mbmon --disable-mbmon
1160 %endif
1161
1162 %if %{with_md}
1163 %define _with_md --enable-md
1164 %else
1165 %define _with_md --disable-md
1166 %endif
1167
1168 %if %{with_memcachec}
1169 %define _with_memcachec --enable-memcachec
1170 %else
1171 %define _with_memcachec --disable-memcachec
1172 %endif
1173
1174 %if %{with_memcached}
1175 %define _with_memcached --enable-memcached
1176 %else
1177 %define _with_memcached --disable-memcached
1178 %endif
1179
1180 %if %{with_memory}
1181 %define _with_memory --enable-memory
1182 %else
1183 %define _with_memory --disable-memory
1184 %endif
1185
1186 %if %{with_mic}
1187 %define _with_mic --enable-mic
1188 %else
1189 %define _with_mic --disable-mic
1190 %endif
1191
1192 %if %{with_modbus}
1193 %define _with_modbus --enable-modbus
1194 %else
1195 %define _with_modbus --disable-modbus
1196 %endif
1197
1198 %if %{with_multimeter}
1199 %define _with_multimeter --enable-multimeter
1200 %else
1201 %define _with_multimeter --disable-multimeter
1202 %endif
1203
1204 %if %{with_mqtt}
1205 %define _with_mqtt --enable-mqtt
1206 %else
1207 %define _with_mqtt --disable-mqtt
1208 %endif
1209
1210 %if %{with_mysql}
1211 %define _with_mysql --enable-mysql
1212 %else
1213 %define _with_mysql --disable-mysql
1214 %endif
1215
1216 %if %{with_netapp}
1217 %define _with_netapp --enable-netapp
1218 %else
1219 %define _with_netapp --disable-netapp
1220 %endif
1221
1222 %if %{with_netlink}
1223 %define _with_netlink --enable-netlink
1224 %else
1225 %define _with_netlink --disable-netlink
1226 %endif
1227
1228 %if %{with_network}
1229 %define _with_network --enable-network
1230 %else
1231 %define _with_network --disable-network
1232 %endif
1233
1234 %if %{with_nfs}
1235 %define _with_nfs --enable-nfs
1236 %else
1237 %define _with_nfs --disable-nfs
1238 %endif
1239
1240 %if %{with_nginx}
1241 %define _with_nginx --enable-nginx
1242 %else
1243 %define _with_nginx --disable-nginx
1244 %endif
1245
1246 %if %{with_notify_desktop}
1247 %define _with_notify_desktop --enable-notify_desktop
1248 %else
1249 %define _with_notify_desktop --disable-notify_desktop
1250 %endif
1251
1252 %if %{with_notify_email}
1253 %define _with_notify_email --enable-notify_email
1254 %else
1255 %define _with_notify_email --disable-notify_email
1256 %endif
1257
1258 %if %{with_notify_nagios}
1259 %define _with_notify_nagios --enable-notify_nagios
1260 %else
1261 %define _with_notify_nagios --disable-notify_nagios
1262 %endif
1263
1264 %if %{with_ntpd}
1265 %define _with_ntpd --enable-ntpd
1266 %else
1267 %define _with_ntpd --disable-ntpd
1268 %endif
1269
1270 %if %{with_numa}
1271 %define _with_numa --enable-numa
1272 %else
1273 %define _with_numa --disable-numa
1274 %endif
1275
1276 %if %{with_nut}
1277 %define _with_nut --enable-nut
1278 %else
1279 %define _with_nut --disable-nut
1280 %endif
1281
1282 %if %{with_olsrd}
1283 %define _with_olsrd --enable-olsrd
1284 %else
1285 %define _with_olsrd --disable-olsrd
1286 %endif
1287
1288 %if %{with_onewire}
1289 %define _with_onewire --enable-onewire
1290 %else
1291 %define _with_onewire --disable-onewire
1292 %endif
1293
1294 %if %{with_openldap}
1295 %define _with_openldap --enable-openldap
1296 %else
1297 %define _with_openldap --disable-openldap
1298 %endif
1299
1300 %if %{with_openvpn}
1301 %define _with_openvpn --enable-openvpn
1302 %else
1303 %define _with_openvpn --disable-openvpn
1304 %endif
1305
1306 %if %{with_oracle}
1307 %define _with_oracle --enable-oracle
1308 %else
1309 %define _with_oracle --disable-oracle
1310 %endif
1311
1312 %if %{with_perl}
1313 %define _with_perl --enable-perl --with-perl-bindings="INSTALLDIRS=vendor"
1314 %else
1315 %define _with_perl --disable-perl
1316 %endif
1317
1318 %if %{with_pf}
1319 %define _with_pf --enable-pf
1320 %else
1321 %define _with_pf --disable-pf
1322 %endif
1323
1324 %if %{with_pinba}
1325 %define _with_pinba --enable-pinba
1326 %else
1327 %define _with_pinba --disable-pinba
1328 %endif
1329
1330 %if %{with_ping}
1331 %define _with_ping --enable-ping
1332 %else
1333 %define _with_ping --disable-ping
1334 %endif
1335
1336 %if %{with_postgresql}
1337 %define _with_postgresql --enable-postgresql
1338 %else
1339 %define _with_postgresql --disable-postgresql
1340 %endif
1341
1342 %if %{with_powerdns}
1343 %define _with_powerdns --enable-powerdns
1344 %else
1345 %define _with_powerdns --disable-powerdns
1346 %endif
1347
1348 %if %{with_processes}
1349 %define _with_processes --enable-processes
1350 %else
1351 %define _with_processes --disable-processes
1352 %endif
1353
1354 %if %{with_protocols}
1355 %define _with_protocols --enable-protocols
1356 %else
1357 %define _with_protocols --disable-protocols
1358 %endif
1359
1360 %if %{with_python}
1361         %if 0%{?rhel} >= 6
1362 %define _with_python --enable-python
1363         %else
1364 %define _with_python --enable-python --with-python=%{_bindir}/python2.6
1365         %endif
1366 %else
1367 %define _with_python --disable-python
1368 %endif
1369
1370 %if %{with_redis}
1371 %define _with_redis --enable-redis
1372 %else
1373 %define _with_redis --disable-redis
1374 %endif
1375
1376 %if %{with_routeros}
1377 %define _with_routeros --enable-routeros
1378 %else
1379 %define _with_routeros --disable-routeros
1380 %endif
1381
1382 %if %{with_rrdcached}
1383 %define _with_rrdcached --enable-rrdcached
1384 %else
1385 %define _with_rrdcached --disable-rrdcached
1386 %endif
1387
1388 %if %{with_rrdtool}
1389 %define _with_rrdtool --enable-rrdtool
1390 %else
1391 %define _with_rrdtool --disable-rrdtool
1392 %endif
1393
1394 %if %{with_sensors}
1395 %define _with_sensors --enable-sensors
1396 %else
1397 %define _with_sensors --disable-sensors
1398 %endif
1399
1400 %if %{with_serial}
1401 %define _with_serial --enable-serial
1402 %else
1403 %define _with_serial --disable-serial
1404 %endif
1405
1406 %if %{with_sigrok}
1407 %define _with_sigrok --enable-sigrok
1408 %else
1409 %define _with_sigrok --disable-sigrok
1410 %endif
1411
1412 %if %{with_smart}
1413 %define _with_smart --enable-smart
1414 %else
1415 %define _with_smart --disable-smart
1416 %endif
1417
1418 %if %{with_snmp}
1419 %define _with_snmp --enable-snmp
1420 %else
1421 %define _with_snmp --disable-snmp
1422 %endif
1423
1424 %if %{with_statsd}
1425 %define _with_statsd --enable-statsd
1426 %else
1427 %define _with_statsd --disable-statsd
1428 %endif
1429
1430 %if %{with_swap}
1431 %define _with_swap --enable-swap
1432 %else
1433 %define _with_swap --disable-swap
1434 %endif
1435
1436 %if %{with_syslog}
1437 %define _with_syslog --enable-syslog
1438 %else
1439 %define _with_syslog --disable-syslog
1440 %endif
1441
1442 %if %{with_table}
1443 %define _with_table --enable-table
1444 %else
1445 %define _with_table --disable-table
1446 %endif
1447
1448 %if %{with_tail}
1449 %define _with_tail --enable-tail
1450 %else
1451 %define _with_tail --disable-tail
1452 %endif
1453
1454 %if %{with_tail_csv}
1455 %define _with_tail_csv --enable-tail_csv
1456 %else
1457 %define _with_tail_csv --disable-tail_csv
1458 %endif
1459
1460 %if %{with_tape}
1461 %define _with_tape --enable-tape
1462 %else
1463 %define _with_tape --disable-tape
1464 %endif
1465
1466 %if %{with_tcpconns}
1467 %define _with_tcpconns --enable-tcpconns
1468 %else
1469 %define _with_tcpconns --disable-tcpconns
1470 %endif
1471
1472 %if %{with_teamspeak2}
1473 %define _with_teamspeak2 --enable-teamspeak2
1474 %else
1475 %define _with_teamspeak2 --disable-teamspeak2
1476 %endif
1477
1478 %if %{with_ted}
1479 %define _with_ted --enable-ted
1480 %else
1481 %define _with_ted --disable-ted
1482 %endif
1483
1484 %if %{with_thermal}
1485 %define _with_thermal --enable-thermal
1486 %else
1487 %define _with_thermal --disable-thermal
1488 %endif
1489
1490 %if %{with_threshold}
1491 %define _with_threshold --enable-threshold
1492 %else
1493 %define _with_threshold --disable-threshold
1494 %endif
1495
1496 %if %{with_tokyotyrant}
1497 %define _with_tokyotyrant --enable-tokyotyrant
1498 %else
1499 %define _with_tokyotyrant --disable-tokyotyrant
1500 %endif
1501
1502 %if %{with_turbostat}
1503 %define _with_turbostat --enable-turbostat
1504 %else
1505 %define _with_turbostat --disable-turbostat
1506 %endif
1507
1508 %if %{with_unixsock}
1509 %define _with_unixsock --enable-unixsock
1510 %else
1511 %define _with_unixsock --disable-unixsock
1512 %endif
1513
1514 %if %{with_uptime}
1515 %define _with_uptime --enable-uptime
1516 %else
1517 %define _with_uptime --disable-uptime
1518 %endif
1519
1520 %if %{with_users}
1521 %define _with_users --enable-users
1522 %else
1523 %define _with_users --disable-users
1524 %endif
1525
1526 %if %{with_uuid}
1527 %define _with_uuid --enable-uuid
1528 %else
1529 %define _with_uuid --disable-uuid
1530 %endif
1531
1532 %if %{with_varnish}
1533 %define _with_varnish --enable-varnish
1534 %else
1535 %define _with_varnish --disable-varnish
1536 %endif
1537
1538 %if %{with_vmem}
1539 %define _with_vmem --enable-vmem
1540 %else
1541 %define _with_vmem --disable-vmem
1542 %endif
1543
1544 %if %{with_vserver}
1545 %define _with_vserver --enable-vserver
1546 %else
1547 %define _with_vserver --disable-vserver
1548 %endif
1549
1550 %if %{with_wireless}
1551 %define _with_wireless --enable-wireless
1552 %else
1553 %define _with_wireless --disable-wireless
1554 %endif
1555
1556 %if %{with_write_graphite}
1557 %define _with_write_graphite --enable-write_graphite
1558 %else
1559 %define _with_write_graphite --disable-write_graphite
1560 %endif
1561
1562 %if %{with_write_http}
1563 %define _with_write_http --enable-write_http
1564 %else
1565 %define _with_write_http --disable-write_http
1566 %endif
1567
1568 %if %{with_write_kafka}
1569 %define _with_write_kafka --enable-write_kafka
1570 %else
1571 %define _with_write_kafka --disable-write_kafka
1572 %endif
1573
1574 %if %{with_write_log}
1575 %define _with_write_log --enable-write_log
1576 %else
1577 %define _with_write_log --disable-write_log
1578 %endif
1579
1580 %if %{with_write_mongodb}
1581 %define _with_write_mongodb --enable-write_mongodb
1582 %else
1583 %define _with_write_mongodb --disable-write_mongodb
1584 %endif
1585
1586 %if %{with_write_redis}
1587 %define _with_write_redis --enable-write_redis
1588 %else
1589 %define _with_write_redis --disable-write_redis
1590 %endif
1591
1592 %if %{with_write_riemann}
1593 %define _with_write_riemann --enable-write_riemann
1594 %else
1595 %define _with_write_riemann --disable-write_riemann
1596 %endif
1597
1598 %if %{with_write_sensu}
1599 %define _with_write_sensu --enable-write_sensu
1600 %else
1601 %define _with_write_sensu --disable-write_sensu
1602 %endif
1603
1604 %if %{with_write_tsdb}
1605 %define _with_write_tsdb --enable-write_tsdb
1606 %else
1607 %define _with_write_tsdb --disable-write_tsdb
1608 %endif
1609
1610 %if %{with_xencpu}
1611 %define _with_xencpu --enable-xencpu
1612 %else
1613 %define _with_xencpu --disable-xencpu
1614 %endif
1615
1616 %if %{with_xmms}
1617 %define _with_xmms --enable-xmms
1618 %else
1619 %define _with_xmms --disable-xmms
1620 %endif
1621
1622 %if %{with_zfs_arc}
1623 %define _with_zfs_arc --enable-zfs_arc
1624 %else
1625 %define _with_zfs_arc --disable-zfs_arc
1626 %endif
1627
1628 %if %{with_zone}
1629 %define _with_zone --enable-zone
1630 %else
1631 %define _with_zone --disable-zone
1632 %endif
1633
1634 %if %{with_zookeeper}
1635 %define _with_zookeeper --enable-zookeeper
1636 %else
1637 %define _with_zookeeper --disable-zookeeper
1638 %endif
1639
1640 %configure CFLAGS="%{optflags} -DLT_LAZY_OR_NOW=\"RTLD_LAZY|RTLD_GLOBAL\"" \
1641         --disable-static \
1642         --without-included-ltdl \
1643         --enable-all-plugins=yes \
1644         --enable-match_empty_counter \
1645         --enable-match_hashed \
1646         --enable-match_regex \
1647         --enable-match_timediff \
1648         --enable-match_value \
1649         --enable-target_notification \
1650         --enable-target_replace \
1651         --enable-target_scale \
1652         --enable-target_set \
1653         --enable-target_v5upgrade \
1654         %{?_with_aggregation} \
1655         %{?_with_amqp} \
1656         %{?_with_apache} \
1657         %{?_with_apcups} \
1658         %{?_with_apple_sensors} \
1659         %{?_with_aquaero} \
1660         %{?_with_ascent} \
1661         %{?_with_barometer} \
1662         %{?_with_battery} \
1663         %{?_with_bind} \
1664         %{?_with_ceph} \
1665         %{?_with_cgroups} \
1666         %{?_with_conntrack} \
1667         %{?_with_contextswitch} \
1668         %{?_with_cpu} \
1669         %{?_with_cpufreq} \
1670         %{?_with_csv} \
1671         %{?_with_curl} \
1672         %{?_with_curl_json} \
1673         %{?_with_curl_xml} \
1674         %{?_with_dbi} \
1675         %{?_with_df} \
1676         %{?_with_disk} \
1677         %{?_with_dns} \
1678         %{?_with_drbd} \
1679         %{?_with_email} \
1680         %{?_with_entropy} \
1681         %{?_with_ethstat} \
1682         %{?_with_exec} \
1683         %{?_with_fhcount} \
1684         %{?_with_filecount} \
1685         %{?_with_fscache} \
1686         %{?_with_gmond} \
1687         %{?_with_hddtemp} \
1688         %{?_with_interface} \
1689         %{?_with_ipc} \
1690         %{?_with_ipmi} \
1691         %{?_with_iptables} \
1692         %{?_with_ipvs} \
1693         %{?_with_java} \
1694         %{?_with_virt} \
1695         %{?_with_log_logstash} \
1696         %{?_with_lpar} \
1697         %{?_with_lvm} \
1698         %{?_with_memcachec} \
1699         %{?_with_mic} \
1700         %{?_with_modbus} \
1701         %{?_with_multimeter} \
1702         %{?_with_mqtt} \
1703         %{?_with_mysql} \
1704         %{?_with_netapp} \
1705         %{?_with_netlink} \
1706         %{?_with_nginx} \
1707         %{?_with_notify_desktop} \
1708         %{?_with_notify_email} \
1709         %{?_with_nut} \
1710         %{?_with_onewire} \
1711         %{?_with_openldap} \
1712         %{?_with_oracle} \
1713         %{?_with_perl} \
1714         %{?_with_pf} \
1715         %{?_with_pinba} \
1716         %{?_with_ping} \
1717         %{?_with_postgresql} \
1718         %{?_with_python} \
1719         %{?_with_redis} \
1720         %{?_with_routeros} \
1721         %{?_with_rrdcached} \
1722         %{?_with_rrdtool} \
1723         %{?_with_sensors} \
1724         %{?_with_sigrok} \
1725         %{?_with_smart} \
1726         %{?_with_snmp} \
1727         %{?_with_tape} \
1728         %{?_with_tokyotyrant} \
1729         %{?_with_varnish} \
1730         %{?_with_write_http} \
1731         %{?_with_write_kafka} \
1732         %{?_with_write_mongodb} \
1733         %{?_with_write_redis} \
1734         %{?_with_xencpu} \
1735         %{?_with_xmms} \
1736         %{?_with_zfs_arc} \
1737         %{?_with_zone} \
1738         %{?_with_zookeeper} \
1739         %{?_with_irq} \
1740         %{?_with_load} \
1741         %{?_with_logfile} \
1742         %{?_with_madwifi} \
1743         %{?_with_mbmon} \
1744         %{?_with_md} \
1745         %{?_with_memcached} \
1746         %{?_with_memory} \
1747         %{?_with_network} \
1748         %{?_with_nfs} \
1749         %{?_with_notify_nagios} \
1750         %{?_with_ntpd} \
1751         %{?_with_numa} \
1752         %{?_with_olsrd} \
1753         %{?_with_openvpn} \
1754         %{?_with_powerdns} \
1755         %{?_with_processes} \
1756         %{?_with_protocols} \
1757         %{?_with_serial} \
1758         %{?_with_statsd} \
1759         %{?_with_swap} \
1760         %{?_with_syslog} \
1761         %{?_with_table} \
1762         %{?_with_tail} \
1763         %{?_with_tail_csv} \
1764         %{?_with_tcpconns} \
1765         %{?_with_teamspeak2} \
1766         %{?_with_ted} \
1767         %{?_with_thermal} \
1768         %{?_with_threshold} \
1769         %{?_with_turbostat} \
1770         %{?_with_unixsock} \
1771         %{?_with_uptime} \
1772         %{?_with_users} \
1773         %{?_with_uuid} \
1774         %{?_with_vmem} \
1775         %{?_with_vserver} \
1776         %{?_with_wireless}\
1777         %{?_with_write_graphite} \
1778         %{?_with_write_http} \
1779         %{?_with_write_log} \
1780         %{?_with_write_riemann} \
1781         %{?_with_write_sensu} \
1782         %{?_with_write_tsdb}
1783
1784
1785 %{__make} %{?_smp_mflags}
1786
1787
1788 %install
1789 rm -rf %{buildroot}
1790 %{__make} install DESTDIR=%{buildroot}
1791 %if 0%{?el7:1}
1792 %{__install} -Dp -m0644 contrib/systemd.collectd.service %{buildroot}%{_unitdir}/collectd.service
1793 %else
1794 %{__install} -Dp -m0755 contrib/redhat/init.d-collectd %{buildroot}%{_initrddir}/collectd
1795 %endif
1796 %{__install} -Dp -m0644 src/collectd.conf %{buildroot}%{_sysconfdir}/collectd.conf
1797 %{__install} -d %{buildroot}%{_sharedstatedir}/collectd/
1798 %{__install} -d %{buildroot}%{_sysconfdir}/collectd.d/
1799
1800 %{__mkdir} -p %{buildroot}%{_localstatedir}/www
1801 %{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d
1802
1803 %{__mv} contrib/collection3 %{buildroot}%{_localstatedir}/www
1804 %{__mv} contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/
1805
1806 %{__mv} contrib/php-collection %{buildroot}%{_localstatedir}/www
1807 %{__mv} contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/
1808
1809 ### Clean up docs
1810 find contrib/ -type f -exec %{__chmod} a-x {} \;
1811 # *.la files shouldn't be distributed.
1812 rm -f %{buildroot}/%{_libdir}/{collectd/,}*.la
1813
1814 # Remove Perl hidden .packlist files.
1815 find %{buildroot} -type f -name .packlist -delete
1816 # Remove Perl temporary file perllocal.pod
1817 find %{buildroot} -type f -name perllocal.pod -delete
1818
1819 %if ! %{with_java}
1820 rm -f %{buildroot}%{_datadir}/collectd/java/collectd-api.jar
1821 rm -f %{buildroot}%{_datadir}/collectd/java/generic-jmx.jar
1822 rm -f %{buildroot}%{_mandir}/man5/collectd-java.5*
1823 %endif
1824
1825 %if ! %{with_perl}
1826 rm -f %{buildroot}%{_mandir}/man5/collectd-perl.5*
1827 rm -f %{buildroot}%{_mandir}/man3/Collectd::Unixsock.3pm*
1828 rm -fr %{buildroot}/usr/lib/perl5/
1829 %endif
1830
1831 %if ! %{with_postgresql}
1832 rm -f %{buildroot}%{_datadir}/collectd/postgresql_default.conf
1833 %endif
1834
1835 %if ! %{with_python}
1836 rm -f %{buildroot}%{_mandir}/man5/collectd-python.5*
1837 %endif
1838
1839 %if ! %{with_snmp}
1840 rm -f %{buildroot}%{_mandir}/man5/collectd-snmp.5*
1841 %endif
1842
1843
1844 %clean
1845 rm -rf %{buildroot}
1846
1847 %pre
1848 %if 0%{?el7:1}
1849 # stop sysv-based instance before upgrading to systemd
1850 if [ $1 -eq 2 ] && [ -f /var/lock/subsys/collectd ]; then
1851         SYSTEMCTL_SKIP_REDIRECT=1 %{_initddir}/collectd stop >/dev/null 2>&1 || :
1852 fi
1853 %endif
1854
1855 %post
1856 %if 0%{?el7:1}
1857 if [ $1 -eq 2 ]; then
1858         /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
1859 fi
1860 %systemd_post collectd.service
1861 %else
1862 /sbin/chkconfig --add collectd || :
1863 %endif
1864
1865 %preun
1866 %if 0%{?el7:1}
1867 %systemd_preun collectd.service
1868 %else
1869 # stop collectd only when uninstalling
1870 if [ $1 -eq 0 ]; then
1871         /sbin/service collectd stop >/dev/null 2>&1 || :
1872         /sbin/chkconfig --del collectd || :
1873 fi
1874 %endif
1875
1876 %postun
1877 %if 0%{?el7:1}
1878 %systemd_postun_with_restart collectd.service
1879 %else
1880 # restart collectd only when upgrading
1881 if [ $1 -eq 1 ]; then
1882         /sbin/service collectd condrestart >/dev/null 2>&1 || :
1883 fi
1884 %endif
1885
1886 %post -n libcollectdclient -p /sbin/ldconfig
1887 %postun -n libcollectdclient -p /sbin/ldconfig
1888
1889
1890 %files
1891 %doc AUTHORS COPYING ChangeLog README
1892 %config(noreplace) %{_sysconfdir}/collectd.conf
1893 %if 0%{?el7:1}
1894 %{_unitdir}/collectd.service
1895 %else
1896 %{_initrddir}/collectd
1897 %endif
1898 %{_sbindir}/collectd
1899 %{_sbindir}/collectdmon
1900 %{_datadir}/collectd/types.db
1901 %{_sharedstatedir}/collectd
1902 %{_mandir}/man1/collectd.1*
1903 %{_mandir}/man1/collectdmon.1*
1904 %{_mandir}/man5/collectd-email.5*
1905 %{_mandir}/man5/collectd-exec.5*
1906 %{_mandir}/man5/collectd-threshold.5*
1907 %{_mandir}/man5/collectd-unixsock.5*
1908 %{_mandir}/man5/collectd.conf.5*
1909 %{_mandir}/man5/types.db.5*
1910
1911 # all plugins bundled with the main collectd package
1912 %{_libdir}/%{name}/match_empty_counter.so
1913 %{_libdir}/%{name}/match_hashed.so
1914 %{_libdir}/%{name}/match_regex.so
1915 %{_libdir}/%{name}/match_timediff.so
1916 %{_libdir}/%{name}/match_value.so
1917 %{_libdir}/%{name}/target_notification.so
1918 %{_libdir}/%{name}/target_replace.so
1919 %{_libdir}/%{name}/target_scale.so
1920 %{_libdir}/%{name}/target_set.so
1921 %{_libdir}/%{name}/target_v5upgrade.so
1922
1923 %if %{with_aggregation}
1924 %{_libdir}/%{name}/aggregation.so
1925 %endif
1926 %if %{with_apcups}
1927 %{_libdir}/%{name}/apcups.so
1928 %endif
1929 %if %{with_battery}
1930 %{_libdir}/%{name}/battery.so
1931 %endif
1932 %if %{with_cgroups}
1933 %{_libdir}/%{name}/cgroups.so
1934 %endif
1935 %if %{with_conntrack}
1936 %{_libdir}/%{name}/conntrack.so
1937 %endif
1938 %if %{with_contextswitch}
1939 %{_libdir}/%{name}/contextswitch.so
1940 %endif
1941 %if %{with_cpu}
1942 %{_libdir}/%{name}/cpu.so
1943 %endif
1944 %if %{with_cpufreq}
1945 %{_libdir}/%{name}/cpufreq.so
1946 %endif
1947 %if %{with_csv}
1948 %{_libdir}/%{name}/csv.so
1949 %endif
1950 %if %{with_df}
1951 %{_libdir}/%{name}/df.so
1952 %endif
1953 %if %{with_drbd}
1954 %{_libdir}/%{name}/drbd.so
1955 %endif
1956 %if %{with_ethstat}
1957 %{_libdir}/%{name}/ethstat.so
1958 %endif
1959 %if %{with_entropy}
1960 %{_libdir}/%{name}/entropy.so
1961 %endif
1962 %if %{with_exec}
1963 %{_libdir}/%{name}/exec.so
1964 %endif
1965 %if %{with_fhcount}
1966 %{_libdir}/%{name}/fhcount.so
1967 %endif
1968 %if %{with_filecount}
1969 %{_libdir}/%{name}/filecount.so
1970 %endif
1971 %if %{with_fscache}
1972 %{_libdir}/%{name}/fscache.so
1973 %endif
1974 %if %{with_interface}
1975 %{_libdir}/%{name}/interface.so
1976 %endif
1977 %if %{with_ipc}
1978 %{_libdir}/%{name}/ipc.so
1979 %endif
1980 %if %{with_ipvs}
1981 %{_libdir}/%{name}/ipvs.so
1982 %endif
1983 %if %{with_irq}
1984 %{_libdir}/%{name}/irq.so
1985 %endif
1986 %if %{with_load}
1987 %{_libdir}/%{name}/load.so
1988 %endif
1989 %if %{with_logfile}
1990 %{_libdir}/%{name}/logfile.so
1991 %endif
1992 %if %{with_madwifi}
1993 %{_libdir}/%{name}/madwifi.so
1994 %endif
1995 %if %{with_mbmon}
1996 %{_libdir}/%{name}/mbmon.so
1997 %endif
1998 %if %{with_md}
1999 %{_libdir}/%{name}/md.so
2000 %endif
2001 %if %{with_memcached}
2002 %{_libdir}/%{name}/memcached.so
2003 %endif
2004 %if %{with_memory}
2005 %{_libdir}/%{name}/memory.so
2006 %endif
2007 %if %{with_multimeter}
2008 %{_libdir}/%{name}/multimeter.so
2009 %endif
2010 %if %{with_network}
2011 %{_libdir}/%{name}/network.so
2012 %endif
2013 %if %{with_nfs}
2014 %{_libdir}/%{name}/nfs.so
2015 %endif
2016 %if %{with_notify_nagios}
2017 %{_libdir}/%{name}/notify_nagios.so
2018 %endif
2019 %if %{with_ntpd}
2020 %{_libdir}/%{name}/ntpd.so
2021 %endif
2022 %if %{with_numa}
2023 %{_libdir}/%{name}/numa.so
2024 %endif
2025 %if %{with_openvpn}
2026 %{_libdir}/%{name}/openvpn.so
2027 %endif
2028 %if %{with_olsrd}
2029 %{_libdir}/%{name}/olsrd.so
2030 %endif
2031 %if %{with_powerdns}
2032 %{_libdir}/%{name}/powerdns.so
2033 %endif
2034 %if %{with_processes}
2035 %{_libdir}/%{name}/processes.so
2036 %endif
2037 %if %{with_protocols}
2038 %{_libdir}/%{name}/protocols.so
2039 %endif
2040 %if %{with_serial}
2041 %{_libdir}/%{name}/serial.so
2042 %endif
2043 %if %{with_statsd}
2044 %{_libdir}/%{name}/statsd.so
2045 %endif
2046 %if %{with_swap}
2047 %{_libdir}/%{name}/swap.so
2048 %endif
2049 %if %{with_syslog}
2050 %{_libdir}/%{name}/syslog.so
2051 %endif
2052 %if %{with_table}
2053 %{_libdir}/%{name}/table.so
2054 %endif
2055 %if %{with_tail}
2056 %{_libdir}/%{name}/tail.so
2057 %endif
2058 %if %{with_tail_csv}
2059 %{_libdir}/%{name}/tail_csv.so
2060 %endif
2061 %if %{with_tcpconns}
2062 %{_libdir}/%{name}/tcpconns.so
2063 %endif
2064 %if %{with_teamspeak2}
2065 %{_libdir}/%{name}/teamspeak2.so
2066 %endif
2067 %if %{with_ted}
2068 %{_libdir}/%{name}/ted.so
2069 %endif
2070 %if %{with_thermal}
2071 %{_libdir}/%{name}/thermal.so
2072 %endif
2073 %if %{with_threshold}
2074 %{_libdir}/%{name}/threshold.so
2075 %endif
2076 %if %{with_turbostat}
2077 %{_libdir}/%{name}/turbostat.so
2078 %endif
2079 %if %{with_unixsock}
2080 %{_libdir}/%{name}/unixsock.so
2081 %endif
2082 %if %{with_uptime}
2083 %{_libdir}/%{name}/uptime.so
2084 %endif
2085 %if %{with_users}
2086 %{_libdir}/%{name}/users.so
2087 %endif
2088 %if %{with_uuid}
2089 %{_libdir}/%{name}/uuid.so
2090 %endif
2091 %if %{with_vmem}
2092 %{_libdir}/%{name}/vmem.so
2093 %endif
2094 %if %{with_vserver}
2095 %{_libdir}/%{name}/vserver.so
2096 %endif
2097 %if %{with_wireless}
2098 %{_libdir}/%{name}/wireless.so
2099 %endif
2100 %if %{with_write_graphite}
2101 %{_libdir}/%{name}/write_graphite.so
2102 %endif
2103 %if %{with_write_log}
2104 %{_libdir}/%{name}/write_log.so
2105 %endif
2106 %if %{with_write_sensu}
2107 %{_libdir}/%{name}/write_sensu.so
2108 %endif
2109 %if %{with_write_tsdb}
2110 %{_libdir}/%{name}/write_tsdb.so
2111 %endif
2112 %if %{with_zfs_arc}
2113 %{_libdir}/%{name}/zfs_arc.so
2114 %endif
2115 %if %{with_zookeeper}
2116 %{_libdir}/%{name}/zookeeper.so
2117 %endif
2118
2119 %files -n libcollectdclient-devel
2120 %{_includedir}/collectd/client.h
2121 %{_includedir}/collectd/network.h
2122 %{_includedir}/collectd/network_buffer.h
2123 %{_includedir}/collectd/lcc_features.h
2124 %{_libdir}/pkgconfig/libcollectdclient.pc
2125 %{_libdir}/libcollectdclient.so
2126
2127 %files -n libcollectdclient
2128 %{_libdir}/libcollectdclient.so.*
2129
2130 %files -n collectd-utils
2131 %{_bindir}/collectd-nagios
2132 %{_bindir}/collectd-tg
2133 %{_bindir}/collectdctl
2134 %{_mandir}/man1/collectdctl.1*
2135 %{_mandir}/man1/collectd-nagios.1*
2136 %{_mandir}/man1/collectd-tg.1*
2137
2138 %if %{with_amqp}
2139 %files amqp
2140 %{_libdir}/%{name}/amqp.so
2141 %endif
2142
2143 %if %{with_apache}
2144 %files apache
2145 %{_libdir}/%{name}/apache.so
2146 %endif
2147
2148 %if %{with_aquaero}
2149 %files aquaero
2150 %{_libdir}/%{name}/aquaero.so
2151 %endif
2152
2153 %if %{with_ascent}
2154 %files ascent
2155 %{_libdir}/%{name}/ascent.so
2156 %endif
2157
2158 %if %{with_barometer}
2159 %files barometer
2160 %{_libdir}/%{name}/barometer.so
2161 %endif
2162
2163 %if %{with_bind}
2164 %files bind
2165 %{_libdir}/%{name}/bind.so
2166 %endif
2167
2168 %if %{with_ceph}
2169 %files ceph
2170 %{_libdir}/%{name}/ceph.so
2171 %endif
2172
2173 %if %{with_curl}
2174 %files curl
2175 %{_libdir}/%{name}/curl.so
2176 %endif
2177
2178 %if %{with_curl_json}
2179 %files curl_json
2180 %{_libdir}/%{name}/curl_json.so
2181 %endif
2182
2183 %if %{with_curl_xml}
2184 %files curl_xml
2185 %{_libdir}/%{name}/curl_xml.so
2186 %endif
2187
2188 %if %{with_disk}
2189 %files disk
2190 %{_libdir}/%{name}/disk.so
2191 %endif
2192
2193 %if %{with_dns}
2194 %files dns
2195 %{_libdir}/%{name}/dns.so
2196 %endif
2197
2198 %if %{with_dbi}
2199 %files dbi
2200 %{_libdir}/%{name}/dbi.so
2201 %endif
2202
2203 %if %{with_email}
2204 %files email
2205 %{_libdir}/%{name}/email.so
2206 %endif
2207
2208 %if %{with_gmond}
2209 %files gmond
2210 %{_libdir}/%{name}/gmond.so
2211 %endif
2212
2213 %if %{with_hddtemp}
2214 %files hddtemp
2215 %{_libdir}/%{name}/hddtemp.so
2216 %endif
2217
2218 %if %{with_ipmi}
2219 %files ipmi
2220 %{_libdir}/%{name}/ipmi.so
2221 %endif
2222
2223 %if %{with_iptables}
2224 %files iptables
2225 %{_libdir}/%{name}/iptables.so
2226 %endif
2227
2228 %if %{with_java}
2229 %files java
2230 %{_datadir}/collectd/java/collectd-api.jar
2231 %{_datadir}/collectd/java/generic-jmx.jar
2232 %{_libdir}/%{name}/java.so
2233 %{_mandir}/man5/collectd-java.5*
2234 %endif
2235
2236 %if %{with_virt}
2237 %files virt
2238 %{_libdir}/%{name}/virt.so
2239 %endif
2240
2241 %if %{with_log_logstash}
2242 %files log_logstash
2243 %{_libdir}/%{name}/log_logstash.so
2244 %endif
2245
2246 %if %{with_lvm}
2247 %files lvm
2248 %{_libdir}/%{name}/lvm.so
2249 %endif
2250
2251 %if %{with_memcachec}
2252 %files memcachec
2253 %{_libdir}/%{name}/memcachec.so
2254 %endif
2255
2256 %if %{with_mic}
2257 %files mic
2258 %{_libdir}/%{name}/mic.so
2259 %endif
2260
2261 %if %{with_modbus}
2262 %files modbus
2263 %{_libdir}/%{name}/modbus.so
2264 %endif
2265
2266 %if %{with_mqtt}
2267 %files mqtt
2268 %{_libdir}/%{name}/mqtt.so
2269 %endif
2270
2271 %if %{with_mysql}
2272 %files mysql
2273 %{_libdir}/%{name}/mysql.so
2274 %endif
2275
2276 %if %{with_netlink}
2277 %files netlink
2278 %{_libdir}/%{name}/netlink.so
2279 %endif
2280
2281 %if %{with_nginx}
2282 %files nginx
2283 %{_libdir}/%{name}/nginx.so
2284 %endif
2285
2286 %if %{with_notify_desktop}
2287 %files notify_desktop
2288 %{_libdir}/%{name}/notify_desktop.so
2289 %endif
2290
2291 %if %{with_notify_email}
2292 %files notify_email
2293 %{_libdir}/%{name}/notify_email.so
2294 %endif
2295
2296 %if %{with_nut}
2297 %files nut
2298 %{_libdir}/%{name}/nut.so
2299 %endif
2300
2301 %if %{with_openldap}
2302 %files openldap
2303 %{_libdir}/%{name}/openldap.so
2304 %endif
2305
2306 %if %{with_perl}
2307 %files perl
2308 %{perl_vendorlib}/Collectd.pm
2309 %{perl_vendorlib}/Collectd/
2310 %{_mandir}/man3/Collectd::Unixsock.3pm*
2311 %{_mandir}/man5/collectd-perl.5*
2312 %{_libdir}/%{name}/perl.so
2313 %endif
2314
2315 %if %{with_pinba}
2316 %files pinba
2317 %{_libdir}/%{name}/pinba.so
2318 %endif
2319
2320 %if %{with_ping}
2321 %files ping
2322 %{_libdir}/%{name}/ping.so
2323 %endif
2324
2325 %if %{with_postgresql}
2326 %files postgresql
2327 %{_datadir}/collectd/postgresql_default.conf
2328 %{_libdir}/%{name}/postgresql.so
2329 %endif
2330
2331 %if %{with_python}
2332 %files python
2333 %{_mandir}/man5/collectd-python*
2334 %{_libdir}/%{name}/python.so
2335 %endif
2336
2337 %if %{with_redis}
2338 %files redis
2339 %{_libdir}/%{name}/redis.so
2340 %endif
2341
2342 %if %{with_rrdcached}
2343 %files rrdcached
2344 %{_libdir}/%{name}/rrdcached.so
2345 %endif
2346
2347 %if %{with_rrdtool}
2348 %files rrdtool
2349 %{_libdir}/%{name}/rrdtool.so
2350 %endif
2351
2352 %if %{with_sensors}
2353 %files sensors
2354 %{_libdir}/%{name}/sensors.so
2355 %endif
2356
2357 %if %{with_sigrok}
2358 %files sigrok
2359 %{_libdir}/%{name}/sigrok.so
2360 %endif
2361
2362 %if %{with_smart}
2363 %files smart
2364 %{_libdir}/%{name}/smart.so
2365 %endif
2366
2367 %if %{with_snmp}
2368 %files snmp
2369 %{_mandir}/man5/collectd-snmp.5*
2370 %{_libdir}/%{name}/snmp.so
2371 %endif
2372
2373 %if %{with_varnish}
2374 %files varnish
2375 %{_libdir}/%{name}/varnish.so
2376 %endif
2377
2378 %if %{with_write_http}
2379 %files write_http
2380 %{_libdir}/%{name}/write_http.so
2381 %endif
2382
2383 %if %{with_write_kafka}
2384 %files write_kafka
2385 %{_libdir}/%{name}/write_kafka.so
2386 %endif
2387
2388 %if %{with_write_redis}
2389 %files write_redis
2390 %{_libdir}/%{name}/write_redis.so
2391 %endif
2392
2393 %if %{with_write_riemann}
2394 %files write_riemann
2395 %{_libdir}/%{name}/write_riemann.so
2396 %endif
2397
2398 %if %{with_xencpu}
2399 %files xencpu
2400 %{_libdir}/%{name}/xencpu.so
2401 %endif
2402
2403 %if %{with_xmms}
2404 %files xmms
2405 %{_libdir}/%{name}/xmms.so
2406 %endif
2407
2408 %files collection3
2409 %{_localstatedir}/www/collection3
2410 %{_sysconfdir}/httpd/conf.d/collection3.conf
2411
2412 %files php-collection
2413 %{_localstatedir}/www/php-collection
2414 %{_sysconfdir}/httpd/conf.d/php-collection.conf
2415
2416 %files contrib
2417 %doc contrib/
2418
2419 %changelog
2420 #* TODO: next feature release changelog
2421 #- New upstream version
2422 #- New plugins enabled by default: mqtt, notify_nagios
2423 #- New plugins disabled by default: zone, xencpu
2424 #
2425 * Wed May 27 2015 Marc Fournier <marc.fournier@camptocamp.com> 5.5.0-1
2426 - New upstream version
2427 - New plugins enabled by default: ceph, drbd, log_logstash, write_tsdb, smart,
2428   openldap, redis, write_redis, zookeeper, write_log, write_sensu, ipc,
2429   turbostat, fhcount
2430 - New plugins disabled by default: barometer, write_kafka
2431 - Enable zfs_arc, now supported on Linux
2432 - Install disk plugin in a dedicated package, as it depends on libudev
2433 - use systemd on EL7, sysvinit on EL6 & EL5
2434 - Install collectdctl, collectd-tg and collectd-nagios in collectd-utils.rpm
2435 - Add build-dependency on libcap-devel
2436
2437 * Mon Aug 19 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.4.2-1
2438 - New upstream version
2439 - Build netlink plugin by default
2440 - Enable cgroups, lvm and statsd plugins
2441 - Enable (but don't build by default) mic, aquaero and sigrok plugins
2442 - Enable modbus, memcachec and xmms plugins on RHEL7
2443
2444 * Tue Aug 06 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.3.1-1
2445 - New upstream version
2446 - Added RHEL5 support:
2447   * conditionally disable plugins not building on this platform
2448   * add/specify some build dependencies and options
2449   * replace some RPM macros not available on this platform
2450 - Removed duplicate --enable-aggregation
2451 - Added some comments & usage examples
2452 - Replaced a couple of "Buildrequires" by "BuildRequires"
2453 - Enabled modbus plugin on RHEL6
2454 - Enabled netlink plugin on RHEL6 and RHEL7
2455 - Allow perl plugin to build on RHEL5
2456 - Add support for RHEL7
2457 - Misc perl-related improvements:
2458   * prevent rpmbuild from extracting dependencies from files in /usr/share/doc
2459   * don't package collection3 and php-collection twice
2460   * keep perl scripts from contrib/ in collectd-contrib
2461
2462 * Wed Apr 10 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.3.0-1
2463 - New upstream version
2464 - Enabled write_riemann plugin
2465 - Enabled tail_csv plugin
2466 - Installed collectd-tc manpage
2467
2468 * Fri Jan 11 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-3
2469 - remove dependency on libstatgrab, which isn't required on linux
2470
2471 * Thu Jan 03 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-2
2472 - collection3 and php-collection viewers are now in separate packages
2473
2474 * Fri Dec 21 2012 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-1
2475 - New upstream version
2476 - Enabled aggregation plugin
2477 - Installed collectd-tc
2478 - Added network.h and network_buffer.h to libcollectdclient-devel
2479 - Moved libxml2-devel and libcurl-devel BRs to relevant plugins sections
2480 - Moved libcollectdclient.so from libcollectdclient-devel to libcollectdclient
2481 - Added rrdcached and redis plugin descriptions
2482 - Mentioned new pf plugin in disabled plugins list
2483
2484 * Sun Nov 18 2012 Ruben Kerkhof <ruben@tilaa.nl> 5.1.0-3
2485 - Follow Fedora Packaging Guidelines in java subpackage
2486
2487 * Sat Nov 17 2012 Ruben Kerkhof <ruben@tilaa.nl> 5.1.0-2
2488 - Move perl stuff to perl_vendorlib
2489 - Replace hardcoded paths with macros
2490 - Remove unnecessary Requires
2491 - Removed .a and .la files
2492 - Some other small cleanups
2493
2494 * Fri Nov 16 2012 Marc Fournier <marc.fournier@camptocamp.com> 5.1.0-1
2495 - New upstream version
2496 - Changes to support 5.1.0
2497 - Enabled all buildable plugins based on libraries available on EL6 + EPEL
2498 - All plugins requiring external libraries are now shipped in separate
2499   packages.
2500 - No longer treat Java plugin as an exception, correctly set $JAVA_HOME during
2501   the build process + ensure build deps are installed.
2502 - Dropped per-plugin configuration files, as they tend to diverge from upstream
2503   defaults.
2504 - Moved perl stuff to /usr/share/perl5/
2505 - Don't alter Interval and ReadThreads by default, let the user change this
2506   himself.
2507 - Initscript improvements:
2508   * checks configuration before (re)starting, based on debian's initscript
2509   * use /etc/sysconfig instdead of /etc/default
2510   * include optional $ARGS in arguments passed to collectd.
2511 - Drop collection.cgi from main package, as it's been obsoleted by collection3
2512 - Moved contrib/ to its own package, to avoid cluttering the main package with
2513   non-essential stuff.
2514 - Replaced BuildPrereq by BuildRequires
2515
2516 * Mon Jan 03 2011 Monetate <jason.stelzer@monetate.com> 5.0.1
2517 - New upstream version
2518 - Changes to support 5.0.1
2519
2520 * Mon Jan 04 2010 Rackspace <stu.hood@rackspace.com> 4.9.0
2521 - New upstream version
2522 - Changes to support 4.9.0
2523 - Added support for Java/GenericJMX plugin
2524
2525 * Mon Mar 17 2008 RightScale <support@rightscale.com> 4.3.1
2526 - New upstream version
2527 - Changes to support 4.3.1
2528 - Added More Prereqs to support more plugins
2529 - Added support for perl plugin
2530
2531 * Mon Aug 06 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.6
2532 - New upstream version
2533
2534 * Wed Jul 25 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.5
2535 - New major releas
2536 - Changes to support 4.0.5
2537
2538 * Thu Jan 11 2007 Iain Lea <iain@bricbrac.de> 3.11.0-0
2539 - fixed spec file to build correctly on fedora core
2540 - added improved init.d script to work with chkconfig
2541 - added %%post and %%postun to call chkconfig automatically
2542
2543 * Sun Jul 09 2006 Florian octo Forster <octo@verplant.org> 3.10.0-1
2544 - New upstream version
2545
2546 * Sun Jun 25 2006 Florian octo Forster <octo@verplant.org> 3.9.4-1
2547 - New upstream version
2548
2549 * Thu Jun 01 2006 Florian octo Forster <octo@verplant.org> 3.9.3-1
2550 - New upstream version
2551
2552 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.9.2-1
2553 - New upstream version
2554
2555 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.8.5-1
2556 - New upstream version
2557
2558 * Fri Apr 21 2006 Florian octo Forster <octo@verplant.org> 3.9.1-1
2559 - New upstream version
2560
2561 * Fri Apr 14 2006 Florian octo Forster <octo@verplant.org> 3.9.0-1
2562 - New upstream version
2563 - Added the `apache' package.
2564
2565 * Tue Mar 14 2006 Florian octo Forster <octo@verplant.org> 3.8.2-1
2566 - New upstream version
2567
2568 * Mon Mar 13 2006 Florian octo Forster <octo@verplant.org> 3.8.1-1
2569 - New upstream version
2570
2571 * Thu Mar 09 2006 Florian octo Forster <octo@verplant.org> 3.8.0-1
2572 - New upstream version
2573
2574 * Sat Feb 18 2006 Florian octo Forster <octo@verplant.org> 3.7.2-1
2575 - Include `tape.so' so the build doesn't terminate because of missing files..
2576 - New upstream version
2577
2578 * Sat Feb 04 2006 Florian octo Forster <octo@verplant.org> 3.7.1-1
2579 - New upstream version
2580
2581 * Mon Jan 30 2006 Florian octo Forster <octo@verplant.org> 3.7.0-1
2582 - New upstream version
2583 - Removed the extra `hddtemp' package
2584
2585 * Tue Jan 24 2006 Florian octo Forster <octo@verplant.org> 3.6.2-1
2586 - New upstream version
2587
2588 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.1-1
2589 - New upstream version
2590
2591 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.0-1
2592 - New upstream version
2593 - Added config file, `collectd.conf(5)', `df.so'
2594 - Added package `collectd-mysql', dependency on `mysqlclient10 | mysql'
2595
2596 * Wed Dec 07 2005 Florian octo Forster <octo@verplant.org> 3.5.0-1
2597 - New upstream version
2598
2599 * Sat Nov 26 2005 Florian octo Forster <octo@verplant.org> 3.4.0-1
2600 - New upstream version
2601
2602 * Sat Nov 05 2005 Florian octo Forster <octo@verplant.org> 3.3.0-1
2603 - New upstream version
2604
2605 * Wed Oct 26 2005 Florian octo Forster <octo@verplant.org> 3.2.0-1
2606 - New upstream version
2607 - Added statement to remove the `*.la' files. This fixes a problem when
2608   `Unpackaged files terminate build' is in effect.
2609 - Added `processes.so*' to the main package
2610
2611 * Fri Oct 14 2005 Florian octo Forster <octo@verplant.org> 3.1.0-1
2612 - New upstream version
2613 - Added package `collectd-hddtemp'
2614
2615 * Fri Sep 30 2005 Florian octo Forster <octo@verplant.org> 3.0.0-1
2616 - New upstream version
2617 - Split the package into `collectd' and `collectd-sensors'
2618
2619 * Fri Sep 16 2005 Florian octo Forster <octo@verplant.org> 2.1.0-1
2620 - New upstream version
2621
2622 * Sat Sep 10 2005 Florian octo Forster <octo@verplant.org> 2.0.0-1
2623 - New upstream version
2624
2625 * Mon Aug 29 2005 Florian octo Forster <octo@verplant.org> 1.8.0-1
2626 - New upstream version
2627
2628 * Thu Aug 25 2005 Florian octo Forster <octo@verplant.org> 1.7.0-1
2629 - New upstream version
2630
2631 * Sun Aug 21 2005 Florian octo Forster <octo@verplant.org> 1.6.0-1
2632 - New upstream version
2633
2634 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5.1-1
2635 - New upstream version
2636
2637 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5-1
2638 - New upstream version
2639
2640 * Mon Jul 11 2005 Florian octo Forster <octo@verplant.org> 1.4.2-1
2641 - New upstream version
2642
2643 * Sat Jul 09 2005 Florian octo Forster <octo@verplant.org> 1.4-1
2644 - Built on RedHat 7.3