summaryrefslogtreecommitdiff
blob: b55254ce9fd35602786fd0e9fd7e516006e81fdb (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidclam/squidclam-0.20.ebuild,v 1.2 2006/04/19 18:07:59 mrness Exp $

DESCRIPTION="A redirector for Squid which scans accessed URLs for viruses, using Clam Anti-Virus"
HOMEPAGE="http://squidclam.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="as-is"

SLOT="0"
KEYWORDS="~sparc ~x86"
IUSE=""
DEPEND="net-misc/curl
	app-antivirus/clamav"
RDEPEND="${DEPEND}
	net-proxy/squid"

src_compile() {
	./configure || die "configure failed"
	cd src && emake || die "make failed"
}

src_install() {
	dobin src/squidclam
	insinto /etc
	newins sample.conf squidclam.conf
	dodoc antivir.php README Changelog TODO sample.conf
}

pkg_postinst() {
	ewarn "THIS PACKAGE IS IN ITS EARLY DEVELOPMENT STAGE!"
	ewarn "See ${HOMEPAGE} for more info."
	echo
	einfo "Add following lines to your squid.conf:"
	einfo "${HILITE}    redirect_program /usr/bin/squidclam ${NORMAL}"
	einfo "${HILITE}    redirect_children 15 ${NORMAL} # make a wise choice"
	einfo "and this line to your acl list to prevent loops:"
	einfo "${HILITE}    redirector_access deny localhost ${NORMAL}"
	echo
	ewarn "Squid doesn't pass complete ssl urls to the redirector!"
	ewarn "Therefore scanning them is pretty useless."
	ewarn "Add something like the following to avoid this and save bandwidth:"
	einfo "${HILITE}    acl SSL_ports port 443 563 ${NORMAL}"
	einfo "${HILITE}    redirector_access deny SSL_ports ${NORMAL}"
	echo
}