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