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