--- rpms/clamav/sme10/clamav.spec 2016/03/03 10:30:49 1.3 +++ rpms/clamav/sme10/clamav.spec 2016/05/03 19:41:59 1.5 @@ -1,4 +1,4 @@ -# $Id: clamav.spec,v 1.2 2016/02/04 11:58:13 vip-ire Exp $ +# $Id: clamav.spec,v 1.4 2016/05/03 19:19:44 vip-ire Exp $ # Authority: dag # Upstream: @@ -13,7 +13,7 @@ Summary: Anti-virus software Name: clamav -Version: 0.99.1 +Version: 0.99.2 Release: 1%{?dist} License: GPL Group: Applications/System @@ -289,16 +289,13 @@ fi /usr/sbin/useradd -r -d /var/clamav -s /sbin/nologin -c "Clam Anti Virus Checker" -g clamav clamav 2>/dev/null || : %post -n clamd -/sbin/chkconfig --add clamd +%systemd_post clamav-daemon.service %preun -n clamd -if [ $1 -eq 0 ]; then - /sbin/service clamd stop &>/dev/null || : - /sbin/chkconfig --del clamd -fi +%systemd_preun clamav-daemon.service %postun -n clamd -/sbin/service clamd condrestart &>/dev/null || : +%systemd_postun %post milter /sbin/chkconfig --add clamav-milter @@ -316,6 +313,15 @@ fi /usr/sbin/groupadd -r clamav 2>/dev/null || : /usr/sbin/useradd -r -d /var/clamav -s /sbin/nologin -c "Clam Anti Virus Checker" -g clamav clamav 2>/dev/null || : +%post db +%systemd_post clamav-freshclam.service + +%preun db +%systemd_preun clamav-freshclam.service + +%postun db +%systemd_postun + %clean %{__rm} -rf %{buildroot} @@ -333,6 +339,7 @@ fi %doc %{_mandir}/man1/freshclam.1* %doc %{_mandir}/man5/freshclam.conf.5* %config(noreplace) %{_sysconfdir}/freshclam.conf +%{_unitdir}/clamav-freshclam.service %{_bindir}/clambc %{_bindir}/clamscan %{_bindir}/freshclam @@ -359,6 +366,8 @@ fi %config(noreplace) %{_sysconfdir}/clamd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/clamav %config %{_initrddir}/clamd +%{_unitdir}/clamav-daemon.service +%{_unitdir}/clamav-daemon.socket %{_sbindir}/clamd %{_bindir}/clamconf %{_bindir}/clamdscan @@ -408,6 +417,10 @@ fi %exclude %{_libdir}/libclamunrar_iface.la %changelog +* Tue May 3 2016 Daniel Berteaud - 0.99.2-1.sme +- Update to 0.99.2 [SME: 9487] +- Adapt to use systemd unit [SME: 9487] + * Thu Mar 3 2016 Daniel Berteaud - 0.99.1-1.sme - Update to 0.99.1 [SME: 9268]