--- /usr/portage/app-antivirus/clamav/clamav-0.97.8.ebuild 2013-04-23 20:02:01.000000000 +0200 +++ clamav/clamav-0.97.8.ebuild 2013-05-20 10:33:31.012560024 +0200 @@ -4,7 +4,7 @@ EAPI=5 -inherit eutils flag-o-matic user +inherit eutils flag-o-matic user systemd DESCRIPTION="Clam Anti-Virus Scanner" HOMEPAGE="http://www.clamav.net/" @@ -67,6 +67,11 @@ newinitd "${FILESDIR}"/clamd.initd-r5 clamd newconfd "${FILESDIR}"/clamd.conf clamd + systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf" + systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service" + systemd_dounit "${FILESDIR}/clamd.service" + systemd_dounit "${FILESDIR}/clamav-milter.service" + keepdir /var/lib/clamav fowners clamav:clamav /var/lib/clamav keepdir /var/log/clamav @@ -78,15 +83,15 @@ # Modify /etc/{clamd,freshclam}.conf to be usable out of the box sed -i -e "s:^\(Example\):\# \1:" \ - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \ - -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/clamd.pid:" \ + -e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/run/clamav/clamd.sock:" \ -e "s:.*\(User\) .*:\1 clamav:" \ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \ -e "s:^\#\(LogTime\).*:\1 yes:" \ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ "${ED}"/etc/clamd.conf sed -i -e "s:^\(Example\):\# \1:" \ - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/freshclam.pid:" \ -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ -e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \ -e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \ @@ -99,10 +104,10 @@ # inet: which we want to leave dodoc "${FILESDIR}"/clamav-milter.README.gentoo sed -i -e "s:^\(Example\):\# \1:" \ - -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \ - -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \ + -e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/clamav-milter.pid:" \ + -e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/run/clamav/clamd.sock+" \ -e "s:.*\(User\) .*:\1 clamav:" \ - -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \ + -e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/run/clamav/clamav-milter.sock+" \ -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ -e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \ "${ED}"/etc/clamav-milter.conf