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