/[gentoo-x86]/net-proxy/adzapper/adzapper-20110915-r1.ebuild
Gentoo

Contents of /net-proxy/adzapper/adzapper-20110915-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Aug 10 14:11:59 2012 UTC (22 months, 4 weeks ago) by jer
Branch: MAIN
CVS Tags: HEAD
Fix installing squid_redirect by Martin Stockinger (bug #430732).

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-proxy/adzapper/adzapper-20110915.ebuild,v 1.1 2012/08/01 19:36:05 jer Exp $
4
5 EAPI=4
6
7 MY_P=${P/zapper/zap}
8
9 DESCRIPTION="Redirector for squid that intercepts advertising, page counters and some web bugs"
10 HOMEPAGE="http://adzapper.sourceforge.net/"
11 SRC_URI="http://adzapper.sourceforge.net/${MY_P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
16 IUSE=""
17
18 RDEPEND="dev-lang/perl"
19
20 S="${WORKDIR}"/${P/per/}
21
22 src_prepare() {
23 # update the zapper path in various scripts
24 local SCRPATH="/etc/adzapper/squid_redirect"
25 sed -i scripts/wrapzap scripts/update-zapper* \
26 -e "s|^zapper=.*|zapper=${SCRPATH}|" \
27 -e "s|^ZAPPER=.*|ZAPPER=\"${SCRPATH}\"|" \
28 -e "s|^pidfile=.*|pidfile=/var/run/squid.pid|" \
29 -e "s|^PIDFILE=.*|PIDFILE=\"/var/run/squid.pid\"|" \
30 -e "s|^RESTARTCMD=.*|RESTARTCMD=\"/etc/init.d/squid restart\"|" \
31 || die "sed updating failed."
32 }
33
34 src_install() {
35 exeinto /etc/adzapper
36 doexe \
37 scripts/wrapzap \
38 scripts/zapchain \
39 adblock-plus/adblockplus2adzapper.py
40 newexe scripts/squid_redirect-nodata squid_redirect
41
42 insinto /etc/adzapper
43 doins scripts/update-zapper*
44
45 insinto /var/www/localhost/htdocs/zap
46 doins zaps/*
47 }
48
49 pkg_postinst() {
50 einfo "To enable adzapper, add the following lines to /etc/squid/squid.conf:"
51 einfo " url_rewrite_program /etc/adzapper/wrapzap"
52 einfo " url_rewrite_children 10"
53 }

  ViewVC Help
Powered by ViewVC 1.1.20