]> git.pld-linux.org Git - packages/clamav.git/commitdiff
- added support for systemd; rel. 4
authorŁukasz Kieś <kiesiu@pld-linux.org>
Mon, 18 Mar 2013 08:57:04 +0000 (09:57 +0100)
committerŁukasz Kieś <kiesiu@pld-linux.org>
Mon, 18 Mar 2013 08:57:04 +0000 (09:57 +0100)
clamav.spec

index 0e5f85f71880937e6b13f9efb4bb36a33066e6cd..713bc2131b0b74eec0b789e33a06e7dd9ba8f4c0 100644 (file)
@@ -14,7 +14,7 @@ Summary:      An anti-virus utility for Unix
 Summary(pl.UTF-8):     Narzędzie antywirusowe dla Uniksów
 Name:          clamav
 Version:       0.97.7
-Release:       3
+Release:       4
 License:       GPL v2+
 Group:         Daemons
 Source0:       http://downloads.sourceforge.net/clamav/%{name}-%{version}.tar.gz
@@ -54,6 +54,8 @@ Requires(pre):        /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      systemd-units >= 38
 Requires(triggerpostun):       sed >= 4.0
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Requires:      /usr/sbin/usermod
@@ -183,7 +185,8 @@ mv configure.{in,ac}
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{cron.d,logrotate.d,rc.d/init.d,sysconfig} \
        $RPM_BUILD_ROOT%{_var}/{log,spool/clamav,lib/clamav} \
-       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir} \
+       $RPM_BUILD_ROOT%{systemdunitdir}
 
 %{__make} install \
        LIBTOOL=%{_bindir}/libtool \
@@ -208,6 +211,8 @@ install -p %{SOURCE8} $RPM_BUILD_ROOT%{_sbindir}
 
 install %{SOURCE10} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
+install %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
+
 # NOTE: clamd uses sane rights to it's clamd.pid file
 # So better keep it dir
 # If it is fixed use of dir will be unecesary
@@ -237,18 +242,21 @@ rm -rf $RPM_BUILD_ROOT
 touch /var/log/freshclam.log
 chown clamav:root /var/log/freshclam.log
 chmod 640 /var/log/freshclam.log
+%systemd_post clamd.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service clamd stop
        /sbin/chkconfig --del clamd
 fi
+%systemd_preun clamd.service
 
 %postun
 if [ "$1" = "0" ]; then
        %userremove clamav
        %groupremove clamav
 fi
+%systemd_reload
 
 %triggerpostun -- %{name} < 0.80
 if [ -f /etc/clamav.conf.rpmsave ]; then
This page took 0.137828 seconds and 4 git commands to generate.