From: Kjell Randa Date: Sun, 5 Aug 2007 21:39:09 +0000 (+0200) Subject: contrib/fedora/collectd.spec: Updated for 4.0.6. X-Git-Tag: collectd-4.0.7~10 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=fddaa30e57f79ddcc59e57ab496323b45907e7ba;p=collectd.git contrib/fedora/collectd.spec: Updated for 4.0.6. Hi, Here is an updated version of the F7 rpm spec file. It now handles updates as well (rpm -U). When new versions of collectd are out please bump the version tag at the top of the spec file. It will then build correct version of collectd. Regards Kjell Randa Signed-off-by: Florian Forster --- diff --git a/contrib/fedora/collectd.spec b/contrib/fedora/collectd.spec index d5855122..d9f05521 100644 --- a/contrib/fedora/collectd.spec +++ b/contrib/fedora/collectd.spec @@ -1,7 +1,7 @@ Summary: Statistics collection daemon for filling RRD files. Name: collectd -Version: 4.0.5 -Release: 0.fc0 +Version: 4.0.6 +Release: 0.fc7 Source: http://collectd.org/files/%{name}-%{version}.tar.gz License: GPL Group: System Environment/Daemons @@ -64,8 +64,6 @@ cp src/collectd.conf $RPM_BUILD_ROOT/etc/collectd.conf cp contrib/fedora/init.d-collectd $RPM_BUILD_ROOT/etc/rc.d/init.d/collectd cp contrib/collection.cgi $RPM_BUILD_ROOT/var/www/cgi-bin mkdir -p $RPM_BUILD_ROOT/var/lib/collectd -#rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a -#rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la %clean rm -rf $RPM_BUILD_ROOT @@ -75,14 +73,23 @@ rm -rf $RPM_BUILD_ROOT /sbin/chkconfig collectd on %preun -/sbin/chkconfig collectd off -/etc/init.d/collectd stop -/sbin/chkconfig --del collectd +if [ "$1" = 0 ]; then + /sbin/chkconfig collectd off + /etc/init.d/collectd stop + /sbin/chkconfig --del collectd +fi +exit 0 + +%postun +if [ "$1" -ge 1 ]; then + /etc/init.d/collectd restart +fi +exit 0 %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog INSTALL NEWS README -%config /etc/collectd.conf +%attr(0644,root,root) %config(noreplace) /etc/collectd.conf %attr(0755,root,root) /etc/rc.d/init.d/collectd %attr(0755,root,root) /var/www/cgi-bin/collection.cgi %attr(0755,root,root) %{_sbindir}/collectd @@ -219,6 +226,9 @@ rm -rf $RPM_BUILD_ROOT %attr(0644,root,root) %{_libdir}/%{name}/sensors.la %changelog +* Mon Aug 06 2007 Kjell Randa 4.0.6 +- New upstream version + * Wed Jul 25 2007 Kjell Randa 4.0.5 - New major releas - Changes to support 4.0.5