]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - lm_sensors subpackage | |
3 | # - perl (plugin and bindings) subpackage | |
4 | # - hddtemp subpackage | |
5 | # - initscripts for local/client/server mode (subpackage ?) | |
6 | # - collection CGI script | |
7 | # - package contrib scripts as %doc | |
8 | # - build nut, iptables and other plugins | |
9 | # - fix building perl plugin | |
10 | Summary: Collects system information in RRD files | |
11 | Summary(pl.UTF-8): Zbieranie informacji o systemie w plikach RRD | |
12 | Name: collectd | |
13 | Version: 4.2.3 | |
14 | Release: 0.1 | |
15 | License: GPL v2 | |
16 | Group: Daemons | |
17 | Source0: http://collectd.org/files/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: 94c337194b333894f9a8ca32734d69a6 | |
19 | Source1: %{name}.conf | |
20 | URL: http://collectd.org/ | |
21 | BuildRequires: autoconf | |
22 | BuildRequires: automake | |
23 | BuildRequires: curl-devel | |
24 | BuildRequires: libstatgrab-devel >= 0.12 | |
25 | BuildRequires: libpcap-devel | |
26 | BuildRequires: libtool | |
27 | BuildRequires: mysql-devel | |
28 | BuildRequires: perl-devel | |
29 | BuildRequires: rpmbuild(macros) >= 1.228 | |
30 | BuildRequires: rrdtool-devel | |
31 | Requires(post,preun): /sbin/chkconfig | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | collectd is a small daemon which collects system information every 10 | |
36 | seconds and writes the results in an RRD-file. | |
37 | ||
38 | In contrast to most similar software, collectd is not a script but | |
39 | written in plain C for performance and portability. As a daemon it | |
40 | stays in memory, so there is no need to start up a heavy interpreter | |
41 | every time new values should be logged. This allows collectd to have a | |
42 | 10 second resolution while being nice to the system. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | collectd to mały demon zbierający co 10 sekund informacje o systemie i | |
46 | zapisujący wyniki do pliku RRD. | |
47 | ||
48 | W odróżnieniu od innych podobnych programów collectd nie jest | |
49 | skryptem, lecz jest napisany w czystym C z myślą o wydajności i | |
50 | przenośności. Jako demon pozostaje w pamięci, więc nie ma potrzeby | |
51 | urychamiania ciężkiego interpretera za każdym razem, kiedy powinny być | |
52 | zapisane nowe wartości. Dzięki temu collect może mieć rozdzielczość 10 | |
53 | sekund i nie obciążać zbytnio systemu. | |
54 | ||
55 | %package apache | |
56 | Summary: apache-plugin for collectd | |
57 | Summary(pl_PL.UTF-8): Wtyczka apache dla collectd | |
58 | Group: Daemons | |
59 | Requires: %{name} = %{version}-%{release} | |
60 | ||
61 | %description apache | |
62 | This plugin collectd data provided by Apache's `mod_status'. | |
63 | ||
64 | %description apache -l pl.UTF-8 | |
65 | Wtyczka collectd zbierająca informacje udostępniane przez moduł | |
66 | 'mod_status' Apacha. | |
67 | ||
68 | %package mysql | |
69 | Summary: mysql-plugin for collectd | |
70 | Summary(pl_PL.UTF-8): Moduł mysql dla collectd. | |
71 | Group: Daemons | |
72 | Requires: %{name} = %{version}-%{release} | |
73 | ||
74 | %description mysql | |
75 | MySQL querying plugin. This plugins provides data of issued commands, | |
76 | called handlers and database traffic. | |
77 | ||
78 | %description mysql -l pl.UTF-8 | |
79 | Moduł odpytujący MySQL. Wtyczka udostępnia dane o wydawanych | |
80 | poleceniach, wywoływanych procedurach obsługi i ruchu bazodanowym. | |
81 | ||
82 | %prep | |
83 | %setup -q | |
84 | ||
85 | %build | |
86 | %{__libtoolize} | |
87 | %{__aclocal} | |
88 | %{__autoconf} | |
89 | %{__autoheader} | |
90 | %{__automake} | |
91 | %configure \ | |
92 | --with-libstatgrab=/usr \ | |
93 | --with-lm-sensors=/usr \ | |
94 | --with-libmysql=/usr | |
95 | %{__make} | |
96 | ||
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %{__make} install \ | |
101 | DESTDIR=$RPM_BUILD_ROOT | |
102 | ||
103 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/collectd.conf | |
104 | ||
105 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la | |
106 | ||
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post | |
111 | /sbin/chkconfig --add %{name} | |
112 | %service %{name} restart | |
113 | ||
114 | %preun | |
115 | if [ "$1" = "0" ]; then | |
116 | %service -q %{name} stop | |
117 | /sbin/chkconfig --del %{name} | |
118 | fi | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc AUTHORS ChangeLog README TODO | |
123 | ||
124 | %attr(755,root,root) %{_sbindir}/collectd | |
125 | %attr(755,root,root) %{_bindir}/collectd-nagios | |
126 | %dir %{_libdir}/%{name} | |
127 | %attr(755,root,root) %{_libdir}/%{name}/apcups.so | |
128 | #%attr(755,root,root) %{_libdir}/%{name}/apple_sensors.so | |
129 | %attr(755,root,root) %{_libdir}/%{name}/battery.so | |
130 | %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so | |
131 | %attr(755,root,root) %{_libdir}/%{name}/cpu.so | |
132 | %attr(755,root,root) %{_libdir}/%{name}/csv.so | |
133 | %attr(755,root,root) %{_libdir}/%{name}/df.so | |
134 | %attr(755,root,root) %{_libdir}/%{name}/disk.so | |
135 | %attr(755,root,root) %{_libdir}/%{name}/dns.so | |
136 | %attr(755,root,root) %{_libdir}/%{name}/email.so | |
137 | %attr(755,root,root) %{_libdir}/%{name}/entropy.so | |
138 | %attr(755,root,root) %{_libdir}/%{name}/exec.so | |
139 | %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so | |
140 | %attr(755,root,root) %{_libdir}/%{name}/interface.so | |
141 | %attr(755,root,root) %{_libdir}/%{name}/irq.so | |
142 | %attr(755,root,root) %{_libdir}/%{name}/load.so | |
143 | %attr(755,root,root) %{_libdir}/%{name}/logfile.so | |
144 | %attr(755,root,root) %{_libdir}/%{name}/mbmon.so | |
145 | %attr(755,root,root) %{_libdir}/%{name}/memcached.so | |
146 | %attr(755,root,root) %{_libdir}/%{name}/memory.so | |
147 | %attr(755,root,root) %{_libdir}/%{name}/multimeter.so | |
148 | %attr(755,root,root) %{_libdir}/%{name}/network.so | |
149 | %attr(755,root,root) %{_libdir}/%{name}/nfs.so | |
150 | %attr(755,root,root) %{_libdir}/%{name}/nginx.so | |
151 | %attr(755,root,root) %{_libdir}/%{name}/ntpd.so | |
152 | #%attr(755,root,root) %{_libdir}/%{name}/perl.so | |
153 | %attr(755,root,root) %{_libdir}/%{name}/ping.so | |
154 | %attr(755,root,root) %{_libdir}/%{name}/processes.so | |
155 | %attr(755,root,root) %{_libdir}/%{name}/rrdtool.so | |
156 | #%attr(755,root,root) %{_libdir}/%{name}/sensors.so | |
157 | %attr(755,root,root) %{_libdir}/%{name}/sensors.so | |
158 | %attr(755,root,root) %{_libdir}/%{name}/serial.so | |
159 | %attr(755,root,root) %{_libdir}/%{name}/swap.so | |
160 | %attr(755,root,root) %{_libdir}/%{name}/syslog.so | |
161 | #%attr(755,root,root) %{_libdir}/%{name}/tape.so | |
162 | %attr(755,root,root) %{_libdir}/%{name}/tcpconns.so | |
163 | #%attr(755,root,root) %{_libdir}/%{name}/traffic.so | |
164 | %attr(755,root,root) %{_libdir}/%{name}/unixsock.so | |
165 | %attr(755,root,root) %{_libdir}/%{name}/users.so | |
166 | %attr(755,root,root) %{_libdir}/%{name}/vserver.so | |
167 | %attr(755,root,root) %{_libdir}/%{name}/wireless.so | |
168 | %{_libdir}/%{name}/types.db | |
169 | ||
170 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
171 | ||
172 | #%attr(754,root,root) /etc/rc.d/init.d/%{name} | |
173 | #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
174 | ||
175 | %{_mandir}/man1/collectd.1* | |
176 | %{_mandir}/man1/collectd-nagios.1* | |
177 | %{_mandir}/man5/collectd.conf.5* | |
178 | %{_mandir}/man5/collectd-email.5* | |
179 | %{_mandir}/man5/collectd-exec.5* | |
180 | %{_mandir}/man5/collectd-perl.5* | |
181 | %{_mandir}/man5/collectd-snmp.5* | |
182 | %{_mandir}/man5/collectd-unixsock.5* | |
183 | ||
184 | %files apache | |
185 | %defattr(644,root,root,755) | |
186 | %attr(755,root,root) %{_libdir}/%{name}/apache.so | |
187 | ||
188 | %files mysql | |
189 | %defattr(644,root,root,755) | |
190 | %attr(755,root,root) %{_libdir}/%{name}/mysql.so |