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