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