summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2007-01-17 18:52:28 +0000
committerAlin Năstac <mrness@gentoo.org>2007-01-17 18:52:28 +0000
commit448cdb6b2993a583381446f82543ea91127e11e3 (patch)
tree2ac38b3748b9a9927b1674cb2b8df83e6f99f8ea /net-proxy/adzapper/adzapper-20061217.ebuild
parentFixing erroneous comment on masked package. (diff)
downloadhistorical-448cdb6b2993a583381446f82543ea91127e11e3.tar.gz
historical-448cdb6b2993a583381446f82543ea91127e11e3.tar.bz2
historical-448cdb6b2993a583381446f82543ea91127e11e3.zip
amd64; version bump
Package-Manager: portage-2.1.1-r2
Diffstat (limited to 'net-proxy/adzapper/adzapper-20061217.ebuild')
-rw-r--r--net-proxy/adzapper/adzapper-20061217.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/net-proxy/adzapper/adzapper-20061217.ebuild b/net-proxy/adzapper/adzapper-20061217.ebuild
new file mode 100644
index 000000000000..e237149f8779
--- /dev/null
+++ b/net-proxy/adzapper/adzapper-20061217.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/adzapper/adzapper-20061217.ebuild,v 1.1 2007/01/17 18:52:28 mrness Exp $
+
+MY_P=${P/zapper/zap}
+
+DESCRIPTION="Redirector for squid that intercepts advertising, page counters and some web bugs"
+HOMEPAGE="http://adzapper.sourceforge.net/"
+SRC_URI="http://adzapper.sourceforge.net/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ net-proxy/squid"
+
+S="${WORKDIR}/adzap"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}/scripts" || die "Scripts directory not found"
+
+ # update the zapper path in various scripts
+ local f SCRPATH="/etc/adzapper/squid_redirect"
+ for f in wrapzap update-zapper*; do
+ sed -i -e "s|^zapper=.*|zapper=${SCRPATH}|" \
+ -e "s|^ZAPPER=.*|ZAPPER=\"${SCRPATH}\"|" \
+ -e "s|^pidfile=.*|pidfile=/var/run/squid.pid|" \
+ -e "s|^PIDFILE=.*|PIDFILE=\"/var/run/squid.pid\"|" \
+ -e "s|^RESTARTCMD=.*|RESTARTCMD=\"/etc/init.d/squid restart\"|" \
+ $f || die "sed updating failed."
+ done
+}
+
+src_install() {
+ cd "${S}/scripts"
+ exeinto /etc/adzapper
+ doexe wrapzap zapchain squid_redirect
+
+ insinto /etc/adzapper
+ doins update-zapper*
+
+ cd "${S}/zaps"
+ insinto /var/www/localhost/htdocs/zap
+ doins *
+}
+
+pkg_postinst() {
+ einfo "To enable adzapper, add the following lines to /etc/squid/squid.conf:"
+ einfo " - for squid ver 2.5"
+ einfo " ${HILITE}redirect_program /etc/adzapper/wrapzap${NORMAL}"
+ einfo " ${HILITE}redirect_children 10${NORMAL}"
+ einfo " - for squid ver 2.6"
+ einfo " ${HILITE}url_rewrite_program /etc/adzapper/wrapzap${NORMAL}"
+ einfo " ${HILITE}url_rewrite_children 10${NORMAL}"
+}