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