%define with_syslog 0%{!?_without_syslog:1}
%define with_table 0%{!?_without_table:1}
%define with_tail 0%{!?_without_tail:1}
+%define with_tail_csv 0%{!?_without_tail_csv:1}
%define with_tcpconns 0%{!?_without_tcpconns:1}
%define with_teamspeak2 0%{!?_without_teamspeak2:1}
%define with_ted 0%{!?_without_ted:1}
%define with_wireless 0%{!?_without_wireless:1}
%define with_write_graphite 0%{!?_without_write_graphite:1}
%define with_write_http 0%{!?_without_write_http:1}
+%define with_write_riemann 0%{!?_without_write_riemann:1}
# disabled plugins
%define with_apple_sensors 0%{!?_without_apple_sensors:0}
Summary: Statistics collection daemon for filling RRD files
Name: collectd
-Version: 5.2.0
+Version: 5.3.0
Release: 1%{?dist}
URL: http://collectd.org
-Source: http://collectd.org/files/%{name}-%{version}.tar.gz
+Source: http://collectd.org/files/%{name}-%{version}.tar.bz2
License: GPLv2
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: libgcrypt-devel, libstatgrab-devel
+BuildRequires: libgcrypt-devel
Vendor: collectd development team <collectd@verplant.org>
Requires(post): chkconfig
The Write Redis plugin stores values in Redis, a “data structures server”.
%endif
+%if %{with_write_riemann}
+%package write_riemann
+Summary: riemann plugin for collectd
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildRequires: protobuf-c-devel
+%description write_riemann
+The riemann plugin submits values to Riemann, an event stream processor.
+%endif
+
+%package collection3
+Summary: Web-based viewer for collectd
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: httpd
+%description collection3
+collection3 is a graphing front-end for the RRD files created by and filled
+with collectd. It is written in Perl and should be run as an CGI-script.
+Graphs are generated on-the-fly, so no cron job or similar is necessary.
+
+%package php-collection
+Summary: collect php webfrontent
+Group: System Environment/Daemons
+Requires: collectd = %{version}-%{release}
+Requires: httpd
+Requires: php
+Requires: php-rrdtool
+%description php-collection
+PHP graphing frontend for RRD files created by and filled with collectd.
+
%package contrib
Summary: Contrib files for collectd
Group: System Environment/Daemons
%prep
%setup -q
-
%build
%if %{with_aggregation}
%define _with_aggregation --enable-aggregation
%define _with_tail --disable-tail
%endif
+%if %{with_tail_csv}
+%define _with_tail_csv --enable-tail_csv
+%else
+%define _with_tail_csv --disable-tail_csv
+%endif
+
%if %{with_tape}
%define _with_tape --enable-tape
%else
%define _with_write_redis --disable-write_redis --without-libcredis
%endif
+%if %{with_write_riemann}
+%define _with_write_riemann --enable-write_riemann
+%else
+%define _with_write_riemann --disable-write_riemann
+%endif
+
%if %{with_xmms}
%define _with_xmms --enable-xmms
%else
%{?_with_syslog} \
%{?_with_table} \
%{?_with_tail} \
+ %{?_with_tail_csv} \
%{?_with_tcpconns} \
%{?_with_teamspeak2} \
%{?_with_ted} \
%{?_with_vserver} \
%{?_with_wireless}\
%{?_with_write_graphite} \
- %{?_with_write_http}
+ %{?_with_write_http} \
+ %{?_with_write_riemann}
%{__make} %{?_smp_mflags}
%{__make} install DESTDIR=%{buildroot}
%{__install} -Dp -m 0755 contrib/redhat/init.d-collectd %{buildroot}%{_initrddir}/collectd
%{__install} -Dp -m0644 src/collectd.conf %{buildroot}%{_sysconfdir}/collectd.conf
-%{__install} -d %{buildroot}%{sharedstatedir}/collectd/
+%{__install} -d %{buildroot}%{_sharedstatedir}/collectd/
%{__install} -d %{buildroot}%{_sysconfdir}/collectd.d/
+%{__mkdir} -p %{buildroot}%{_localstatedir}/www
+%{__mkdir} -p %{buildroot}/%{_sysconfdir}/httpd/conf.d
+
+%{__cp} -a contrib/collection3 %{buildroot}%{_localstatedir}/www
+%{__cp} -a contrib/redhat/collection3.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/
+
+%{__cp} -a contrib/php-collection %{buildroot}%{_localstatedir}/www
+%{__cp} -a contrib/redhat/php-collection.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/
+
### Clean up docs
find contrib/ -type f -exec %{__chmod} a-x {} \;
# *.la files shouldn't be distributed.
%{_mandir}/man1/collectd.1*
%{_mandir}/man1/collectdctl.1*
%{_mandir}/man1/collectdmon.1*
+%{_mandir}/man1/collectd-tg.1*
%{_mandir}/man5/collectd-email.5*
%{_mandir}/man5/collectd-exec.5*
%{_mandir}/man5/collectd-threshold.5*
%if %{with_tail}
%{_libdir}/%{name}/tail.so
%endif
+%if %{with_tail_csv}
+%{_libdir}/%{name}/tail_csv.so
+%endif
%if %{with_tcpconns}
%{_libdir}/%{name}/tcpconns.so
%endif
%{_libdir}/%{name}/write_redis.so
%endif
+%if %{with_write_riemann}
+%files write_riemann
+%{_libdir}/%{name}/write_riemann.so
+%endif
+
+%files collection3
+%{_localstatedir}/www/collection3
+%{_sysconfdir}/httpd/conf.d/collection3.conf
+
+%files php-collection
+%{_localstatedir}/www/php-collection
+%{_sysconfdir}/httpd/conf.d/php-collection.conf
+
%files contrib
%doc contrib/
%changelog
+* Wed Apr 10 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.3.0-1
+- New upstream version
+- Enabled write_riemann plugin
+- Enabled tail_csv plugin
+- Installed collectd-tc manpage
+
+* Thu Jan 11 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-3
+- remove dependency on libstatgrab, which isn't required on linux
+
+* Thu Jan 03 2013 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-2
+- collection3 and php-collection viewers are now in separate packages
+
* Fri Dec 21 2012 Marc Fournier <marc.fournier@camptocamp.com> 5.2.0-1
- New upstream version
- Enabled aggregation plugin