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