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