# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="A redirector for Squid which scans accessed URLs for viruses, using Clam Anti-Virus" HOMEPAGE="http://squidclam.sourceforge.net/" SRC_URI="http://garr.dl.sourceforge.net/sourceforge/squidclam/${PN}/${P}.tar.gz" LICENSE="GPL-2" 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 einfo "IF something isn't working as expected please have a look at" einfo "the README and Changelog files in the archive. Thanks." echo }