]> git.pld-linux.org Git - packages/collectd.git/blame - collectd.spec
- rel.2 - ipvs module disabled
[packages/collectd.git] / collectd.spec
CommitLineData
373d486f 1# TODO:
373d486f 2# - lm_sensors subpackage
373d486f 3# - package contrib scripts as %doc
8bf13ddb
PG
4# - put every plugin into subpackages
5# - Current plugins status:
6# apache . . . . . . yes
7# apcups . . . . . . yes
95c10a4d 8# apple_sensors . . . no (obvious)
8bf13ddb
PG
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
87ba198e 23# ipmi . . . . . . . yes
95c10a4d 24# ipvs . . . . . . . no (ip_vs.h not found - llh to be fixed)
8bf13ddb 25# irq . . . . . . . . yes
95c10a4d 26# libvirt . . . . . . no (requires library)
8bf13ddb
PG
27# load . . . . . . . yes
28# logfile . . . . . . yes
29# mbmon . . . . . . . yes
30# memcached . . . . . yes
31# memory . . . . . . yes
87ba198e 32# multimeter . . . . no
8bf13ddb
PG
33# mysql . . . . . . . yes
34# netlink . . . . . . yes
35# network . . . . . . yes
36# nfs . . . . . . . . yes
37# nginx . . . . . . . yes
38# ntpd . . . . . . . yes
87ba198e 39# nut . . . . . . . . yes
95c10a4d 40# perl . . . . . . . no (needs libperl)
8bf13ddb
PG
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
95c10a4d 51# tape . . . . . . . no ?
8bf13ddb
PG
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
34fc103e
JB
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#
4b6e34c7 69#http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358637
70%ifarch %{x8664}
71%undefine with_iptables
72%undefine with_netlink
73%endif
7df111b4 74Summary: Collects system information in RRD files
322f1351 75Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD
373d486f 76Name: collectd
0b998ec1 77Version: 4.5.0
95c10a4d 78Release: 2
373d486f 79License: GPL v2
81857fc6 80Group: Daemons
f6984413 81Source0: http://collectd.org/files/%{name}-%{version}.tar.gz
0b998ec1 82# Source0-md5: f73dbadc8dca136b98c0f96567e0f78c
f6984413 83Source1: %{name}.conf
ec8f9a12 84Source2: %{name}.init
96376a8d 85Source3: %{name}-http.conf
f6984413 86URL: http://collectd.org/
e105712e 87BuildRequires: OpenIPMI-devel
373d486f
AF
88BuildRequires: autoconf
89BuildRequires: automake
762d0c28 90BuildRequires: curl-devel
1f0040e3 91BuildRequires: iptables-devel >= 1.4.1.1-4
0b998ec1 92BuildRequires: libesmtp-devel
e105712e 93BuildRequires: libnetlink-devel
0b998ec1 94BuildRequires: libnotify-devel
907cfb56 95BuildRequires: liboping-devel
762d0c28 96BuildRequires: libpcap-devel
8bf13ddb 97BuildRequires: libstatgrab-devel >= 0.12
373d486f 98BuildRequires: libtool
3a1b5393 99BuildRequires: lm_sensors-devel
762d0c28 100BuildRequires: mysql-devel
87ba198e 101BuildRequires: nut-devel
18e77dbc 102BuildRequires: perl-devel
c7024cdb 103BuildRequires: rpmbuild(macros) >= 1.268
762d0c28 104BuildRequires: rrdtool-devel
4b6e34c7 105BuildRequires: net-snmp-devel
8bf13ddb 106BuildRequires: xmms-devel
7df111b4 107Requires(post,preun): /sbin/chkconfig
c7024cdb 108Requires: rc-scripts
373d486f
AF
109BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
110
9259a6ab
PG
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
373d486f 117%description
7df111b4
JB
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
19cbcad3 127%description -l pl.UTF-8
c7024cdb
ER
128collectd to mały demon zbierający co 10 sekund informacje o systemie i
129zapisujący wyniki do pliku RRD.
373d486f 130
19cbcad3
JR
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
c7024cdb
ER
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.
373d486f 137
8bf13ddb
PG
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
18e77dbc 147%package apache
273ffc81
JB
148Summary: apache-plugin for collectd
149Summary(pl_PL.UTF-8): Wtyczka apache dla collectd
18e77dbc 150Group: Daemons
273ffc81 151Requires: %{name} = %{version}-%{release}
18e77dbc 152
153%description apache
154This plugin collectd data provided by Apache's `mod_status'.
155
156%description apache -l pl.UTF-8
273ffc81
JB
157Wtyczka collectd zbierająca informacje udostępniane przez moduł
158'mod_status' Apacha.
18e77dbc 159
133ab397 160%package collection
5fafedfc 161Summary: Web script for collectiond
162Summary(pl_PL.UTF-8): Web script for collectiond
163Group: Applications/WWW
164Requires: %{name} = %{version}-%{release}
165
133ab397 166%description collection
5fafedfc 167Web script for collectiond
168
8bf13ddb
PG
169%package dns
170Summary: dns-plugin for collectd
171Summary(pl_PL.UTF-8): Wtyczka dns dla collectd
172Group: Daemons
173Requires: %{name} = %{version}-%{release}
3a1b5393 174Requires: perl-rrdtool
ef79d9ea 175
8bf13ddb
PG
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
87ba198e 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
34fc103e
JB
197%description ipmi -l pl.UTF-8
198Wtyczka ipmi dla collectd.
199
18e77dbc 200%package mysql
273ffc81
JB
201Summary: mysql-plugin for collectd
202Summary(pl_PL.UTF-8): Moduł mysql dla collectd.
18e77dbc 203Group: Daemons
273ffc81 204Requires: %{name} = %{version}-%{release}
18e77dbc 205
206%description mysql
273ffc81 207MySQL querying plugin. This plugins provides data of issued commands,
18e77dbc 208called handlers and database traffic.
209
210%description mysql -l pl.UTF-8
273ffc81
JB
211Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
212poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
18e77dbc 213
8bf13ddb
PG
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
907cfb56
PG
223%package ping
224Summary: ping-plugin for collectd
225Summary(pl_PL.UTF-8): Wtyczka ping dla collectd
226Group: Daemons
227Requires: %{name} = %{version}-%{release}
228
229%description ping
230ping plugin for collectd.
231
4b6e34c7 232%package powerdns
233Summary: powerdns-plugin for collectd
234Summary(pl_PL.UTF-8): Wtyczka powerdns dla collectd
235Group: Daemons
236Requires: %{name} = %{version}-%{release}
237
238%description powerdns
239powerdns plugin for collectd.
240
8bf13ddb
PG
241%package rrdtool
242Summary: rrdtool-plugin for collectd
243Summary(pl_PL.UTF-8): Wtyczka rrdtool dla collectd
244Group: Daemons
245Requires: %{name} = %{version}-%{release}
246Requires: rrdtool
247
248%description rrdtool
249RRDTOOL plugin for collectd.
250
251%package sensors
252Summary: sensors-plugin for collectd
253Summary(pl_PL.UTF-8): Wtyczka sensors dla collectd
254Group: Daemons
255Requires: %{name} = %{version}-%{release}
256
257%description sensors
258This plugin collectd data provided by hardware sensors.
259
260%package snmp
261Summary: snmp-plugin for collectd
262Summary(pl_PL.UTF-8): Wtyczka snmp dla collectd
263Group: Daemons
264Requires: %{name} = %{version}-%{release}
265
266%description snmp
267snmp plugin for collectd.
268
269%package uuid
270Summary: uuid-plugin for collectd
271Summary(pl_PL.UTF-8): Wtyczka uuid dla collectd
272Group: Daemons
273Requires: %{name} = %{version}-%{release}
274
275%description uuid
276This plugin collectd UUID data.
277
278%package xmms
279Summary: xmms-plugin for collectd
280Summary(pl_PL.UTF-8): Wtyczka xmms dla collectd
281Group: Daemons
282Requires: %{name} = %{version}-%{release}
283Requires: xmms-libs
284
285%description xmms
286This plugin collectd data provided by XMMS.
287
373d486f
AF
288%prep
289%setup -q
290
526f2b1b 291cat >> collection.conf <<'EOF'
292datadir: "/var/lib/collectd/"
293libdir: "/usr/lib/collectd/"
294EOF
295
373d486f
AF
296%build
297%{__libtoolize}
298%{__aclocal}
299%{__autoconf}
300%{__autoheader}
301%{__automake}
4b6e34c7 302
373d486f
AF
303%configure \
304 --with-libstatgrab=/usr \
305 --with-lm-sensors=/usr \
4b6e34c7 306 --with-libmysql=/usr \
34fc103e
JB
307 --%{?with_ipmi:en}%{!?with_ipmi:dis}able-ipmi \
308 --%{?with_multimeter:en}%{!?with_multimeter:dis}able-multimeter \
309 --%{?with_dns:en}%{!?with_dns:dis}able-dns \
310 --%{?with_iptables:en}%{!?with_iptables:dis}able-iptables \
95c10a4d
PG
311 --%{?with_netlink:en}%{!?with_netlink:dis}able-netlink \
312 --disable-ipvs
4b6e34c7 313
314
87ba198e 315%{__make} LDFLAGS="%{rpmldflags} -lstatgrab" \
316 BUILD_WITH_OPENIPMI_CFLAGS="-I/usr/include" \
317 BUILD_WITH_OPENIPMI_LIBS="-L/usr/lib64 -lOpenIPMIutils -lOpenIPMIpthread"
373d486f
AF
318
319%install
320rm -rf $RPM_BUILD_ROOT
96376a8d
PG
321install -d $RPM_BUILD_ROOT{%{_var}/{log/,lib/%{name}},/etc/rc.d/init.d/} \
322 $RPM_BUILD_ROOT{%{_appdir}/cgi-bin,%{_webappdir},%{_pkglibdir}}
373d486f
AF
323
324%{__make} install \
325 DESTDIR=$RPM_BUILD_ROOT
81857fc6 326
e105712e 327#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
328touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
329install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
ff0d0ea0 330install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
373d486f 331
96376a8d
PG
332# Web frontend:
333install contrib/collection.conf $RPM_BUILD_ROOT%{_webappdir}
334install contrib/collection.cgi $RPM_BUILD_ROOT%{_appdir}/cgi-bin
335install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/apache.conf
336install %{SOURCE3} $RPM_BUILD_ROOT%{_webappdir}/httpd.conf
337
338# Cleanups:
339rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
340
373d486f
AF
341%clean
342rm -rf $RPM_BUILD_ROOT
343
81857fc6 344%post
373d486f
AF
345/sbin/chkconfig --add %{name}
346%service %{name} restart
347
81857fc6 348%preun
373d486f
AF
349if [ "$1" = "0" ]; then
350 %service -q %{name} stop
351 /sbin/chkconfig --del %{name}
352fi
353
96376a8d
PG
354%triggerin collection -- apache1 < 1.3.37-3, apache1-base
355%webapp_register apache %{_webapp}
356
357%triggerun collection -- apache1 < 1.3.37-3, apache1-base
358%webapp_unregister apache %{_webapp}
359
360%triggerin collection -- apache < 2.2.0, apache-base
361%webapp_register httpd %{_webapp}
362
363%triggerun collection -- apache < 2.2.0, apache-base
364%webapp_unregister httpd %{_webapp}
365
373d486f
AF
366%files
367%defattr(644,root,root,755)
e105712e 368%doc AUTHORS ChangeLog README TODO contrib
373d486f
AF
369
370%attr(755,root,root) %{_sbindir}/collectd
e105712e 371%attr(755,root,root) %{_sbindir}/collectdmon
18e77dbc 372%attr(755,root,root) %{_bindir}/collectd-nagios
373d486f 373%dir %{_libdir}/%{name}
c1bbd93e 374%attr(755,root,root) %{_libdir}/%{name}/apcups.so
18e77dbc 375#%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
373d486f 376%attr(755,root,root) %{_libdir}/%{name}/battery.so
373d486f 377%attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
c1bbd93e 378%attr(755,root,root) %{_libdir}/%{name}/cpu.so
18e77dbc 379%attr(755,root,root) %{_libdir}/%{name}/csv.so
373d486f
AF
380%attr(755,root,root) %{_libdir}/%{name}/df.so
381%attr(755,root,root) %{_libdir}/%{name}/disk.so
762d0c28 382%attr(755,root,root) %{_libdir}/%{name}/email.so
18e77dbc 383%attr(755,root,root) %{_libdir}/%{name}/entropy.so
384%attr(755,root,root) %{_libdir}/%{name}/exec.so
0b998ec1 385%attr(755,root,root) %{_libdir}/%{name}/filecount.so
18e77dbc 386%attr(755,root,root) %{_libdir}/%{name}/interface.so
4b6e34c7 387%if %{with iptables}
e105712e 388%attr(755,root,root) %{_libdir}/%{name}/iptables.so
4b6e34c7 389%endif
95c10a4d
PG
390# Disabled - requires fixed libc-headers or whole kernel source.
391# It was marked as disabled in status message on top.
392#%attr(755,root,root) %{_libdir}/%{name}/ipvs.so
18e77dbc 393%attr(755,root,root) %{_libdir}/%{name}/irq.so
373d486f 394%attr(755,root,root) %{_libdir}/%{name}/load.so
18e77dbc 395%attr(755,root,root) %{_libdir}/%{name}/logfile.so
762d0c28 396%attr(755,root,root) %{_libdir}/%{name}/mbmon.so
0b998ec1 397%attr(755,root,root) %{_libdir}/%{name}/notify_desktop.so
398%attr(755,root,root) %{_libdir}/%{name}/notify_email.so
e6f53b24 399%attr(755,root,root) %{_libdir}/%{name}/memcached.so
373d486f 400%attr(755,root,root) %{_libdir}/%{name}/memory.so
87ba198e 401%if %{with multimeter}
762d0c28 402%attr(755,root,root) %{_libdir}/%{name}/multimeter.so
87ba198e 403%endif
4b6e34c7 404%if %{with netlink}
e105712e 405%attr(755,root,root) %{_libdir}/%{name}/netlink.so
4b6e34c7 406%endif
18e77dbc 407%attr(755,root,root) %{_libdir}/%{name}/network.so
87ba198e 408%attr(755,root,root) %{_libdir}/%{name}/nut.so
373d486f 409%attr(755,root,root) %{_libdir}/%{name}/nfs.so
c1bbd93e 410%attr(755,root,root) %{_libdir}/%{name}/ntpd.so
e6f53b24 411#%attr(755,root,root) %{_libdir}/%{name}/perl.so
0b998ec1 412%attr(755,root,root) %{_libdir}/%{name}/postgresql.so
373d486f 413%attr(755,root,root) %{_libdir}/%{name}/processes.so
373d486f
AF
414%attr(755,root,root) %{_libdir}/%{name}/serial.so
415%attr(755,root,root) %{_libdir}/%{name}/swap.so
e6f53b24 416%attr(755,root,root) %{_libdir}/%{name}/syslog.so
e105712e 417%attr(755,root,root) %{_libdir}/%{name}/tail.so
18e77dbc 418#%attr(755,root,root) %{_libdir}/%{name}/tape.so
e105712e 419%attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
e6f53b24 420%attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
0b998ec1 421%attr(755,root,root) %{_libdir}/%{name}/thermal.so
18e77dbc 422#%attr(755,root,root) %{_libdir}/%{name}/traffic.so
18e77dbc 423%attr(755,root,root) %{_libdir}/%{name}/unixsock.so
e6f53b24 424%attr(755,root,root) %{_libdir}/%{name}/users.so
e105712e 425%attr(755,root,root) %{_libdir}/%{name}/vmem.so
c1bbd93e 426%attr(755,root,root) %{_libdir}/%{name}/vserver.so
f6984413 427%attr(755,root,root) %{_libdir}/%{name}/wireless.so
e6f53b24 428%{_libdir}/%{name}/types.db
373d486f
AF
429
430%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
431
ff0d0ea0 432%attr(754,root,root) /etc/rc.d/init.d/%{name}
373d486f
AF
433
434%{_mandir}/man1/collectd.1*
18e77dbc 435%{_mandir}/man1/collectd-nagios.1*
373d486f 436%{_mandir}/man5/collectd.conf.5*
18e77dbc 437%{_mandir}/man5/collectd-email.5*
438%{_mandir}/man5/collectd-exec.5*
439%{_mandir}/man5/collectd-perl.5*
440%{_mandir}/man5/collectd-snmp.5*
441%{_mandir}/man5/collectd-unixsock.5*
e105712e 442%{_mandir}/man1/collectdmon.1*
443%{_mandir}/man5/types.db.5*
444%{_var}/log/collectd.log
445%dir %{_var}/lib/%{name}
446
8bf13ddb
PG
447########## PLUGINS:
448%files ascent
449%defattr(644,root,root,755)
450%attr(755,root,root) %{_libdir}/%{name}/ascent.so
18e77dbc 451
452%files apache
453%defattr(644,root,root,755)
454%attr(755,root,root) %{_libdir}/%{name}/apache.so
455
133ab397 456%files collection
5fafedfc 457%defattr(644,root,root,755)
96376a8d 458%config(noreplace) %verify(not md5 mtime size) %{_webappdir}/collection.conf
4b6e34c7 459%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/apache.conf
460%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webappdir}/httpd.conf
96376a8d 461%attr(755,root,root) %{_appdir}/cgi-bin/collection.cgi
5fafedfc 462
8bf13ddb
PG
463%files dns
464%defattr(644,root,root,755)
465%attr(755,root,root) %{_libdir}/%{name}/dns.so
466
467%files hddtemp
468%defattr(644,root,root,755)
469%attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
470
87ba198e 471%if %{with ipmi}
472%files ipmi
473%defattr(644,root,root,755)
474%attr(755,root,root) %{_libdir}/%{name}/ipmi.so
475%endif
476
18e77dbc 477%files mysql
478%defattr(644,root,root,755)
479%attr(755,root,root) %{_libdir}/%{name}/mysql.so
8bf13ddb
PG
480
481%files nginx
482%defattr(644,root,root,755)
483%attr(755,root,root) %{_libdir}/%{name}/nginx.so
484
907cfb56
PG
485%files ping
486%defattr(644,root,root,755)
487%attr(755,root,root) %{_libdir}/%{name}/ping.so
488
4b6e34c7 489%files powerdns
490%defattr(644,root,root,755)
491%attr(755,root,root) %{_libdir}/%{name}/powerdns.so
492
8bf13ddb
PG
493%files rrdtool
494%defattr(644,root,root,755)
495%attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
496
497%files sensors
498%defattr(644,root,root,755)
499%attr(755,root,root) %{_libdir}/%{name}/sensors.so
500
501%files snmp
502%defattr(644,root,root,755)
503%attr(755,root,root) %{_libdir}/%{name}/snmp.so
504
505%files uuid
506%defattr(644,root,root,755)
507%attr(755,root,root) %{_libdir}/%{name}/uuid.so
508
509%files xmms
510%defattr(644,root,root,755)
511%attr(755,root,root) %{_libdir}/%{name}/xmms.so
This page took 0.105976 seconds and 4 git commands to generate.