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