Allow for conditional compilation of plugins
[collectd.git] / contrib / redhat / collectd.spec
1 %global _hardened_build 1
2
3 # enabled plugins
4 %define with_amqp 0%{!?_without_amqp:1}
5 %define with_apache 0%{!?_without_apache:1}
6 %define with_apcups 0%{!?_without_apcups:1}
7 %define with_ascent 0%{!?_without_ascent:1}
8 %define with_battery 0%{!?_without_battery:1}
9 %define with_bind 0%{!?_without_bind:1}
10 %define with_conntrack 0%{!?_without_conntrack:1}
11 %define with_contextswitch 0%{!?_without_contextswitch:1}
12 %define with_cpu 0%{!?_without_cpu:1}
13 %define with_cpufreq 0%{!?_without_cpufreq:1}
14 %define with_csv 0%{!?_without_csv:1}
15 %define with_curl 0%{!?_without_curl:1}
16 %define with_curl_json 0%{!?_without_curl_json:1}
17 %define with_curl_xml 0%{!?_without_curl_xml:1}
18 %define with_dbi 0%{!?_without_dbi:1}
19 %define with_df 0%{!?_without_df:1}
20 %define with_disk 0%{!?_without_disk:1}
21 %define with_dns 0%{!?_without_dns:1}
22 %define with_email 0%{!?_without_email:1}
23 %define with_entropy 0%{!?_without_entropy:1}
24 %define with_ethstat 0%{!?_without_ethstat:1}
25 %define with_exec 0%{!?_without_exec:1}
26 %define with_filecount 0%{!?_without_filecount:1}
27 %define with_fscache 0%{!?_without_fscache:1}
28 %define with_gmond 0%{!?_without_gmond:1}
29 %define with_hddtemp 0%{!?_without_hddtemp:1}
30 %define with_interface 0%{!?_without_interface:1}
31 %define with_ipmi 0%{!?_without_ipmi:1}
32 %define with_iptables 0%{!?_without_iptables:1}
33 %define with_ipvs 0%{!?_without_ipvs:1}
34 %define with_irq 0%{!?_without_irq:1}
35 %define with_java 0%{!?_without_java:1}
36 %define with_libvirt 0%{!?_without_libvirt:1}
37 %define with_load 0%{!?_without_load:1}
38 %define with_logfile 0%{!?_without_logfile:1}
39 %define with_madwifi 0%{!?_without_madwifi:1}
40 %define with_mbmon 0%{!?_without_mbmon:1}
41 %define with_md 0%{!?_without_md:1}
42 %define with_memcachec 0%{!?_without_memcachec:1}
43 %define with_memcached 0%{!?_without_memcached:1}
44 %define with_memory 0%{!?_without_memory:1}
45 %define with_multimeter 0%{!?_without_multimeter:1}
46 %define with_mysql 0%{!?_without_mysql:1}
47 %define with_network 0%{!?_without_network:1}
48 %define with_nfs 0%{!?_without_nfs:1}
49 %define with_nginx 0%{!?_without_nginx:1}
50 %define with_notify_desktop 0%{!?_without_notify_desktop:1}
51 %define with_notify_email 0%{!?_without_notify_email:1}
52 %define with_ntpd 0%{!?_without_ntpd:1}
53 %define with_numa 0%{!?_without_numa:1}
54 %define with_nut 0%{!?_without_nut:1}
55 %define with_olsrd 0%{!?_without_olsrd:1}
56 %define with_openvpn 0%{!?_without_openvpn:1}
57 %define with_perl 0%{!?_without_perl:1}
58 %define with_pinba 0%{!?_without_pinba:1}
59 %define with_ping 0%{!?_without_ping:1}
60 %define with_postgresql 0%{!?_without_postgresql:1}
61 %define with_powerdns 0%{!?_without_powerdns:1}
62 %define with_processes 0%{!?_without_processes:1}
63 %define with_protocols 0%{!?_without_protocols:1}
64 %define with_python 0%{!?_without_python:1}
65 %define with_rrdtool 0%{!?_without_rrdtool:1}
66 %define with_sensors 0%{!?_without_sensors:1}
67 %define with_serial 0%{!?_without_serial:1}
68 %define with_snmp 0%{!?_without_snmp:1}
69 %define with_swap 0%{!?_without_swap:1}
70 %define with_syslog 0%{!?_without_syslog:1}
71 %define with_table 0%{!?_without_table:1}
72 %define with_tail 0%{!?_without_tail:1}
73 %define with_tcpconns 0%{!?_without_tcpconns:1}
74 %define with_teamspeak2 0%{!?_without_teamspeak2:1}
75 %define with_ted 0%{!?_without_ted:1}
76 %define with_thermal 0%{!?_without_thermal:1}
77 %define with_threshold 0%{!?_without_threshold:1}
78 %define with_unixsock 0%{!?_without_unixsock:1}
79 %define with_uptime 0%{!?_without_uptime:1}
80 %define with_users 0%{!?_without_users:1}
81 %define with_uuid 0%{!?_without_uuid:1}
82 %define with_varnish 0%{!?_without_varnish:1}
83 %define with_vmem 0%{!?_without_vmem:1}
84 %define with_vserver 0%{!?_without_vserver:1}
85 %define with_wireless 0%{!?_without_wireless:1}
86 %define with_write_graphite 0%{!?_without_write_graphite:1}
87 %define with_write_http 0%{!?_without_write_http:1}
88
89 # disabled plugins
90 %define with_apple_sensors 0%{!?_without_apple_sensors:0}
91 %define with_lpar 0%{!?_without_lpar:0}
92 %define with_modbus 0%{!?_without_modbus:0}
93 %define with_netapp 0%{!?_without_netapp:0}
94 %define with_netlink 0%{!?_without_netlink:0}
95 %define with_onewire 0%{!?_without_onewire:0}
96 %define with_oracle 0%{!?_without_oracle:0}
97 %define with_redis 0%{!?_without_redis:0}
98 %define with_routeros 0%{!?_without_routeros:0}
99 %define with_rrdcached 0%{!?_without_rrdcached:0}
100 %define with_tape 0%{!?_without_tape:0}
101 %define with_tokyotyrant 0%{!?_without_tokyotyrant:0}
102 %define with_write_mongodb 0%{!?_without_write_mongodb:0}
103 %define with_write_redis 0%{!?_without_write_redis:0}
104 %define with_xmms 0%{!?_without_xmms:0}
105 %define with_zfs_arc 0%{!?_without_zfs_arc:0}
106
107 Summary:        Statistics collection daemon for filling RRD files
108 Name:           collectd
109 Version:        5.1.0
110 Release:        3%{?dist}
111 URL:            http://collectd.org
112 Source:         http://collectd.org/files/%{name}-%{version}.tar.gz
113 License:        GPLv2
114 Group:          System Environment/Daemons
115 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
116 BuildRequires:  curl-devel, libgcrypt-devel, libxml2-devel, libstatgrab-devel
117 Vendor:         collectd development team <collectd@verplant.org>
118
119 Requires(post):         chkconfig
120 Requires(preun):        chkconfig, initscripts
121 Requires(postun):       initscripts
122
123 %description
124 collectd is a small daemon which collects system information periodically and
125 provides mechanisms to monitor and store the values in a variety of ways. It
126 is written in C for performance. Since the daemon doesn't need to start up
127 every time it wants to update the values it's very fast and easy on the
128 system. Also, the statistics are very fine grained since the files are updated
129 every 10 seconds.
130
131 %if %{with_amqp}
132 %package amqp
133 Summary:        AMQP plugin for collectd
134 Group:          System Environment/Daemons
135 Requires:       %{name}%{?_isa} = %{version}-%{release}
136 BuildRequires:  librabbitmq-devel
137 %description amqp
138 The AMQP plugin transmits or receives values collected by collectd via the
139 Advanced Message Queuing Protocol (AMQP).
140 %endif
141
142 %if %{with_apache}
143 %package apache
144 Summary:        Apache plugin for collectd
145 Group:          System Environment/Daemons
146 Requires:       %{name}%{?_isa} = %{version}-%{release}
147 %description apache
148 This plugin collects data provided by Apache's `mod_status'.
149 %endif
150
151 %if %{with_ascent}
152 %package ascent
153 Summary:        Ascent plugin for collectd
154 Group:          System Environment/Daemons
155 Requires:       %{name}%{?_isa} = %{version}-%{release}
156 %description ascent
157 The Ascent plugin reads and parses the statistics page of Ascent, a free and
158 open-source server software for the game World of Warcraft by Blizzard
159 Entertainment.
160 %endif
161
162 %if %{with_bind}
163 %package bind
164 Summary:        Bind plugin for collectd
165 Group:          System Environment/Daemons
166 Requires:       %{name}%{?_isa} = %{version}-%{release}
167 %description bind
168 The BIND plugin retrieves this information that's encoded in XML and provided
169 via HTTP and submits the values to collectd.
170 %endif
171
172 %if %{with_curl}
173 %package curl
174 Summary:        Curl plugin for collectd
175 Group:          System Environment/Daemons
176 Requires:       %{name}%{?_isa} = %{version}-%{release}
177 %description curl
178 The cURL plugin uses libcurl to read files and then parses them according to
179 the configuration.
180 %endif
181
182 %if %{with_curl_json}
183 %package curl_json
184 Summary:        Curl_json plugin for collectd
185 Group:          System Environment/Daemons
186 Requires:       %{name}%{?_isa} = %{version}-%{release}, curl, yajl
187 Buildrequires:  yajl-devel
188 %description curl_json
189 The cURL-JSON plugin queries JavaScript Object Notation (JSON) data using the
190 cURL library and parses it according to the user's configuration.
191 %endif
192
193 %if %{with_curl_xml}
194 %package curl_xml
195 Summary:        Curl_xml plugin for collectd
196 Group:          System Environment/Daemons
197 Requires:       %{name}%{?_isa} = %{version}-%{release}
198 %description curl_xml
199 The cURL-XML plugin reads files using libcurl and parses it as Extensible
200 Markup Language (XML).
201 %endif
202
203 %if %{with_dbi}
204 %package dbi
205 Summary:        DBI plugin for collectd
206 Group:          System Environment/Daemons
207 Requires:       %{name}%{?_isa} = %{version}-%{release}
208 Buildrequires:  libdbi-devel
209 %description dbi
210 The DBI plugin uses libdbi, a database abstraction library, to execute SQL
211 statements on a database and read back the result.
212 %endif
213
214 %if %{with_dns}
215 %package dns
216 Summary:        DNS plugin for collectd
217 Group:          System Environment/Daemons
218 Requires:       %{name}%{?_isa} = %{version}-%{release}
219 Buildrequires:  libpcap-devel
220 %description dns
221 The DNS plugin has a similar functionality to dnstop: It uses libpcap to get a
222 copy of all traffic from/to port UDP/53 (that's the DNS port), interprets the
223 packets and collects statistics of your DNS traffic.
224 %endif
225
226 %if %{with_email}
227 %package email
228 Summary:        Email plugin for collectd
229 Group:          System Environment/Daemons
230 Requires:       %{name}%{?_isa} = %{version}-%{release}, spamassassin
231 %description email
232 This plugin collects data provided by spamassassin.
233 %endif
234
235 %if %{with_gmond}
236 %package gmond
237 Summary:        Gmond plugin for collectd
238 Group:          System Environment/Daemons
239 Requires:       %{name}%{?_isa} = %{version}-%{release}
240 BuildRequires:  ganglia-devel
241 %description gmond
242 The gmond plugin subscribes to a Multicast group to receive data from gmond,
243 the client daemon of the Ganglia project.
244 %endif
245
246 %if %{with_hddtemp}
247 %package hddtemp
248 Summary:        Hddtemp plugin for collectd
249 Group:          System Environment/Daemons
250 Requires:       %{name}%{?_isa} = %{version}-%{release}, hddtemp
251 %description hddtemp
252 The HDDTemp plugin collects the temperature of hard disks. The temperatures are
253 provided via SMART and queried by the external hddtemp daemon.
254 %endif
255
256 %if %{with_ipmi}
257 %package ipmi
258 Summary:        IPMI plugin for collectd
259 Group:          System Environment/Daemons
260 Requires:       %{name}%{?_isa} = %{version}-%{release}
261 BuildRequires:  OpenIPMI-devel
262 %description ipmi
263 The IPMI plugin uses the OpenIPMI library to read hardware sensors from servers
264 using the Intelligent Platform Management Interface (IPMI).
265 %endif
266
267 %if %{with_iptables}
268 %package iptables
269 Summary:        IPtables plugin for collectd
270 Group:          System Environment/Daemons
271 Requires:       %{name}%{?_isa} = %{version}-%{release}
272 BuildRequires:  iptables-devel
273 %description iptables
274 The IPtables plugin can gather statistics from your ip_tables based packet
275 filter (aka. firewall) for both the IPv4 and the IPv6 protocol. It can collect
276 the byte- and packet-counters of selected rules and submit them to collectd.
277 %endif
278
279 %if %{with_java}
280 %package java
281 Summary:        Java plugin for collectd
282 Group:          System Environment/Daemons
283 Requires:       %{name}%{?_isa} = %{version}-%{release}
284 BuildRequires:  java-devel, jpackage-utils
285 Requires:       java, jpackage-utils
286 %description java
287 This plugin for collectd allows plugins to be written in Java and executed
288 in an embedded JVM.
289 %endif
290
291 %if %{with_libvirt}
292 %package libvirt
293 Summary:        Libvirt plugin for collectd
294 Group:          System Environment/Daemons
295 Requires:       %{name}%{?_isa} = %{version}-%{release}
296 BuildRequires:  libvirt-devel
297 %description libvirt
298 This plugin collects information from virtualized guests.
299 %endif
300
301 %if %{with_memcachec}
302 %package memcachec
303 Summary:        Memcachec plugin for collectd
304 Group:          System Environment/Daemons
305 Requires:       %{name}%{?_isa} = %{version}-%{release}
306 BuildRequires:  libmemcached-devel
307 %description memcachec
308 The Memcachec plugin uses libmemcached to read statistics from a Memcached
309 instance. Note that another plugin, named `memcached', exists and does a
310 similar job, without requiring the installation of libmemcached.
311 %endif
312
313 %if %{with_mysql}
314 %package mysql
315 Summary:        MySQL plugin for collectd
316 Group:          System Environment/Daemons
317 Requires:       %{name}%{?_isa} = %{version}-%{release}
318 BuildRequires:  mysql-devel
319 %description mysql
320 MySQL querying plugin. This plugin provides data of issued commands, called
321 handlers and database traffic.
322 %endif
323
324 %if %{with_nginx}
325 %package nginx
326 Summary:        Nginx plugin for collectd
327 Group:          System Environment/Daemons
328 Requires:       %{name}%{?_isa} = %{version}-%{release}
329 %description nginx
330 This plugin gets data provided by nginx.
331 %endif
332
333 %if %{with_notify_desktop}
334 %package notify_desktop
335 Summary:        Notify_desktop plugin for collectd
336 Group:          System Environment/Daemons
337 Requires:       %{name}%{?_isa} = %{version}-%{release}
338 BuildRequires:  libnotify-devel
339 %description notify_desktop
340 The Notify Desktop plugin uses libnotify to display notifications to the user
341 via the desktop notification specification, i. e. on an X display.
342 %endif
343
344 %if %{with_notify_email}
345 %package notify_email
346 Summary:        Notify_email plugin for collectd
347 Group:          System Environment/Daemons
348 Requires:       %{name}%{?_isa} = %{version}-%{release}
349 BuildRequires:  libesmtp-devel
350 %description notify_email
351 The Notify Email plugin uses libESMTP to send notifications to a configured
352 email address.
353 %endif
354
355 %if %{with_nut}
356 %package nut
357 Summary:        Nut plugin for collectd
358 Group:          System Environment/Daemons
359 Requires:       %{name}%{?_isa} = %{version}-%{release}
360 BuildRequires:  nut-devel
361 %description nut
362 This plugin for collectd provides Network UPS Tools support.
363 %endif
364
365 %if %{with_perl}
366 %package perl
367 Summary:        Perl plugin for collectd
368 Group:          System Environment/Daemons
369 Requires:       %{name}%{?_isa} = %{version}-%{release}
370 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
371 BuildRequires:  perl-ExtUtils-Embed
372 %description perl
373 The Perl plugin embeds a Perl interpreter into collectd and exposes the
374 application programming interface (API) to Perl-scripts.
375 %endif
376
377 %if %{with_pinba}
378 %package pinba
379 Summary:        Pinba plugin for collectd
380 Group:          System Environment/Daemons
381 Requires:       %{name}%{?_isa} = %{version}-%{release}
382 BuildRequires:  protobuf-c-devel
383 %description pinba
384 The Pinba plugin receives and dispatches timing values from Pinba, a profiling
385 extension for PHP.
386 %endif
387
388 %if %{with_ping}
389 %package ping
390 Summary:        Ping plugin for collectd
391 Group:          System Environment/Daemons
392 Requires:       %{name}%{?_isa} = %{version}-%{release}
393 BuildRequires:  liboping-devel
394 %description ping
395 The Ping plugin measures network latency using ICMP “echo requests”, usually
396 known as “ping”.
397 %endif
398
399 %if %{with_postgresql}
400 %package postgresql
401 Summary:        PostgreSQL plugin for collectd
402 Group:          System Environment/Daemons
403 Requires:       %{name}%{?_isa} = %{version}-%{release}
404 BuildRequires:  postgresql-devel
405 %description postgresql
406 The PostgreSQL plugin connects to and executes SQL statements on a PostgreSQL
407 database.
408 %endif
409
410 %if %{with_python}
411 %package python
412 Summary:        Python plugin for collectd
413 Group:          System Environment/Daemons
414 Requires:       %{name}%{?_isa} = %{version}-%{release}
415 BuildRequires:  python-devel
416 %description python
417 The Python plugin embeds a Python interpreter into collectd and exposes the
418 application programming interface (API) to Python-scripts.
419 %endif
420
421 %if %{with_rrdtool}
422 %package rrdtool
423 Summary:        RRDtool plugin for collectd
424 Group:          System Environment/Daemons
425 Requires:       %{name}%{?_isa} = %{version}-%{release}
426 BuildRequires:  rrdtool-devel
427 %description rrdtool
428 The RRDtool plugin writes values to RRD-files using librrd.
429 %endif
430
431 %if %{with_sensors}
432 %package sensors
433 Summary:        Sensors plugin for collectd
434 Group:          System Environment/Daemons
435 Requires:       %{name}%{?_isa} = %{version}-%{release}
436 BuildRequires:  lm_sensors-devel
437 %description sensors
438 This plugin for collectd provides querying of sensors supported by lm_sensors.
439 %endif
440
441 %if %{with_snmp}
442 %package snmp
443 Summary:        SNMP plugin for collectd
444 Group:          System Environment/Daemons
445 Requires:       %{name}%{?_isa} = %{version}-%{release}
446 BuildRequires:  net-snmp-devel
447 %description snmp
448 This plugin for collectd allows querying of network equipment using SNMP.
449 %endif
450
451 %if %{with_varnish}
452 %package varnish
453 Summary:        Varnish plugin for collectd
454 Group:          System Environment/Daemons
455 Requires:       %{name}%{?_isa} = %{version}-%{release}
456 BuildRequires:  varnish-libs-devel
457 %description varnish
458 The Varnish plugin collects information about Varnish, an HTTP accelerator.
459 %endif
460
461 %if %{with_write_http}
462 %package write_http
463 Summary:        Write-HTTP plugin for collectd
464 Group:          System Environment/Daemons
465 Requires:       %{name}%{?_isa} = %{version}-%{release}
466 %description write_http
467 The Write-HTTP plugin sends the values collected by collectd to a web-server
468 using HTTP POST requests.
469 %endif
470
471 %package contrib
472 Summary:        Contrib files for collectd
473 Group:          System Environment/Daemons
474 Requires:       %{name}%{?_isa} = %{version}-%{release}
475 %description contrib
476 All the files found under contrib/ in the source tree are bundled in this
477 package.
478
479 %package -n libcollectdclient
480 Summary:        Collectd client library
481 %description -n libcollectdclient
482 Collectd client library
483
484 %package -n libcollectdclient-devel
485 Summary:        Development files for libcollectdclient
486 Requires:       pkgconfig
487 Requires:       libcollectdclient%{?_isa} = %{version}-%{release}
488 %description -n libcollectdclient-devel
489 Development files for libcollectdclient
490
491
492 %prep
493 %setup -q
494
495
496 %build
497 %if %{with_amqp}
498 %define _with_amqp --enable-amqp
499 %else
500 %define _with_amqp --disable-amqp
501 %endif
502
503 %if %{with_apache}
504 %define _with_apache --enable-apache
505 %else
506 %define _with_apache --disable-apache
507 %endif
508
509 %if %{with_apcups}
510 %define _with_apcups --enable-apcups
511 %else
512 %define _with_apcups --disable-apcups
513 %endif
514
515 %if %{with_apple_sensors}
516 %define _with_apple_sensors --enable-apple_sensors
517 %else
518 %define _with_apple_sensors --disable-apple_sensors
519 %endif
520
521 %if %{with_ascent}
522 %define _with_ascent --enable-ascent
523 %else
524 %define _with_ascent --disable-ascent
525 %endif
526
527 %if %{with_battery}
528 %define _with_battery --enable-battery
529 %else
530 %define _with_battery --disable-battery
531 %endif
532
533 %if %{with_bind}
534 %define _with_bind --enable-bind
535 %else
536 %define _with_bind --disable-bind
537 %endif
538
539 %if %{with_conntrack}
540 %define _with_conntrack --enable-conntrack
541 %else
542 %define _with_conntrack --disable-conntrack
543 %endif
544
545 %if %{with_contextswitch}
546 %define _with_contextswitch --enable-contextswitch
547 %else
548 %define _with_contextswitch --disable-contextswitch
549 %endif
550
551 %if %{with_cpu}
552 %define _with_cpu --enable-cpu
553 %else
554 %define _with_cpu --disable-cpu
555 %endif
556
557 %if %{with_cpufreq}
558 %define _with_cpufreq --enable-cpufreq
559 %else
560 %define _with_cpufreq --disable-cpufreq
561 %endif
562
563 %if %{with_csv}
564 %define _with_csv --enable-csv
565 %else
566 %define _with_csv --disable-csv
567 %endif
568
569 %if %{with_curl}
570 %define _with_curl --enable-curl
571 %else
572 %define _with_curl --disable-curl
573 %endif
574
575 %if %{with_curl_json}
576 %define _with_curl_json --enable-curl_json
577 %else
578 %define _with_curl_json --disable-curl_json
579 %endif
580
581 %if %{with_curl_xml}
582 %define _with_curl_xml --enable-curl_xml
583 %else
584 %define _with_curl_xml --disable-curl_xml
585 %endif
586
587 %if %{with_dbi}
588 %define _with_dbi --enable-dbi
589 %else
590 %define _with_dbi --disable-dbi --without-libdbi
591 %endif
592
593 %if %{with_df}
594 %define _with_df --enable-df
595 %else
596 %define _with_df --disable-df
597 %endif
598
599 %if %{with_disk}
600 %define _with_disk --enable-disk
601 %else
602 %define _with_disk --disable-disk
603 %endif
604
605 %if %{with_dns}
606 %define _with_dns --enable-dns
607 %else
608 %define _with_dns --disable-dns
609 %endif
610
611 %if %{with_email}
612 %define _with_email --enable-email
613 %else
614 %define _with_email --disable-email
615 %endif
616
617 %if %{with_entropy}
618 %define _with_entropy --enable-entropy
619 %else
620 %define _with_entropy --disable-entropy
621 %endif
622
623 %if %{with_ethstat}
624 %define _with_ethstat --enable-ethstat
625 %else
626 %define _with_ethstat --disable-ethstat
627 %endif
628
629 %if %{with_exec}
630 %define _with_exec --enable-exec
631 %else
632 %define _with_exec --disable-exec
633 %endif
634
635 %if %{with_filecount}
636 %define _with_filecount --enable-filecount
637 %else
638 %define _with_filecount --disable-filecount
639 %endif
640
641 %if %{with_fscache}
642 %define _with_fscache --enable-fscache
643 %else
644 %define _with_fscache --disable-fscache
645 %endif
646
647 %if %{with_gmond}
648 %define _with_gmond --enable-gmond
649 %else
650 %define _with_gmond --disable-gmond
651 %endif
652
653 %if %{with_hddtemp}
654 %define _with_hddtemp --enable-hddtemp
655 %else
656 %define _with_hddtemp --disable-hddtemp
657 %endif
658
659 %if %{with_interface}
660 %define _with_interface --enable-interface
661 %else
662 %define _with_interface --disable-interface
663 %endif
664
665 %if %{with_ipmi}
666 %define _with_ipmi --enable-ipmi
667 %else
668 %define _with_ipmi --disable-ipmi
669 %endif
670
671 %if %{with_iptables}
672 %define _with_iptables --enable-iptables
673 %else
674 %define _with_iptables --disable-iptables
675 %endif
676
677 %if %{with_ipvs}
678 %define _with_ipvs --enable-ipvs
679 %else
680 %define _with_ipvs --disable-ipvs
681 %endif
682
683 %if %{with_irq}
684 %define _with_irq --enable-irq
685 %else
686 %define _with_irq --disable-irq
687 %endif
688
689 %if %{with_java}
690 %define _with_java --enable-java --with-java=%{java_home}/
691 %else
692 %define _with_java --disable-java
693 %endif
694
695 %if %{with_libvirt}
696 %define _with_libvirt --enable-libvirt
697 %else
698 %define _with_libvirt --disable-libvirt
699 %endif
700
701 %if %{with_load}
702 %define _with_load --enable-load
703 %else
704 %define _with_load --disable-load
705 %endif
706
707 %if %{with_logfile}
708 %define _with_logfile --enable-logfile
709 %else
710 %define _with_logfile --disable-logfile
711 %endif
712
713 %if %{with_lpar}
714 %define _with_lpar --enable-lpar
715 %else
716 %define _with_lpar --disable-lpar
717 %endif
718
719 %if %{with_madwifi}
720 %define _with_madwifi --enable-madwifi
721 %else
722 %define _with_madwifi --disable-madwifi
723 %endif
724
725 %if %{with_mbmon}
726 %define _with_mbmon --enable-mbmon
727 %else
728 %define _with_mbmon --disable-mbmon
729 %endif
730
731 %if %{with_md}
732 %define _with_md --enable-md
733 %else
734 %define _with_md --disable-md
735 %endif
736
737 %if %{with_memcachec}
738 %define _with_memcachec --enable-memcachec
739 %else
740 %define _with_memcachec --disable-memcachec
741 %endif
742
743 %if %{with_memcached}
744 %define _with_memcached --enable-memcached
745 %else
746 %define _with_memcached --disable-memcached
747 %endif
748
749 %if %{with_memory}
750 %define _with_memory --enable-memory
751 %else
752 %define _with_memory --disable-memory
753 %endif
754
755 %if %{with_modbus}
756 %define _with_modbus --enable-modbus
757 %else
758 %define _with_modbus --disable-modbus
759 %endif
760
761 %if %{with_multimeter}
762 %define _with_multimeter --enable-multimeter
763 %else
764 %define _with_multimeter --disable-multimeter
765 %endif
766
767 %if %{with_mysql}
768 %define _with_mysql --enable-mysql
769 %else
770 %define _with_mysql --disable-mysql
771 %endif
772
773 %if %{with_netapp}
774 %define _with_netapp --enable-netapp
775 %else
776 %define _with_netapp --disable-netapp
777 %endif
778
779 %if %{with_netlink}
780 %define _with_netlink --enable-netlink
781 %else
782 %define _with_netlink --disable-netlink
783 %endif
784
785 %if %{with_network}
786 %define _with_network --enable-network
787 %else
788 %define _with_network --disable-network
789 %endif
790
791 %if %{with_nfs}
792 %define _with_nfs --enable-nfs
793 %else
794 %define _with_nfs --disable-nfs
795 %endif
796
797 %if %{with_nginx}
798 %define _with_nginx --enable-nginx
799 %else
800 %define _with_nginx --disable-nginx
801 %endif
802
803 %if %{with_notify_desktop}
804 %define _with_notify_desktop --enable-notify_desktop
805 %else
806 %define _with_notify_desktop --disable-notify_desktop
807 %endif
808
809 %if %{with_notify_email}
810 %define _with_notify_email --enable-notify_email
811 %else
812 %define _with_notify_email --disable-notify_email --without-libesmpt
813 %endif
814
815 %if %{with_ntpd}
816 %define _with_ntpd --enable-ntpd
817 %else
818 %define _with_ntpd --disable-ntpd
819 %endif
820
821 %if %{with_numa}
822 %define _with_numa --enable-numa
823 %else
824 %define _with_numa --disable-numa
825 %endif
826
827 %if %{with_nut}
828 %define _with_nut --enable-nut
829 %else
830 %define _with_nut --disable-nut
831 %endif
832
833 %if %{with_olsrd}
834 %define _with_olsrd --enable-olsrd
835 %else
836 %define _with_olsrd --disable-olsrd
837 %endif
838
839 %if %{with_onewire}
840 %define _with_onewire --enable-onewire
841 %else
842 %define _with_onewire --disable-onewire
843 %endif
844
845 %if %{with_openvpn}
846 %define _with_openvpn --enable-openvpn
847 %else
848 %define _with_openvpn --disable-openvpn
849 %endif
850
851 %if %{with_oracle}
852 %define _with_oracle --enable-oracle
853 %else
854 %define _with_oracle --disable-oracle
855 %endif
856
857 %if %{with_perl}
858 %define _with_perl --enable-perl --with-perl-bindings="INSTALLDIRS=vendor"
859 %else
860 %define _with_perl --disable-perl --without-libperl
861 %endif
862
863 %if %{with_pinba}
864 %define _with_pinba --enable-pinba
865 %else
866 %define _with_pinba --disable-pinba
867 %endif
868
869 %if %{with_ping}
870 %define _with_ping --enable-ping
871 %else
872 %define _with_ping --disable-ping
873 %endif
874
875 %if %{with_postgresql}
876 %define _with_postgresql --enable-postgresql
877 %else
878 %define _with_postgresql --disable-postgresql
879 %endif
880
881 %if %{with_powerdns}
882 %define _with_powerdns --enable-powerdns
883 %else
884 %define _with_powerdns --disable-powerdns
885 %endif
886
887 %if %{with_processes}
888 %define _with_processes --enable-processes
889 %else
890 %define _with_processes --disable-processes
891 %endif
892
893 %if %{with_protocols}
894 %define _with_protocols --enable-protocols
895 %else
896 %define _with_protocols --disable-protocols
897 %endif
898
899 %if %{with_python}
900 %define _with_python --enable-python
901 %else
902 %define _with_python --disable-python
903 %endif
904
905 %if %{with_redis}
906 %define _with_redis --enable-redis
907 %else
908 %define _with_redis --disable-redis
909 %endif
910
911 %if %{with_routeros}
912 %define _with_routeros --enable-routeros
913 %else
914 %define _with_routeros --disable-routeros
915 %endif
916
917 %if %{with_rrdcached}
918 %define _with_rrdcached --enable-rrdcached
919 %else
920 %define _with_rrdcached --disable-rrdcached
921 %endif
922
923 %if %{with_rrdtool}
924 %define _with_rrdtool --enable-rrdtool
925 %else
926 %define _with_rrdtool --disable-rrdtool
927 %endif
928
929 %if %{with_sensors}
930 %define _with_sensors --enable-sensors
931 %else
932 %define _with_sensors --disable-sensors
933 %endif
934
935 %if %{with_serial}
936 %define _with_serial --enable-serial
937 %else
938 %define _with_serial --disable-serial
939 %endif
940
941 %if %{with_snmp}
942 %define _with_snmp --enable-snmp
943 %else
944 %define _with_snmp --disable-snmp
945 %endif
946
947 %if %{with_swap}
948 %define _with_swap --enable-swap
949 %else
950 %define _with_swap --disable-swap
951 %endif
952
953 %if %{with_syslog}
954 %define _with_syslog --enable-syslog
955 %else
956 %define _with_syslog --disable-syslog
957 %endif
958
959 %if %{with_table}
960 %define _with_table --enable-table
961 %else
962 %define _with_table --disable-table
963 %endif
964
965 %if %{with_tail}
966 %define _with_tail --enable-tail
967 %else
968 %define _with_tail --disable-tail
969 %endif
970
971 %if %{with_tape}
972 %define _with_tape --enable-tape
973 %else
974 %define _with_tape --disable-tape
975 %endif
976
977 %if %{with_tcpconns}
978 %define _with_tcpconns --enable-tcpconns
979 %else
980 %define _with_tcpconns --disable-tcpconns
981 %endif
982
983 %if %{with_teamspeak2}
984 %define _with_teamspeak2 --enable-teamspeak2
985 %else
986 %define _with_teamspeak2 --disable-teamspeak2
987 %endif
988
989 %if %{with_ted}
990 %define _with_ted --enable-ted
991 %else
992 %define _with_ted --disable-ted
993 %endif
994
995 %if %{with_thermal}
996 %define _with_thermal --enable-thermal
997 %else
998 %define _with_thermal --disable-thermal
999 %endif
1000
1001 %if %{with_threshold}
1002 %define _with_threshold --enable-threshold
1003 %else
1004 %define _with_threshold --disable-threshold
1005 %endif
1006
1007 %if %{with_tokyotyrant}
1008 %define _with_tokyotyrant --enable-tokyotyrant
1009 %else
1010 %define _with_tokyotyrant --disable-tokyotyrant
1011 %endif
1012
1013 %if %{with_unixsock}
1014 %define _with_unixsock --enable-unixsock
1015 %else
1016 %define _with_unixsock --disable-unixsock
1017 %endif
1018
1019 %if %{with_uptime}
1020 %define _with_uptime --enable-uptime
1021 %else
1022 %define _with_uptime --disable-uptime
1023 %endif
1024
1025 %if %{with_users}
1026 %define _with_users --enable-users
1027 %else
1028 %define _with_users --disable-users
1029 %endif
1030
1031 %if %{with_uuid}
1032 %define _with_uuid --enable-uuid
1033 %else
1034 %define _with_uuid --disable-uuid
1035 %endif
1036
1037 %if %{with_varnish}
1038 %define _with_varnish --enable-varnish
1039 %else
1040 %define _with_varnish --disable-varnish
1041 %endif
1042
1043 %if %{with_vmem}
1044 %define _with_vmem --enable-vmem
1045 %else
1046 %define _with_vmem --disable-vmem
1047 %endif
1048
1049 %if %{with_vserver}
1050 %define _with_vserver --enable-vserver
1051 %else
1052 %define _with_vserver --disable-vserver
1053 %endif
1054
1055 %if %{with_wireless}
1056 %define _with_wireless --enable-wireless
1057 %else
1058 %define _with_wireless --disable-wireless
1059 %endif
1060
1061 %if %{with_write_graphite}
1062 %define _with_write_graphite --enable-write_graphite
1063 %else
1064 %define _with_write_graphite --disable-write_graphite
1065 %endif
1066
1067 %if %{with_write_http}
1068 %define _with_write_http --enable-write_http
1069 %else
1070 %define _with_write_http --disable-write_http
1071 %endif
1072
1073 %if %{with_write_mongodb}
1074 %define _with_write_mongodb --enable-write_mongodb
1075 %else
1076 %define _with_write_mongodb --disable-write_mongodb --without-libmongoc
1077 %endif
1078
1079 %if %{with_write_redis}
1080 %define _with_write_redis --enable-write_redis
1081 %else
1082 %define _with_write_redis --disable-write_redis --without-libcredis
1083 %endif
1084
1085 %if %{with_xmms}
1086 %define _with_xmms --enable-xmms
1087 %else
1088 %define _with_xmms --disable-xmms
1089 %endif
1090
1091 %if %{with_zfs_arc}
1092 %define _with_zfs_arc --enable-zfs_arc
1093 %else
1094 %define _with_zfs_arc --disable-zfs_arc
1095 %endif
1096
1097 %configure CFLAGS="%{optflags} -DLT_LAZY_OR_NOW=\"RTLD_LAZY|RTLD_GLOBAL\"" \
1098         --disable-static \
1099         --without-included-ltdl \
1100         --enable-all-plugins=yes \
1101         --enable-match_empty_counter \
1102         --enable-match_hashed \
1103         --enable-match_regex \
1104         --enable-match_timediff \
1105         --enable-match_value \
1106         --enable-target_notification \
1107         --enable-target_replace \
1108         --enable-target_scale \
1109         --enable-target_set \
1110         --enable-target_v5upgrade \
1111         %{?_with_amqp} \
1112         %{?_with_apache} \
1113         %{?_with_apcups} \
1114         %{?_with_apple_sensors} \
1115         %{?_with_ascent} \
1116         %{?_with_battery} \
1117         %{?_with_bind} \
1118         %{?_with_conntrack} \
1119         %{?_with_contextswitch} \
1120         %{?_with_cpu} \
1121         %{?_with_cpufreq} \
1122         %{?_with_csv} \
1123         %{?_with_curl} \
1124         %{?_with_curl_json} \
1125         %{?_with_curl_xml} \
1126         %{?_with_dbi} \
1127         %{?_with_df} \
1128         %{?_with_disk} \
1129         %{?_with_dns} \
1130         %{?_with_email} \
1131         %{?_with_entropy} \
1132         %{?_with_ethstat} \
1133         %{?_with_exec} \
1134         %{?_with_filecount} \
1135         %{?_with_fscache} \
1136         %{?_with_gmond} \
1137         %{?_with_hddtemp} \
1138         %{?_with_interface} \
1139         %{?_with_ipmi} \
1140         %{?_with_iptables} \
1141         %{?_with_ipvs} \
1142         %{?_with_java} \
1143         %{?_with_libvirt} \
1144         %{?_with_lpar} \
1145         %{?_with_memcachec} \
1146         %{?_with_modbus} \
1147         %{?_with_multimeter} \
1148         %{?_with_mysql} \
1149         %{?_with_netapp} \
1150         %{?_with_netlink} \
1151         %{?_with_nginx} \
1152         %{?_with_notify_desktop} \
1153         %{?_with_notify_email} \
1154         %{?_with_nut} \
1155         %{?_with_onewire} \
1156         %{?_with_oracle} \
1157         %{?_with_perl} \
1158         %{?_with_pinba} \
1159         %{?_with_ping} \
1160         %{?_with_postgresql} \
1161         %{?_with_python} \
1162         %{?_with_redis} \
1163         %{?_with_routeros} \
1164         %{?_with_rrdcached} \
1165         %{?_with_rrdtool} \
1166         %{?_with_sensors} \
1167         %{?_with_snmp} \
1168         %{?_with_tape} \
1169         %{?_with_tokyotyrant} \
1170         %{?_with_varnish} \
1171         %{?_with_write_http} \
1172         %{?_with_write_mongodb} \
1173         %{?_with_write_redis} \
1174         %{?_with_xmms} \
1175         %{?_with_zfs_arc} \
1176         %{?_with_irq} \
1177         %{?_with_load} \
1178         %{?_with_logfile} \
1179         %{?_with_madwifi} \
1180         %{?_with_mbmon} \
1181         %{?_with_md} \
1182         %{?_with_memcached} \
1183         %{?_with_memory} \
1184         %{?_with_network} \
1185         %{?_with_nfs} \
1186         %{?_with_ntpd} \
1187         %{?_with_numa} \
1188         %{?_with_olsrd} \
1189         %{?_with_openvpn} \
1190         %{?_with_powerdns} \
1191         %{?_with_processes} \
1192         %{?_with_protocols} \
1193         %{?_with_serial} \
1194         %{?_with_swap} \
1195         %{?_with_syslog} \
1196         %{?_with_table} \
1197         %{?_with_tail} \
1198         %{?_with_tcpconns} \
1199         %{?_with_teamspeak2} \
1200         %{?_with_ted} \
1201         %{?_with_thermal} \
1202         %{?_with_threshold} \
1203         %{?_with_unixsock} \
1204         %{?_with_uptime} \
1205         %{?_with_users} \
1206         %{?_with_uuid} \
1207         %{?_with_vmem} \
1208         %{?_with_vserver} \
1209         %{?_with_wireless}\
1210         %{?_with_write_graphite} \
1211         %{?_with_write_http}
1212
1213
1214 %{__make} %{?_smp_mflags}
1215
1216
1217 %install
1218 rm -rf %{buildroot}
1219 %{__make} install DESTDIR=%{buildroot}
1220 %{__install} -Dp -m 0755 contrib/redhat/init.d-collectd %{buildroot}%{_initrddir}/collectd
1221 %{__install} -Dp -m0644 src/collectd.conf %{buildroot}%{_sysconfdir}/collectd.conf
1222 %{__install} -d %{buildroot}%{sharedstatedir}/collectd/
1223 %{__install} -d %{buildroot}%{_sysconfdir}/collectd.d/
1224
1225 ### Clean up docs
1226 find contrib/ -type f -exec %{__chmod} a-x {} \;
1227 # *.la files shouldn't be distributed.
1228 rm -f %{buildroot}/%{_libdir}/{collectd/,}*.la
1229
1230 # Move the Perl examples to a separate directory.
1231 mkdir perl-examples
1232 find contrib -name '*.p[lm]' -exec mv {} perl-examples/ \;
1233
1234 # Remove Perl hidden .packlist files.
1235 find %{buildroot} -type f -name .packlist -delete
1236 # Remove Perl temporary file perllocal.pod
1237 find %{buildroot} -type f -name perllocal.pod -delete
1238
1239 %if ! %{with_java}
1240 rm -f %{buildroot}%{_mandir}/man5/collectd-java.5*
1241 %endif
1242
1243 %if ! %{with_perl}
1244 rm -f %{buildroot}%{_mandir}/man5/collectd-perl.5*
1245 rm -f %{buildroot}%{_mandir}/man3/Collectd::Unixsock.3pm*
1246 %endif
1247
1248 %if ! %{with_python}
1249 rm -f %{buildroot}%{_mandir}/man5/collectd-python.5*
1250 %endif
1251
1252 %if ! %{with_snmp}
1253 rm -f %{buildroot}%{_mandir}/man5/collectd-snmp.5*
1254 %endif
1255
1256
1257 %clean
1258 rm -rf %{buildroot}
1259
1260 %post
1261 /sbin/chkconfig --add collectd
1262
1263 %preun
1264 if [ $1 -eq 0 ]; then
1265         /sbin/service collectd stop &>/dev/null
1266         /sbin/chkconfig --del collectd
1267 fi
1268
1269 %postun
1270 if [ $1 -ge 1 ]; then
1271         /sbin/service collectd condrestart &>/dev/null || :
1272 fi
1273
1274 %post -n libcollectdclient -p /sbin/ldconfig
1275 %postun -n libcollectdclient -p /sbin/ldconfig
1276
1277
1278 %files
1279 %doc AUTHORS COPYING ChangeLog README
1280 %config(noreplace) %{_sysconfdir}/collectd.conf
1281 %{_initrddir}/collectd
1282 %{_sbindir}/collectd
1283 %{_bindir}/collectd-nagios
1284 %{_bindir}/collectdctl
1285 %{_sbindir}/collectdmon
1286 %{_datadir}/collectd/
1287 %{_sharedstatedir}/collectd
1288 %{_mandir}/man1/collectd-nagios.1*
1289 %{_mandir}/man1/collectd.1*
1290 %{_mandir}/man1/collectdctl.1*
1291 %{_mandir}/man1/collectdmon.1*
1292 %{_mandir}/man5/collectd-email.5*
1293 %{_mandir}/man5/collectd-exec.5*
1294 %{_mandir}/man5/collectd-threshold.5*
1295 %{_mandir}/man5/collectd-unixsock.5*
1296 %{_mandir}/man5/collectd.conf.5*
1297 %{_mandir}/man5/types.db.5*
1298
1299 # all plugins bundled with the main collectd package
1300 %{_libdir}/%{name}/match_empty_counter.so
1301 %{_libdir}/%{name}/match_hashed.so
1302 %{_libdir}/%{name}/match_regex.so
1303 %{_libdir}/%{name}/match_timediff.so
1304 %{_libdir}/%{name}/match_value.so
1305 %{_libdir}/%{name}/target_notification.so
1306 %{_libdir}/%{name}/target_replace.so
1307 %{_libdir}/%{name}/target_scale.so
1308 %{_libdir}/%{name}/target_set.so
1309 %{_libdir}/%{name}/target_v5upgrade.so
1310
1311 %if %{with_apcups}
1312 %{_libdir}/%{name}/apcups.so
1313 %endif
1314 %if %{with_battery}
1315 %{_libdir}/%{name}/battery.so
1316 %endif
1317 %if %{with_conntrack}
1318 %{_libdir}/%{name}/conntrack.so
1319 %endif
1320 %if %{with_contextswitch}
1321 %{_libdir}/%{name}/contextswitch.so
1322 %endif
1323 %if %{with_cpu}
1324 %{_libdir}/%{name}/cpu.so
1325 %endif
1326 %if %{with_cpufreq}
1327 %{_libdir}/%{name}/cpufreq.so
1328 %endif
1329 %if %{with_csv}
1330 %{_libdir}/%{name}/csv.so
1331 %endif
1332 %if %{with_df}
1333 %{_libdir}/%{name}/df.so
1334 %endif
1335 %if %{with_disk}
1336 %{_libdir}/%{name}/disk.so
1337 %endif
1338 %if %{with_ethstat}
1339 %{_libdir}/%{name}/ethstat.so
1340 %endif
1341 %if %{with_entropy}
1342 %{_libdir}/%{name}/entropy.so
1343 %endif
1344 %if %{with_exec}
1345 %{_libdir}/%{name}/exec.so
1346 %endif
1347 %if %{with_filecount}
1348 %{_libdir}/%{name}/filecount.so
1349 %endif
1350 %if %{with_fscache}
1351 %{_libdir}/%{name}/fscache.so
1352 %endif
1353 %if %{with_interface}
1354 %{_libdir}/%{name}/interface.so
1355 %endif
1356 %if %{with_ipvs}
1357 %{_libdir}/%{name}/ipvs.so
1358 %endif
1359 %if %{with_irq}
1360 %{_libdir}/%{name}/irq.so
1361 %endif
1362 %if %{with_load}
1363 %{_libdir}/%{name}/load.so
1364 %endif
1365 %if %{with_logfile}
1366 %{_libdir}/%{name}/logfile.so
1367 %endif
1368 %if %{with_madwifi}
1369 %{_libdir}/%{name}/madwifi.so
1370 %endif
1371 %if %{with_mbmon}
1372 %{_libdir}/%{name}/mbmon.so
1373 %endif
1374 %if %{with_md}
1375 %{_libdir}/%{name}/md.so
1376 %endif
1377 %if %{with_memcached}
1378 %{_libdir}/%{name}/memcached.so
1379 %endif
1380 %if %{with_memory}
1381 %{_libdir}/%{name}/memory.so
1382 %endif
1383 %if %{with_multimeter}
1384 %{_libdir}/%{name}/multimeter.so
1385 %endif
1386 %if %{with_network}
1387 %{_libdir}/%{name}/network.so
1388 %endif
1389 %if %{with_nfs}
1390 %{_libdir}/%{name}/nfs.so
1391 %endif
1392 %if %{with_ntpd}
1393 %{_libdir}/%{name}/ntpd.so
1394 %endif
1395 %if %{with_numa}
1396 %{_libdir}/%{name}/numa.so
1397 %endif
1398 %if %{with_openvpn}
1399 %{_libdir}/%{name}/openvpn.so
1400 %endif
1401 %if %{with_olsrd}
1402 %{_libdir}/%{name}/olsrd.so
1403 %endif
1404 %if %{with_powerdns}
1405 %{_libdir}/%{name}/powerdns.so
1406 %endif
1407 %if %{with_processes}
1408 %{_libdir}/%{name}/processes.so
1409 %endif
1410 %if %{with_protocols}
1411 %{_libdir}/%{name}/protocols.so
1412 %endif
1413 %if %{with_serial}
1414 %{_libdir}/%{name}/serial.so
1415 %endif
1416 %if %{with_swap}
1417 %{_libdir}/%{name}/swap.so
1418 %endif
1419 %if %{with_syslog}
1420 %{_libdir}/%{name}/syslog.so
1421 %endif
1422 %if %{with_table}
1423 %{_libdir}/%{name}/table.so
1424 %endif
1425 %if %{with_tail}
1426 %{_libdir}/%{name}/tail.so
1427 %endif
1428 %if %{with_tcpconns}
1429 %{_libdir}/%{name}/tcpconns.so
1430 %endif
1431 %if %{with_teamspeak2}
1432 %{_libdir}/%{name}/teamspeak2.so
1433 %endif
1434 %if %{with_ted}
1435 %{_libdir}/%{name}/ted.so
1436 %endif
1437 %if %{with_thermal}
1438 %{_libdir}/%{name}/thermal.so
1439 %endif
1440 %if %{with_load}
1441 %{_libdir}/%{name}/threshold.so
1442 %endif
1443 %if %{with_unixsock}
1444 %{_libdir}/%{name}/unixsock.so
1445 %endif
1446 %if %{with_uptime}
1447 %{_libdir}/%{name}/uptime.so
1448 %endif
1449 %if %{with_users}
1450 %{_libdir}/%{name}/users.so
1451 %endif
1452 %if %{with_uuid}
1453 %{_libdir}/%{name}/uuid.so
1454 %endif
1455 %if %{with_vmem}
1456 %{_libdir}/%{name}/vmem.so
1457 %endif
1458 %if %{with_vserver}
1459 %{_libdir}/%{name}/vserver.so
1460 %endif
1461 %if %{with_wireless}
1462 %{_libdir}/%{name}/wireless.so
1463 %endif
1464 %if %{with_write_graphite}
1465 %{_libdir}/%{name}/write_graphite.so
1466 %endif
1467
1468 # All plugins not built because of dependencies on libraries not available in
1469 # RHEL or EPEL:
1470 # plugin modbus disabled, requires libmodbus
1471 # plugin netlink disabled, requires libnetlink.h
1472 # plugin numa disabled, requires libnetapp
1473 # plugin onewire disabled, requires libowfs
1474 # plugin oracle disabled, requires Oracle
1475 # plugin redis disabled, requires credis
1476 # plugin routeros disabled, requires librouteros
1477 # plugin rrdcached disabled, requires rrdtool >= 1.4
1478 # plugin tokyotyrant disabled, requires tcrdb.h
1479 # plugin write_mongodb disabled, requires libmongoc
1480 # plugin write_redis disabled, requires credis
1481 # plugin xmms disabled, requires xmms
1482
1483
1484 %files -n libcollectdclient-devel
1485 %{_includedir}/collectd/client.h
1486 %{_includedir}/collectd/lcc_features.h
1487 %{_libdir}/libcollectdclient.so
1488 %{_libdir}/pkgconfig/libcollectdclient.pc
1489
1490 %files -n libcollectdclient
1491 %{_libdir}/libcollectdclient.so.*
1492
1493 %if %{with_amqp}
1494 %files amqp
1495 %{_libdir}/%{name}/amqp.so
1496 %endif
1497
1498 %if %{with_apache}
1499 %files apache
1500 %{_libdir}/%{name}/apache.so
1501 %endif
1502
1503 %if %{with_ascent}
1504 %files ascent
1505 %{_libdir}/%{name}/ascent.so
1506 %endif
1507
1508 %if %{with_bind}
1509 %files bind
1510 %{_libdir}/%{name}/bind.so
1511 %endif
1512
1513 %if %{with_curl}
1514 %files curl
1515 %{_libdir}/%{name}/curl.so
1516 %endif
1517
1518 %if %{with_curl_json}
1519 %files curl_json
1520 %{_libdir}/%{name}/curl_json.so
1521 %endif
1522
1523 %if %{with_curl_xml}
1524 %files curl_xml
1525 %{_libdir}/%{name}/curl_xml.so
1526 %endif
1527
1528 %if %{with_dns}
1529 %files dns
1530 %{_libdir}/%{name}/dns.so
1531 %endif
1532
1533 %if %{with_dbi}
1534 %files dbi
1535 %{_libdir}/%{name}/dbi.so
1536 %endif
1537
1538 %if %{with_email}
1539 %files email
1540 %{_libdir}/%{name}/email.so
1541 %endif
1542
1543 %if %{with_gmond}
1544 %files gmond
1545 %{_libdir}/%{name}/gmond.so
1546 %endif
1547
1548 %if %{with_hddtemp}
1549 %files hddtemp
1550 %{_libdir}/%{name}/hddtemp.so
1551 %endif
1552
1553 %if %{with_ipmi}
1554 %files ipmi
1555 %{_libdir}/%{name}/ipmi.so
1556 %endif
1557
1558 %if %{with_iptables}
1559 %files iptables
1560 %{_libdir}/%{name}/iptables.so
1561 %endif
1562
1563 %if %{with_java}
1564 %files java
1565 %{_datarootdir}/collectd/java/collectd-api.jar
1566 %{_datarootdir}/collectd/java/generic-jmx.jar
1567 %{_libdir}/%{name}/java.so
1568 %{_mandir}/man5/collectd-java.5*
1569 %endif
1570
1571 %if %{with_libvirt}
1572 %files libvirt
1573 %{_libdir}/%{name}/libvirt.so
1574 %endif
1575
1576 %if %{with_memcachec}
1577 %files memcachec
1578 %{_libdir}/%{name}/memcachec.so
1579 %endif
1580
1581 %if %{with_mysql}
1582 %files mysql
1583 %{_libdir}/%{name}/mysql.so
1584 %endif
1585
1586 %if %{with_nginx}
1587 %files nginx
1588 %{_libdir}/%{name}/nginx.so
1589 %endif
1590
1591 %if %{with_notify_desktop}
1592 %files notify_desktop
1593 %{_libdir}/%{name}/notify_desktop.so
1594 %endif
1595
1596 %if %{with_notify_email}
1597 %files notify_email
1598 %{_libdir}/%{name}/notify_email.so
1599 %endif
1600
1601 %if %{with_nut}
1602 %files nut
1603 %{_libdir}/%{name}/nut.so
1604 %endif
1605
1606 %if %{with_perl}
1607 %files perl
1608 %doc perl-examples/*
1609 %{perl_vendorlib}/Collectd.pm
1610 %{perl_vendorlib}/Collectd/
1611 %{_mandir}/man3/Collectd::Unixsock.3pm*
1612 %{_mandir}/man5/collectd-perl.5*
1613 %{_libdir}/%{name}/perl.so
1614 %endif
1615
1616 %if %{with_pinba}
1617 %files pinba
1618 %{_libdir}/%{name}/pinba.so
1619 %endif
1620
1621 %if %{with_ping}
1622 %files ping
1623 %{_libdir}/%{name}/ping.so
1624 %endif
1625
1626 %if %{with_postgresql}
1627 %files postgresql
1628 %{_datarootdir}/collectd/postgresql_default.conf
1629 %{_libdir}/%{name}/postgresql.so
1630 %endif
1631
1632 %if %{with_python}
1633 %files python
1634 %{_mandir}/man5/collectd-python*
1635 %{_libdir}/%{name}/python.so
1636 %endif
1637
1638 %if %{with_rrdtool}
1639 %files rrdtool
1640 %{_libdir}/%{name}/rrdtool.so
1641 %endif
1642
1643 %if %{with_sensors}
1644 %files sensors
1645 %{_libdir}/%{name}/sensors.so
1646 %endif
1647
1648 %if %{with_snmp}
1649 %files snmp
1650 %{_mandir}/man5/collectd-snmp.5*
1651 %{_libdir}/%{name}/snmp.so
1652 %endif
1653
1654 %if %{with_varnish}
1655 %files varnish
1656 %{_libdir}/%{name}/varnish.so
1657 %endif
1658
1659 %if %{with_write_http}
1660 %files write_http
1661 %{_libdir}/%{name}/write_http.so
1662 %endif
1663
1664 %files contrib
1665 %doc contrib/
1666
1667 %changelog
1668 * Sun Nov 18 2012 Ruben Kerkhof <ruben@tilaa.nl> 5.1.0-3
1669 - Follow Fedora Packaging Guidelines in java subpackage
1670
1671 * Sat Nov 17 2012 Ruben Kerkhof <ruben@tilaa.nl> 5.1.0-2
1672 - Move perl stuff to perl_vendorlib
1673 - Replace hardcoded paths with macros
1674 - Remove unneccesary Requires
1675 - Removed .a and .la files
1676 - Some other small cleanups
1677
1678 * Fri Nov 16 2012 Marc Fournier <marc.fournier@camptocamp.com> 5.1.0-1
1679 - New upstream version
1680 - Changes to support 5.1.0
1681 - Enabled all buildable plugins based on libraries available on EL6 + EPEL
1682 - All plugins requiring external libraries are now shipped in seperate
1683   packages.
1684 - No longer treat Java plugin as an exception, correctly set $JAVA_HOME during
1685   the build process + ensure build deps are installed.
1686 - Dropped per-plugin configuration files, as they tend to diverge from upstream
1687   defaults.
1688 - Moved perl stuff to /usr/share/perl5/
1689 - Don't alter Interval and ReadThreads by default, let the user change this
1690   himself.
1691 - Initscript improvements:
1692   * checks configuration before (re)starting, based on debian's initscript
1693   * use /etc/sysconfig instdead of /etc/default
1694   * include optional $ARGS in arguments passed to collectd.
1695 - Drop collection.cgi from main package, as it's been obsoleted by collection3
1696 - Moved contrib/ to its own package, to avoid cluttering the main package with
1697   non-essential stuff.
1698 - Replaced BuildPrereq by BuildRequires
1699
1700 * Tue Jan 03 2011 Monetate <jason.stelzer@monetate.com> 5.0.1
1701 - New upstream version
1702 - Changes to support 5.0.1
1703
1704 * Tue Jan 04 2010 Rackspace <stu.hood@rackspace.com> 4.9.0
1705 - New upstream version
1706 - Changes to support 4.9.0
1707 - Added support for Java/GenericJMX plugin
1708
1709 * Mon Mar 17 2008 RightScale <support@rightscale.com> 4.3.1
1710 - New upstream version
1711 - Changes to support 4.3.1
1712 - Added More Prereqs to support more plugins
1713 - Added support for perl plugin
1714
1715 * Mon Aug 06 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.6
1716 - New upstream version
1717
1718 * Wed Jul 25 2007 Kjell Randa <Kjell.Randa@broadpark.no> 4.0.5
1719 - New major releas
1720 - Changes to support 4.0.5
1721
1722 * Wed Jan 11 2007 Iain Lea <iain@bricbrac.de> 3.11.0-0
1723 - fixed spec file to build correctly on fedora core
1724 - added improved init.d script to work with chkconfig
1725 - added %%post and %%postun to call chkconfig automatically
1726
1727 * Sun Jul 09 2006 Florian octo Forster <octo@verplant.org> 3.10.0-1
1728 - New upstream version
1729
1730 * Tue Jun 25 2006 Florian octo Forster <octo@verplant.org> 3.9.4-1
1731 - New upstream version
1732
1733 * Tue Jun 01 2006 Florian octo Forster <octo@verplant.org> 3.9.3-1
1734 - New upstream version
1735
1736 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.9.2-1
1737 - New upstream version
1738
1739 * Tue May 09 2006 Florian octo Forster <octo@verplant.org> 3.8.5-1
1740 - New upstream version
1741
1742 * Fri Apr 21 2006 Florian octo Forster <octo@verplant.org> 3.9.1-1
1743 - New upstream version
1744
1745 * Fri Apr 14 2006 Florian octo Forster <octo@verplant.org> 3.9.0-1
1746 - New upstream version
1747 - Added the `apache' package.
1748
1749 * Thu Mar 14 2006 Florian octo Forster <octo@verplant.org> 3.8.2-1
1750 - New upstream version
1751
1752 * Thu Mar 13 2006 Florian octo Forster <octo@verplant.org> 3.8.1-1
1753 - New upstream version
1754
1755 * Thu Mar 09 2006 Florian octo Forster <octo@verplant.org> 3.8.0-1
1756 - New upstream version
1757
1758 * Sat Feb 18 2006 Florian octo Forster <octo@verplant.org> 3.7.2-1
1759 - Include `tape.so' so the build doesn't terminate because of missing files..
1760 - New upstream version
1761
1762 * Sat Feb 04 2006 Florian octo Forster <octo@verplant.org> 3.7.1-1
1763 - New upstream version
1764
1765 * Mon Jan 30 2006 Florian octo Forster <octo@verplant.org> 3.7.0-1
1766 - New upstream version
1767 - Removed the extra `hddtemp' package
1768
1769 * Tue Jan 24 2006 Florian octo Forster <octo@verplant.org> 3.6.2-1
1770 - New upstream version
1771
1772 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.1-1
1773 - New upstream version
1774
1775 * Fri Jan 20 2006 Florian octo Forster <octo@verplant.org> 3.6.0-1
1776 - New upstream version
1777 - Added config file, `collectd.conf(5)', `df.so'
1778 - Added package `collectd-mysql', dependency on `mysqlclient10 | mysql'
1779
1780 * Wed Dec 07 2005 Florian octo Forster <octo@verplant.org> 3.5.0-1
1781 - New upstream version
1782
1783 * Sat Nov 26 2005 Florian octo Forster <octo@verplant.org> 3.4.0-1
1784 - New upstream version
1785
1786 * Sat Nov 05 2005 Florian octo Forster <octo@verplant.org> 3.3.0-1
1787 - New upstream version
1788
1789 * Tue Oct 26 2005 Florian octo Forster <octo@verplant.org> 3.2.0-1
1790 - New upstream version
1791 - Added statement to remove the `*.la' files. This fixes a problem when
1792   `Unpackaged files terminate build' is in effect.
1793 - Added `processes.so*' to the main package
1794
1795 * Fri Oct 14 2005 Florian octo Forster <octo@verplant.org> 3.1.0-1
1796 - New upstream version
1797 - Added package `collectd-hddtemp'
1798
1799 * Fri Sep 30 2005 Florian octo Forster <octo@verplant.org> 3.0.0-1
1800 - New upstream version
1801 - Split the package into `collectd' and `collectd-sensors'
1802
1803 * Fri Sep 16 2005 Florian octo Forster <octo@verplant.org> 2.1.0-1
1804 - New upstream version
1805
1806 * Mon Sep 10 2005 Florian octo Forster <octo@verplant.org> 2.0.0-1
1807 - New upstream version
1808
1809 * Mon Aug 29 2005 Florian octo Forster <octo@verplant.org> 1.8.0-1
1810 - New upstream version
1811
1812 * Sun Aug 25 2005 Florian octo Forster <octo@verplant.org> 1.7.0-1
1813 - New upstream version
1814
1815 * Sun Aug 21 2005 Florian octo Forster <octo@verplant.org> 1.6.0-1
1816 - New upstream version
1817
1818 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5.1-1
1819 - New upstream version
1820
1821 * Sun Jul 17 2005 Florian octo Forster <octo@verplant.org> 1.5-1
1822 - New upstream version
1823
1824 * Mon Jul 11 2005 Florian octo Forster <octo@verplant.org> 1.4.2-1
1825 - New upstream version
1826
1827 * Sat Jul 09 2005 Florian octo Forster <octo@verplant.org> 1.4-1
1828 - Built on RedHat 7.3