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