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