Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 470722
Collapse All | Expand All

(-)/usr/portage/app-antivirus/clamav/clamav-0.97.8.ebuild (-7 / +12 lines)
Lines 4-10 Link Here
4
4
5
EAPI=5
5
EAPI=5
6
6
7
inherit eutils flag-o-matic user
7
inherit eutils flag-o-matic user systemd
8
8
9
DESCRIPTION="Clam Anti-Virus Scanner"
9
DESCRIPTION="Clam Anti-Virus Scanner"
10
HOMEPAGE="http://www.clamav.net/"
10
HOMEPAGE="http://www.clamav.net/"
Lines 67-72 Link Here
67
	newinitd "${FILESDIR}"/clamd.initd-r5 clamd
67
	newinitd "${FILESDIR}"/clamd.initd-r5 clamd
68
	newconfd "${FILESDIR}"/clamd.conf clamd
68
	newconfd "${FILESDIR}"/clamd.conf clamd
69
69
70
	systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
71
	systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
72
	systemd_dounit "${FILESDIR}/clamd.service"
73
	systemd_dounit "${FILESDIR}/clamav-milter.service"
74
70
	keepdir /var/lib/clamav
75
	keepdir /var/lib/clamav
71
	fowners clamav:clamav /var/lib/clamav
76
	fowners clamav:clamav /var/lib/clamav
72
	keepdir /var/log/clamav
77
	keepdir /var/log/clamav
Lines 78-92 Link Here
78
83
79
	# Modify /etc/{clamd,freshclam}.conf to be usable out of the box
84
	# Modify /etc/{clamd,freshclam}.conf to be usable out of the box
80
	sed -i -e "s:^\(Example\):\# \1:" \
85
	sed -i -e "s:^\(Example\):\# \1:" \
81
		-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
86
		-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/clamd.pid:" \
82
		-e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
87
		-e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/run/clamav/clamd.sock:" \
83
		-e "s:.*\(User\) .*:\1 clamav:" \
88
		-e "s:.*\(User\) .*:\1 clamav:" \
84
		-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
89
		-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
85
		-e "s:^\#\(LogTime\).*:\1 yes:" \
90
		-e "s:^\#\(LogTime\).*:\1 yes:" \
86
		-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
91
		-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
87
		"${ED}"/etc/clamd.conf
92
		"${ED}"/etc/clamd.conf
88
	sed -i -e "s:^\(Example\):\# \1:" \
93
	sed -i -e "s:^\(Example\):\# \1:" \
89
		-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
94
		-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/freshclam.pid:" \
90
		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
95
		-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
91
		-e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
96
		-e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
92
		-e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
97
		-e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
Lines 99-108 Link Here
99
		# inet: which we want to leave
104
		# inet: which we want to leave
100
		dodoc "${FILESDIR}"/clamav-milter.README.gentoo
105
		dodoc "${FILESDIR}"/clamav-milter.README.gentoo
101
		sed -i -e "s:^\(Example\):\# \1:" \
106
		sed -i -e "s:^\(Example\):\# \1:" \
102
			-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
107
			-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/run/clamav/clamav-milter.pid:" \
103
			-e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
108
			-e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/run/clamav/clamd.sock+" \
104
			-e "s:.*\(User\) .*:\1 clamav:" \
109
			-e "s:.*\(User\) .*:\1 clamav:" \
105
			-e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
110
			-e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/run/clamav/clamav-milter.sock+" \
106
			-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
111
			-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
107
			-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
112
			-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
108
			"${ED}"/etc/clamav-milter.conf
113
			"${ED}"/etc/clamav-milter.conf

Return to bug 470722