]>
Commit | Line | Data |
---|---|---|
373d486f AF |
1 | # TODO: |
2 | # - mysql subpackage | |
3 | # - lm_sensors subpackage | |
4 | # - hddtemp subpackage | |
762d0c28 | 5 | # - initscripts for local/client/server mode (subpackage ?) |
373d486f AF |
6 | # - collection CGI script |
7 | # - package contrib scripts as %doc | |
7df111b4 | 8 | Summary: Collects system information in RRD files |
322f1351 | 9 | Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD |
373d486f | 10 | Name: collectd |
762d0c28 AF |
11 | Version: 3.11.2 |
12 | Release: 0.2 | |
373d486f | 13 | License: GPL v2 |
81857fc6 | 14 | Group: Daemons |
f6984413 | 15 | Source0: http://collectd.org/files/%{name}-%{version}.tar.gz |
762d0c28 | 16 | # Source0-md5: 40f4c3689c2c049497a8b1a47e01cc75 |
f6984413 | 17 | Source1: %{name}.conf |
762d0c28 | 18 | Patch0: %{name}-include.patch |
f6984413 | 19 | URL: http://collectd.org/ |
373d486f AF |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
762d0c28 | 22 | BuildRequires: curl-devel |
7df111b4 | 23 | BuildRequires: libstatgrab-devel >= 0.12 |
762d0c28 | 24 | BuildRequires: libpcap-devel |
373d486f | 25 | BuildRequires: libtool |
762d0c28 | 26 | BuildRequires: mysql-devel |
7df111b4 | 27 | BuildRequires: rpmbuild(macros) >= 1.228 |
762d0c28 | 28 | BuildRequires: rrdtool-devel |
7df111b4 | 29 | Requires(post,preun): /sbin/chkconfig |
373d486f AF |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
7df111b4 JB |
33 | collectd is a small daemon which collects system information every 10 |
34 | seconds and writes the results in an RRD-file. | |
35 | ||
36 | In contrast to most similar software, collectd is not a script but | |
37 | written in plain C for performance and portability. As a daemon it | |
38 | stays in memory, so there is no need to start up a heavy interpreter | |
39 | every time new values should be logged. This allows collectd to have a | |
40 | 10 second resolution while being nice to the system. | |
41 | ||
19cbcad3 JR |
42 | %description -l pl.UTF-8 |
43 | collectd to mały demon zbierający co 10 sekund informacje o systemie i | |
44 | zapisujący wyniki do pliku RRD. | |
373d486f | 45 | |
19cbcad3 JR |
46 | W odróżnieniu od innych podobnych programów collectd nie jest |
47 | skryptem, lecz jest napisany w czystym C z myślą o wydajności i | |
48 | przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby | |
49 | urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być | |
50 | zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10 | |
51 | sekund i nie obciążać zbytnio systemu. | |
373d486f AF |
52 | |
53 | %prep | |
54 | %setup -q | |
762d0c28 | 55 | %patch -p1 |
373d486f AF |
56 | |
57 | %build | |
58 | %{__libtoolize} | |
59 | %{__aclocal} | |
60 | %{__autoconf} | |
61 | %{__autoheader} | |
62 | %{__automake} | |
63 | %configure \ | |
64 | --with-libstatgrab=/usr \ | |
65 | --with-lm-sensors=/usr \ | |
66 | --with-libmysql=/usr \ | |
67 | %{__make} | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
81857fc6 | 74 | |
f6984413 AF |
75 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf |
76 | ||
77 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la | |
373d486f AF |
78 | |
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
81857fc6 | 82 | %post |
373d486f AF |
83 | /sbin/chkconfig --add %{name} |
84 | %service %{name} restart | |
85 | ||
81857fc6 | 86 | %preun |
373d486f AF |
87 | if [ "$1" = "0" ]; then |
88 | %service -q %{name} stop | |
89 | /sbin/chkconfig --del %{name} | |
90 | fi | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
94 | %doc AUTHORS ChangeLog README TODO | |
95 | ||
96 | %attr(755,root,root) %{_sbindir}/collectd | |
97 | %dir %{_libdir}/%{name} | |
c1bbd93e AF |
98 | %attr(755,root,root) %{_libdir}/%{name}/apache.so |
99 | %attr(755,root,root) %{_libdir}/%{name}/apcups.so | |
100 | %attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so | |
373d486f | 101 | %attr(755,root,root) %{_libdir}/%{name}/battery.so |
373d486f | 102 | %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so |
c1bbd93e | 103 | %attr(755,root,root) %{_libdir}/%{name}/cpu.so |
373d486f AF |
104 | %attr(755,root,root) %{_libdir}/%{name}/df.so |
105 | %attr(755,root,root) %{_libdir}/%{name}/disk.so | |
762d0c28 AF |
106 | %attr(755,root,root) %{_libdir}/%{name}/dns.so |
107 | %attr(755,root,root) %{_libdir}/%{name}/email.so | |
373d486f AF |
108 | %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so |
109 | %attr(755,root,root) %{_libdir}/%{name}/load.so | |
762d0c28 | 110 | %attr(755,root,root) %{_libdir}/%{name}/mbmon.so |
373d486f | 111 | %attr(755,root,root) %{_libdir}/%{name}/memory.so |
762d0c28 | 112 | %attr(755,root,root) %{_libdir}/%{name}/multimeter.so |
373d486f AF |
113 | %attr(755,root,root) %{_libdir}/%{name}/mysql.so |
114 | %attr(755,root,root) %{_libdir}/%{name}/nfs.so | |
c1bbd93e | 115 | %attr(755,root,root) %{_libdir}/%{name}/ntpd.so |
373d486f AF |
116 | %attr(755,root,root) %{_libdir}/%{name}/ping.so |
117 | %attr(755,root,root) %{_libdir}/%{name}/processes.so | |
118 | %attr(755,root,root) %{_libdir}/%{name}/sensors.so | |
119 | %attr(755,root,root) %{_libdir}/%{name}/serial.so | |
120 | %attr(755,root,root) %{_libdir}/%{name}/swap.so | |
121 | %attr(755,root,root) %{_libdir}/%{name}/tape.so | |
122 | %attr(755,root,root) %{_libdir}/%{name}/traffic.so | |
123 | %attr(755,root,root) %{_libdir}/%{name}/users.so | |
c1bbd93e | 124 | %attr(755,root,root) %{_libdir}/%{name}/vserver.so |
f6984413 | 125 | %attr(755,root,root) %{_libdir}/%{name}/wireless.so |
373d486f AF |
126 | |
127 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
128 | ||
129 | #%attr(754,root,root) /etc/rc.d/init.d/%{name} | |
130 | #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
131 | ||
132 | %{_mandir}/man1/collectd.1* | |
133 | %{_mandir}/man5/collectd.conf.5* |