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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Oct 12 07:45:57 2008 UTC (8 years, 11 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Remove obsolete versions. Remove squid run-time dependency (#241212).
(Portage version: 2.1.4.4)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-proxy/adzapper/adzapper-20070317.ebuild,v 1.6 2007/07/05 22:50:33 angelos 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 net-proxy/squid"
18
19 S="${WORKDIR}/adzap"
20
21 src_unpack() {
22 unpack ${A}
23
24 cd "${S}/scripts" || die "Scripts directory not found"
25
26 # update the zapper path in various scripts
27 local f SCRPATH="/etc/adzapper/squid_redirect"
28 for f in wrapzap update-zapper*; do
29 sed -i -e "s|^zapper=.*|zapper=${SCRPATH}|" \
30 -e "s|^ZAPPER=.*|ZAPPER=\"${SCRPATH}\"|" \
31 -e "s|^pidfile=.*|pidfile=/var/run/squid.pid|" \
32 -e "s|^PIDFILE=.*|PIDFILE=\"/var/run/squid.pid\"|" \
33 -e "s|^RESTARTCMD=.*|RESTARTCMD=\"/etc/init.d/squid restart\"|" \
34 $f || die "sed updating failed."
35 done
36 }
37
38 src_install() {
39 cd "${S}/scripts"
40 exeinto /etc/adzapper
41 doexe wrapzap zapchain squid_redirect
42
43 insinto /etc/adzapper
44 doins update-zapper*
45
46 cd "${S}/zaps"
47 insinto /var/www/localhost/htdocs/zap
48 doins *
49 }
50
51 pkg_postinst() {
52 einfo "To enable adzapper, add the following lines to /etc/squid/squid.conf:"
53 einfo " url_rewrite_program /etc/adzapper/wrapzap"
54 einfo " url_rewrite_children 10"
55 }

  ViewVC Help
Powered by ViewVC 1.1.20