]>
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 | |
9 | Summary: Collects system information in rrd files | |
10 | Name: collectd | |
11 | Version: 3.7.1 | |
12 | Release: 0.1 | |
13 | License: GPL v2 | |
14 | Group: Unknow | |
15 | Source0: http://verplant.org/collectd/files/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: dc2120fad388e5fc8bc486b4fcadc68e | |
17 | URL: http://verplant.org/collectd/ | |
18 | BuildRequires: rpmbuild(macros) >= 1.228 | |
19 | Requires(post,preun): /sbin/chkconfig | |
20 | BuildRequires: libstatgrab-devel >= 0.12 | |
21 | BuildRequires: autoconf | |
22 | BuildRequires: automake | |
23 | #BuildRequires: intltool | |
24 | BuildRequires: libtool | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | collectd is a small daemon which collects system information every 10 seconds | |
29 | and writes the results in an RRD-file. | |
30 | ||
31 | In contrast to most similar software, collectd is not a script but written in | |
32 | plain C for performance and portability. As a daemon it stays in memory, so | |
33 | there is no need to start up a heavy interpreter every time new values should | |
34 | be logged. This allows collectd to have a 10 second resolution while being nice | |
35 | to the system. | |
36 | ||
37 | %prep | |
38 | %setup -q | |
39 | ||
40 | %build | |
41 | %{__libtoolize} | |
42 | %{__aclocal} | |
43 | %{__autoconf} | |
44 | %{__autoheader} | |
45 | %{__automake} | |
46 | %configure \ | |
47 | --with-libstatgrab=/usr \ | |
48 | --with-lm-sensors=/usr \ | |
49 | --with-libmysql=/usr \ | |
50 | %{__make} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/collectd.conf | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post | |
64 | /sbin/chkconfig --add %{name} | |
65 | %service %{name} restart | |
66 | ||
67 | %preun | |
68 | if [ "$1" = "0" ]; then | |
69 | %service -q %{name} stop | |
70 | /sbin/chkconfig --del %{name} | |
71 | fi | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc AUTHORS ChangeLog README TODO | |
76 | ||
77 | %attr(755,root,root) %{_sbindir}/collectd | |
78 | %dir %{_libdir}/%{name} | |
79 | %attr(755,root,root) %{_libdir}/%{name}/battery.so | |
80 | %attr(755,root,root) %{_libdir}/%{name}/cpu.so | |
81 | %attr(755,root,root) %{_libdir}/%{name}/cpufreq.so | |
82 | %attr(755,root,root) %{_libdir}/%{name}/df.so | |
83 | %attr(755,root,root) %{_libdir}/%{name}/disk.so | |
84 | %attr(755,root,root) %{_libdir}/%{name}/hddtemp.so | |
85 | %attr(755,root,root) %{_libdir}/%{name}/load.so | |
86 | %attr(755,root,root) %{_libdir}/%{name}/memory.so | |
87 | %attr(755,root,root) %{_libdir}/%{name}/mysql.so | |
88 | %attr(755,root,root) %{_libdir}/%{name}/nfs.so | |
89 | %attr(755,root,root) %{_libdir}/%{name}/ping.so | |
90 | %attr(755,root,root) %{_libdir}/%{name}/processes.so | |
91 | %attr(755,root,root) %{_libdir}/%{name}/sensors.so | |
92 | %attr(755,root,root) %{_libdir}/%{name}/serial.so | |
93 | %attr(755,root,root) %{_libdir}/%{name}/swap.so | |
94 | %attr(755,root,root) %{_libdir}/%{name}/tape.so | |
95 | %attr(755,root,root) %{_libdir}/%{name}/traffic.so | |
96 | %attr(755,root,root) %{_libdir}/%{name}/users.so | |
97 | ||
98 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
99 | ||
100 | #%attr(754,root,root) /etc/rc.d/init.d/%{name} | |
101 | #%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
102 | ||
103 | %{_mandir}/man1/collectd.1* | |
104 | %{_mandir}/man5/collectd.conf.5* |