blob: 95e13abb351d894bf7f2300c8280afc98954fdc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidclamav/squidclamav-6.1.ebuild,v 1.3 2011/07/17 20:36:46 maekke Exp $
EAPI=2
inherit eutils
DESCRIPTION="HTTP Antivirus for Squid based on ClamAv and ICAP"
HOMEPAGE="http://squidclamav.darold.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 x86"
IUSE=""
RDEPEND="net-proxy/c-icap"
DEPEND="${RDEPEND}"
src_prepare() {
epatch "${FILESDIR}/${P}-crash.patch"
}
src_install() {
emake DESTDIR="${D}" install || die
find "${D}" -name '*.la' -delete || die
# delete its own documentation installed
rm -r "${D}"/usr/share/${PN} || die
dodoc README AUTHORS ChangeLog || die
# Fix configuration file to adapt to the Gentoo configuration
sed -i \
-e '/clamd_local/s:/tmp/clamd:/var/run/clamav/clamd.sock:' \
"${D}"/etc/squidclamav.conf || die
}
pkg_postinst() {
elog "Starting from version 6, Squid Clamav is now a module for the c-icap"
elog "server, which is called from squid, rather than being a redirector"
elog "directly."
elog ""
elog "To enable the service, you should add this to your c-icap.conf file:"
elog ""
elog " Service clamav squidclamav.so"
elog ""
elog "And then this to squid.conf (for a local ICAP server):"
elog ""
elog " icap_enable on"
elog ""
elog " # not strictly needed, but useful for special access"
elog " icap_send_client_ip on"
elog " icap_send_client_username on"
elog ""
elog " icap_service clamav respmod_precache bypass=0 icap://localhost:1344/clamav"
elog " adaptation_access clamav allow all"
}
|