]> git.pld-linux.org Git - packages/collectd.git/blame_incremental - collectd.spec
- rel.5 - notify_email, nut and postgresql modules separated
[packages/collectd.git] / collectd.spec
... / ...
CommitLineData
1# TODO:
2# - lm_sensors subpackage
3# - package contrib scripts as %doc
4# - put every plugin into subpackages
5# - Current plugins status:
6# apache . . . . . . yes
7# apcups . . . . . . yes
8# apple_sensors . . . no (obvious)
9# ascent . . . . . . yes
10# battery . . . . . . yes
11# cpu . . . . . . . . yes
12# cpufreq . . . . . . yes
13# csv . . . . . . . . yes
14# df . . . . . . . . yes
15# disk . . . . . . . yes
16# dns . . . . . . . . yes
17# email . . . . . . . yes
18# entropy . . . . . . yes
19# exec . . . . . . . yes
20# hddtemp . . . . . . yes
21# interface . . . . . yes
22# iptables . . . . . yes
23# ipmi . . . . . . . yes
24# ipvs . . . . . . . no (ip_vs.h not found - llh to be fixed)
25# irq . . . . . . . . yes
26# libvirt . . . . . . no (requires library)
27# load . . . . . . . yes
28# logfile . . . . . . yes
29# mbmon . . . . . . . yes
30# memcached . . . . . yes
31# memory . . . . . . yes
32# multimeter . . . . no
33# mysql . . . . . . . yes
34# netlink . . . . . . yes
35# network . . . . . . yes
36# nfs . . . . . . . . yes
37# nginx . . . . . . . yes
38# ntpd . . . . . . . yes
39# nut . . . . . . . . yes
40# perl . . . . . . . no (needs libperl)
41# ping . . . . . . . yes
42# powerdns . . . . . yes
43# processes . . . . . yes
44# rrdtool . . . . . . yes
45# sensors . . . . . . yes
46# serial . . . . . . yes
47# snmp . . . . . . . yes
48# swap . . . . . . . yes
49# syslog . . . . . . yes
50# tail . . . . . . . yes
51# tape . . . . . . . no ?
52# tcpconns . . . . . yes
53# teamspeak2 . . . . yes
54# unixsock . . . . . yes
55# users . . . . . . . yes
56# uuid . . . . . . . yes
57# vmem . . . . . . . yes
58# vserver . . . . . . yes
59# wireless . . . . . yes
60# xmms . . . . . . . yes
61#
62# Conditional build:
63%bcond_without dns # ???
64%bcond_without ipmi # ipmi plugin package
65%bcond_without iptables # iptables plugin
66%bcond_with multimeter # multimeter plugin
67%bcond_without netlink # netlink plugin
68#
69#http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
70%ifarch %{x8664}
71%undefine with_iptables
72%undefine with_netlink
73%endif
74Summary: Collects system information in RRD files
75Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
76Name: collectd
77Version: 4.5.0
78Release: 5
79License: GPL v2
80Group: Daemons
81Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
82# Source0-md5: f73dbadc8dca136b98c0f96567e0f78c
83Source1: %{name}.conf
84Source2: %{name}.init
85Source3: %{name}-http.conf
86URL: http://collectd.org/
87BuildRequires: OpenIPMI-devel
88BuildRequires: autoconf
89BuildRequires: automake
90BuildRequires: curl-devel
91BuildRequires: iptables-devel >= 1.4.1.1-4
92BuildRequires: libesmtp-devel
93BuildRequires: libnetlink-devel
94BuildRequires: libnotify-devel
95BuildRequires: liboping-devel
96BuildRequires: libpcap-devel
97BuildRequires: libstatgrab-devel >= 0.12
98BuildRequires: libtool
99BuildRequires: lm_sensors-devel
100BuildRequires: mysql-devel
101BuildRequires: nut-devel
102BuildRequires: perl-devel
103BuildRequires: rpmbuild(macros) >= 1.268
104BuildRequires: rrdtool-devel
105BuildRequires: net-snmp-devel
106BuildRequires: xmms-devel
107Requires(post,preun): /sbin/chkconfig
108Requires: rc-scripts
109BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
110
111%define _pkglibdir /var/lib/%{name}
112%define _webapps /etc/webapps
113%define _webapp %{name}
114%define _webappdir %{_webapps}/%{_webapp}
115%define _appdir %{_datadir}/%{_webapp}
116
117%description
118collectd is a small daemon which collects system information every 10
119seconds and writes the results in an RRD-file.
120
121In contrast to most similar software, collectd is not a script but
122written in plain C for performance and portability. As a daemon it
123stays in memory, so there is no need to start up a heavy interpreter
124every time new values should be logged. This allows collectd to have a
12510 second resolution while being nice to the system.
126
127%description -l pl.UTF-8
128collectd to mały demon zbierający co 10 sekund informacje o systemie i
129zapisujący wyniki do pliku RRD.
130
131W odróżnieniu od innych podobnych programów collectd nie jest
132skryptem, lecz jest napisany w czystym C z myślą o wydajności i
133przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby
134urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być
135zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10
136sekund i nie obciążać zbytnio systemu.
137
138%package ascent
139Summary: ascent-plugin for collectd
140Summary(pl_PL.UTF-8): Wtyczka ascent dla collectd
141Group: Daemons
142Requires: %{name} = %{version}-%{release}
143
144%description ascent
145ascent plugin for collectd.
146
147%package apache
148Summary: apache-plugin for collectd
149Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
150Group: Daemons
151Requires: %{name} = %{version}-%{release}
152
153%description apache
154This plugin collectd data provided by Apache's `mod_status'.
155
156%description apache -l pl.UTF-8
157Wtyczka collectd zbierająca informacje udostępniane przez moduł
158'mod_status' Apacha.
159
160%package collection
161Summary: Web script for collectiond
162Summary(pl_PL.UTF-8): Web script for collectiond
163Group: Applications/WWW
164Requires: %{name} = %{version}-%{release}
165
166%description collection
167Web script for collectiond
168
169%package dns
170Summary: dns-plugin for collectd
171Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
172Group: Daemons
173Requires: %{name} = %{version}-%{release}
174Requires: perl-rrdtool
175
176%description dns
177dns plugin for collectd.
178
179%package hddtemp
180Summary: hddtemp-plugin for collectd
181Summary(pl_PL.UTF-8): Wtyczka hddtemp dla collectd
182Group: Daemons
183Requires: %{name} = %{version}-%{release}
184
185%description hddtemp
186hddtemp plugin for collectd.
187
188%package ipmi
189Summary: ipmi-plugin for collectd
190Summary(pl_PL.UTF-8): Wtyczka ipmi dla collectd
191Group: Daemons
192Requires: %{name} = %{version}-%{release}
193
194%description ipmi
195ipmi plugin for collectd.
196
197%description ipmi -l pl.UTF-8
198Wtyczka ipmi dla collectd.
199
200%package mysql
201Summary: mysql-plugin for collectd
202Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
203Group: Daemons
204Requires: %{name} = %{version}-%{release}
205
206%description mysql
207MySQL querying plugin. This plugins provides data of issued commands,
208called handlers and database traffic.
209
210%description mysql -l pl.UTF-8
211Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
212poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
213
214%package nginx
215Summary: nginx-plugin for collectd
216Summary(pl_PL.UTF-8): Wtyczka nginx dla collectd
217Group: Daemons
218Requires: %{name} = %{version}-%{release}
219
220%description nginx
221nginx plugin for collectd.
222
223%package notify_desktop
224Summary: notify_desktop for collectd
225Summary(pl_PL.UTF-8): Wtyczka notify_desktop dla collectd
226Group: Daemons
227Requires: %{name} = %{version}-%{release}
228
229%description notify_desktop
230notify_desktop plugin for collectd.
231
232%package notify_email
233Summary: notify_email for collectd
234Summary(pl_PL.UTF-8): Wtyczka notify_email dla collectd
235Group: Daemons
236Requires: %{name} = %{version}-%{release}
237
238%description notify_email
239notify_email plugin for collectd.
240
241%package nut
242Summary: nut-plugin for collectd
243Summary(pl_PL.UTF-8): Wtyczka nut dla collectd
244Group: Daemons
245Requires: %{name} = %{version}-%{release}
246
247%description nut
248nut plugin for collectd.
249
250%package ping
251Summary: ping-plugin for collectd
252Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
253Group: Daemons
254Requires: %{name} = %{version}-%{release}
255
256%description ping
257ping plugin for collectd.
258
259%package postgresql
260Summary: mysql-plugin for collectd
261Summary(pl_PL.UTF-8): Moduł postgresql dla collectd.
262Group: Daemons
263Requires: %{name} = %{version}-%{release}
264
265%description postgresql
266PostgreSQL querying plugin. This plugins provides data of issued commands,
267called handlers and database traffic.
268
269%description postgresql -l pl.UTF-8
270Moduł odpytujący PostgreSQL. Wtyczka udostępnia dane o wydawanych
271poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
272
273%package powerdns
274Summary: powerdns-plugin for collectd
275Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
276Group: Daemons
277Requires: %{name} = %{version}-%{release}
278
279%description powerdns
280powerdns plugin for collectd.
281
282%package rrdtool
283Summary: rrdtool-plugin for collectd
284Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
285Group: Daemons
286Requires: %{name} = %{version}-%{release}
287Requires: rrdtool
288
289%description rrdtool
290RRDTOOL plugin for collectd.
291
292%package sensors
293Summary: sensors-plugin for collectd
294Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
295Group: Daemons
296Requires: %{name} = %{version}-%{release}
297
298%description sensors
299This plugin collectd data provided by hardware sensors.
300
301%package snmp
302Summary: snmp-plugin for collectd
303Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
304Group: Daemons
305Requires: %{name} = %{version}-%{release}
306
307%description snmp
308snmp plugin for collectd.
309
310%package uuid
311Summary: uuid-plugin for collectd
312Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
313Group: Daemons
314Requires: %{name} = %{version}-%{release}
315
316%description uuid
317This plugin collectd UUID data.
318
319%package xmms
320Summary: xmms-plugin for collectd
321Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
322Group: Daemons
323Requires: %{name} = %{version}-%{release}
324Requires: xmms-libs
325
326%description xmms
327This plugin collectd data provided by XMMS.
328
329%prep
330%setup -q
331
332cat >> collection.conf <<'EOF'
333datadir: "/var/lib/collectd/"
334libdir: "/usr/lib/collectd/"
335EOF
336
337%build
338%{__libtoolize}
339%{__aclocal}
340%{__autoconf}
341%{__autoheader}
342%{__automake}
343
344%configure \
345 --with-libstatgrab=/usr \
346 --with-lm-sensors=/usr \
347 --with-libmysql=/usr \
348 --%{?with_ipmi:en}%{!?with_ipmi:dis}able-ipmi \
349 --%{?with_multimeter:en}%{!?with_multimeter:dis}able-multimeter \
350 --%{?with_dns:en}%{!?with_dns:dis}able-dns \
351 --%{?with_iptables:en}%{!?with_iptables:dis}able-iptables \
352 --%{?with_netlink:en}%{!?with_netlink:dis}able-netlink \
353 --disable-ipvs
354
355
356%{__make} LDFLAGS="%{rpmldflags} -lstatgrab" \
357 BUILD_WITH_OPENIPMI_CFLAGS="-I/usr/include" \
358 BUILD_WITH_OPENIPMI_LIBS="-L/usr/lib64 -lOpenIPMIutils -lOpenIPMIpthread"
359
360%install
361rm -rf $RPM_BUILD_ROOT
362install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
363 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
364
365%{__make} install \
366 DESTDIR=$RPM_BUILD_ROOT
367
368#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
369touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
370install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
371install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
372
373# Web frontend:
374install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
375install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
376install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
377install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
378
379# Cleanups:
380rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
381
382%clean
383rm -rf $RPM_BUILD_ROOT
384
385%post
386/sbin/chkconfig --add %{name}
387%service %{name} restart
388
389%preun
390if [ "$1" = "0" ]; then
391 %service -q %{name} stop
392 /sbin/chkconfig --del %{name}
393fi
394
395%triggerin collection -- apache1 < 1.3.37-3, apache1-base
396%webapp_register apache %{_webapp}
397
398%triggerun collection -- apache1 < 1.3.37-3, apache1-base
399%webapp_unregister apache %{_webapp}
400
401%triggerin collection -- apache < 2.2.0, apache-base
402%webapp_register httpd %{_webapp}
403
404%triggerun collection -- apache < 2.2.0, apache-base
405%webapp_unregister httpd %{_webapp}
406
407%files
408%defattr(644,root,root,755)
409%doc AUTHORS ChangeLog README TODO contrib
410
411%attr(755,root,root) %{_sbindir}/collectd
412%attr(755,root,root) %{_sbindir}/collectdmon
413%attr(755,root,root) %{_bindir}/collectd-nagios
414%dir %{_libdir}/%{name}
415%attr(755,root,root) %{_libdir}/%{name}/apcups.so
416#%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
417%attr(755,root,root) %{_libdir}/%{name}/battery.so
418%attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
419%attr(755,root,root) %{_libdir}/%{name}/cpu.so
420%attr(755,root,root) %{_libdir}/%{name}/csv.so
421%attr(755,root,root) %{_libdir}/%{name}/df.so
422%attr(755,root,root) %{_libdir}/%{name}/disk.so
423%attr(755,root,root) %{_libdir}/%{name}/email.so
424%attr(755,root,root) %{_libdir}/%{name}/entropy.so
425%attr(755,root,root) %{_libdir}/%{name}/exec.so
426%attr(755,root,root) %{_libdir}/%{name}/filecount.so
427%attr(755,root,root) %{_libdir}/%{name}/interface.so
428%if %{with iptables}
429%attr(755,root,root) %{_libdir}/%{name}/iptables.so
430%endif
431# Disabled - requires fixed libc-headers or whole kernel source.
432# It was marked as disabled in status message on top.
433#%attr(755,root,root) %{_libdir}/%{name}/ipvs.so
434%attr(755,root,root) %{_libdir}/%{name}/irq.so
435%attr(755,root,root) %{_libdir}/%{name}/load.so
436%attr(755,root,root) %{_libdir}/%{name}/logfile.so
437%attr(755,root,root) %{_libdir}/%{name}/mbmon.so
438%attr(755,root,root) %{_libdir}/%{name}/memcached.so
439%attr(755,root,root) %{_libdir}/%{name}/memory.so
440%if %{with multimeter}
441%attr(755,root,root) %{_libdir}/%{name}/multimeter.so
442%endif
443%if %{with netlink}
444%attr(755,root,root) %{_libdir}/%{name}/netlink.so
445%endif
446%attr(755,root,root) %{_libdir}/%{name}/network.so
447%attr(755,root,root) %{_libdir}/%{name}/nfs.so
448%attr(755,root,root) %{_libdir}/%{name}/ntpd.so
449#%attr(755,root,root) %{_libdir}/%{name}/perl.so
450%attr(755,root,root) %{_libdir}/%{name}/processes.so
451%attr(755,root,root) %{_libdir}/%{name}/serial.so
452%attr(755,root,root) %{_libdir}/%{name}/swap.so
453%attr(755,root,root) %{_libdir}/%{name}/syslog.so
454%attr(755,root,root) %{_libdir}/%{name}/tail.so
455#%attr(755,root,root) %{_libdir}/%{name}/tape.so
456%attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
457%attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
458%attr(755,root,root) %{_libdir}/%{name}/thermal.so
459#%attr(755,root,root) %{_libdir}/%{name}/traffic.so
460%attr(755,root,root) %{_libdir}/%{name}/unixsock.so
461%attr(755,root,root) %{_libdir}/%{name}/users.so
462%attr(755,root,root) %{_libdir}/%{name}/vmem.so
463%attr(755,root,root) %{_libdir}/%{name}/vserver.so
464%attr(755,root,root) %{_libdir}/%{name}/wireless.so
465%{_libdir}/%{name}/types.db
466
467%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
468
469%attr(754,root,root) /etc/rc.d/init.d/%{name}
470
471%{_mandir}/man1/collectd.1*
472%{_mandir}/man1/collectd-nagios.1*
473%{_mandir}/man5/collectd.conf.5*
474%{_mandir}/man5/collectd-email.5*
475%{_mandir}/man5/collectd-exec.5*
476%{_mandir}/man5/collectd-perl.5*
477%{_mandir}/man5/collectd-snmp.5*
478%{_mandir}/man5/collectd-unixsock.5*
479%{_mandir}/man1/collectdmon.1*
480%{_mandir}/man5/types.db.5*
481%{_var}/log/collectd.log
482%dir %{_var}/lib/%{name}
483
484########## PLUGINS:
485%files ascent
486%defattr(644,root,root,755)
487%attr(755,root,root) %{_libdir}/%{name}/ascent.so
488
489%files apache
490%defattr(644,root,root,755)
491%attr(755,root,root) %{_libdir}/%{name}/apache.so
492
493%files collection
494%defattr(644,root,root,755)
495%dir %{_webappdir}
496%config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
497%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
498%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
499%dir %{_appdir}
500%dir %{_appdir}/cgi-bin
501%attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
502
503%files dns
504%defattr(644,root,root,755)
505%attr(755,root,root) %{_libdir}/%{name}/dns.so
506
507%files hddtemp
508%defattr(644,root,root,755)
509%attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
510
511%if %{with ipmi}
512%files ipmi
513%defattr(644,root,root,755)
514%attr(755,root,root) %{_libdir}/%{name}/ipmi.so
515%endif
516
517%files mysql
518%defattr(644,root,root,755)
519%attr(755,root,root) %{_libdir}/%{name}/mysql.so
520
521%files nginx
522%defattr(644,root,root,755)
523%attr(755,root,root) %{_libdir}/%{name}/nginx.so
524
525%files notify_desktop
526%defattr(644,root,root,755)
527%attr(755,root,root) %{_libdir}/%{name}/notify_desktop.so
528
529%files notify_email
530%defattr(644,root,root,755)
531%attr(755,root,root) %{_libdir}/%{name}/notify_email.so
532
533%files nut
534%defattr(644,root,root,755)
535%attr(755,root,root) %{_libdir}/%{name}/nut.so
536
537%files ping
538%defattr(644,root,root,755)
539%attr(755,root,root) %{_libdir}/%{name}/ping.so
540
541%files postgresql
542%defattr(644,root,root,755)
543%attr(755,root,root) %{_libdir}/%{name}/postgresql.so
544
545%files powerdns
546%defattr(644,root,root,755)
547%attr(755,root,root) %{_libdir}/%{name}/powerdns.so
548
549%files rrdtool
550%defattr(644,root,root,755)
551%attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
552
553%files sensors
554%defattr(644,root,root,755)
555%attr(755,root,root) %{_libdir}/%{name}/sensors.so
556
557%files snmp
558%defattr(644,root,root,755)
559%attr(755,root,root) %{_libdir}/%{name}/snmp.so
560
561%files uuid
562%defattr(644,root,root,755)
563%attr(755,root,root) %{_libdir}/%{name}/uuid.so
564
565%files xmms
566%defattr(644,root,root,755)
567%attr(755,root,root) %{_libdir}/%{name}/xmms.so
This page took 0.033633 seconds and 4 git commands to generate.