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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Thu Aug 2 12:00:50 2007 UTC (10 years, 2 months ago) by mrness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Remove obsolete versions.
(Portage version: 2.1.2.7)

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

  ViewVC Help
Powered by ViewVC 1.1.20