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