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