]> git.pld-linux.org Git - packages/collectd.git/blob - collectd.spec
- revert: have look at template-webapp.spec how to do it with single package with...
[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
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
144 %description collection
145 Web script for collectiond
146
147 %package dns
148 Summary:        dns-plugin for collectd
149 Summary(pl_PL.UTF-8):   Wtyczka dns dla collectd
150 Group:          Daemons
151 Requires:       %{name} = %{version}-%{release}
152 Requires:       perl-rrdtool
153
154 %description dns
155 dns plugin for collectd.
156
157 %package hddtemp
158 Summary:        hddtemp-plugin for collectd
159 Summary(pl_PL.UTF-8):   Wtyczka hddtemp dla collectd
160 Group:          Daemons
161 Requires:       %{name} = %{version}-%{release}
162
163 %description hddtemp
164 hddtemp plugin for collectd.
165
166 %package mysql
167 Summary:        mysql-plugin for collectd
168 Summary(pl_PL.UTF-8):   Moduł mysql dla collectd.
169 Group:          Daemons
170 Requires:       %{name} = %{version}-%{release}
171
172 %description mysql
173 MySQL querying plugin. This plugins provides data of issued commands,
174 called handlers and database traffic.
175
176 %description mysql -l pl.UTF-8
177 Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych
178 poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym.
179
180 %package nginx
181 Summary:        nginx-plugin for collectd
182 Summary(pl_PL.UTF-8):   Wtyczka nginx dla collectd
183 Group:          Daemons
184 Requires:       %{name} = %{version}-%{release}
185
186 %description nginx
187 nginx plugin for collectd.
188
189 %package ping
190 Summary:        ping-plugin for collectd
191 Summary(pl_PL.UTF-8):   Wtyczka ping dla collectd
192 Group:          Daemons
193 Requires:       %{name} = %{version}-%{release}
194
195 %description ping
196 ping plugin for collectd.
197
198 %package rrdtool
199 Summary:        rrdtool-plugin for collectd
200 Summary(pl_PL.UTF-8):   Wtyczka rrdtool dla collectd
201 Group:          Daemons
202 Requires:       %{name} = %{version}-%{release}
203 Requires:       rrdtool
204
205 %description rrdtool
206 RRDTOOL plugin for collectd.
207
208 %package sensors
209 Summary:        sensors-plugin for collectd
210 Summary(pl_PL.UTF-8):   Wtyczka sensors dla collectd
211 Group:          Daemons
212 Requires:       %{name} = %{version}-%{release}
213
214 %description sensors
215 This plugin collectd data provided by hardware sensors.
216
217 %package snmp
218 Summary:        snmp-plugin for collectd
219 Summary(pl_PL.UTF-8):   Wtyczka snmp dla collectd
220 Group:          Daemons
221 Requires:       %{name} = %{version}-%{release}
222
223 %description snmp
224 snmp plugin for collectd.
225
226 %package uuid
227 Summary:        uuid-plugin for collectd
228 Summary(pl_PL.UTF-8):   Wtyczka uuid dla collectd
229 Group:          Daemons
230 Requires:       %{name} = %{version}-%{release}
231
232 %description uuid
233 This plugin collectd UUID data.
234
235 %package xmms
236 Summary:        xmms-plugin for collectd
237 Summary(pl_PL.UTF-8):   Wtyczka xmms dla collectd
238 Group:          Daemons
239 Requires:       %{name} = %{version}-%{release}
240 Requires:       xmms-libs
241
242 %description xmms
243 This plugin collectd data provided by XMMS.
244
245 %prep
246 %setup -q
247
248 cat >> collection.conf <<'EOF'
249 datadir: "/var/lib/collectd/"
250 libdir: "/usr/lib/collectd/"
251 EOF
252
253 %build
254 %{__libtoolize}
255 %{__aclocal}
256 %{__autoconf}
257 %{__autoheader}
258 %{__automake}
259 %configure \
260         --with-libstatgrab=/usr \
261         --with-lm-sensors=/usr \
262         --with-libmysql=/usr
263 %{__make} LDFLAGS="%{rpmldflags} -lstatgrab"
264
265 %install
266 rm -rf $RPM_BUILD_ROOT
267
268 %{__make} install \
269         DESTDIR=$RPM_BUILD_ROOT
270
271 install -d $RPM_BUILD_ROOT%{_var}/{log/,lib/%{name}}
272 install -d $RPM_BUILD_ROOT/home/services/httpd/cgi-bin
273 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
274 #install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
275 touch $RPM_BUILD_ROOT%{_var}/log/collectd.log
276 install src/collectd.conf $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf
277 install contrib/collection.conf $RPM_BUILD_ROOT%{_sysconfdir}
278 install contrib/collection.cgi $RPM_BUILD_ROOT/home/services/httpd/cgi-bin
279 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
280 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
281
282 %clean
283 rm -rf $RPM_BUILD_ROOT
284
285 %post
286 /sbin/chkconfig --add %{name}
287 %service %{name} restart
288
289 %preun
290 if [ "$1" = "0" ]; then
291         %service -q %{name} stop
292         /sbin/chkconfig --del %{name}
293 fi
294
295 %files
296 %defattr(644,root,root,755)
297 %doc AUTHORS ChangeLog README TODO contrib
298
299 %attr(755,root,root) %{_sbindir}/collectd
300 %attr(755,root,root) %{_sbindir}/collectdmon
301 %attr(755,root,root) %{_bindir}/collectd-nagios
302 %dir %{_libdir}/%{name}
303 %attr(755,root,root) %{_libdir}/%{name}/apcups.so
304 #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so
305 %attr(755,root,root) %{_libdir}/%{name}/battery.so
306 %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so
307 %attr(755,root,root) %{_libdir}/%{name}/cpu.so
308 %attr(755,root,root) %{_libdir}/%{name}/csv.so
309 %attr(755,root,root) %{_libdir}/%{name}/df.so
310 %attr(755,root,root) %{_libdir}/%{name}/disk.so
311 %attr(755,root,root) %{_libdir}/%{name}/email.so
312 %attr(755,root,root) %{_libdir}/%{name}/entropy.so
313 %attr(755,root,root) %{_libdir}/%{name}/exec.so
314 %attr(755,root,root) %{_libdir}/%{name}/interface.so
315 %attr(755,root,root) %{_libdir}/%{name}/iptables.so
316 %attr(755,root,root) %{_libdir}/%{name}/irq.so
317 %attr(755,root,root) %{_libdir}/%{name}/load.so
318 %attr(755,root,root) %{_libdir}/%{name}/logfile.so
319 %attr(755,root,root) %{_libdir}/%{name}/mbmon.so
320 %attr(755,root,root) %{_libdir}/%{name}/memcached.so
321 %attr(755,root,root) %{_libdir}/%{name}/memory.so
322 %attr(755,root,root) %{_libdir}/%{name}/multimeter.so
323 %attr(755,root,root) %{_libdir}/%{name}/netlink.so
324 %attr(755,root,root) %{_libdir}/%{name}/network.so
325 %attr(755,root,root) %{_libdir}/%{name}/nfs.so
326 %attr(755,root,root) %{_libdir}/%{name}/ntpd.so
327 #%attr(755,root,root) %{_libdir}/%{name}/perl.so
328 %attr(755,root,root) %{_libdir}/%{name}/powerdns.so
329 %attr(755,root,root) %{_libdir}/%{name}/processes.so
330 %attr(755,root,root) %{_libdir}/%{name}/serial.so
331 %attr(755,root,root) %{_libdir}/%{name}/swap.so
332 %attr(755,root,root) %{_libdir}/%{name}/syslog.so
333 %attr(755,root,root) %{_libdir}/%{name}/tail.so
334 #%attr(755,root,root) %{_libdir}/%{name}/tape.so
335 %attr(755,root,root) %{_libdir}/%{name}/teamspeak2.so
336 %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so
337 #%attr(755,root,root) %{_libdir}/%{name}/traffic.so
338 %attr(755,root,root) %{_libdir}/%{name}/unixsock.so
339 %attr(755,root,root) %{_libdir}/%{name}/users.so
340 %attr(755,root,root) %{_libdir}/%{name}/vmem.so
341 %attr(755,root,root) %{_libdir}/%{name}/vserver.so
342 %attr(755,root,root) %{_libdir}/%{name}/wireless.so
343 %{_libdir}/%{name}/types.db
344
345 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
346
347 %attr(754,root,root) /etc/rc.d/init.d/%{name}
348
349 %{_mandir}/man1/collectd.1*
350 %{_mandir}/man1/collectd-nagios.1*
351 %{_mandir}/man5/collectd.conf.5*
352 %{_mandir}/man5/collectd-email.5*
353 %{_mandir}/man5/collectd-exec.5*
354 %{_mandir}/man5/collectd-perl.5*
355 %{_mandir}/man5/collectd-snmp.5*
356 %{_mandir}/man5/collectd-unixsock.5*
357 %{_mandir}/man1/collectdmon.1*
358 %{_mandir}/man5/types.db.5*
359 %{_var}/log/collectd.log
360 %dir %{_var}/lib/%{name}
361
362 ########## PLUGINS:
363 %files ascent
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/%{name}/ascent.so
366
367 %files apache
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/%{name}/apache.so
370
371 %files collection
372 %defattr(644,root,root,755)
373 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/collection.conf
374 %attr(755,root,root) /home/services/httpd/cgi-bin/collection.cgi
375
376 %files dns
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_libdir}/%{name}/dns.so
379
380 %files hddtemp
381 %defattr(644,root,root,755)
382 %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so
383
384 %files mysql
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/%{name}/mysql.so
387
388 %files nginx
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_libdir}/%{name}/nginx.so
391
392 %files ping
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/%{name}/ping.so
395
396 %files rrdtool
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so
399
400 %files sensors
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/%{name}/sensors.so
403
404 %files snmp
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/%{name}/snmp.so
407
408 %files uuid
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/%{name}/uuid.so
411
412 %files xmms
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/%{name}/xmms.so
This page took 0.0498 seconds and 3 git commands to generate.