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

Contents of /net-proxy/adzapper/adzapper-20080508.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Mon Apr 20 20:19:49 2009 UTC (5 years, 4 months ago) by maekke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -2 lines
amd64 stable, bug #257531
(Portage version: 2.1.6.11/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20