1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00
freebsd-ports/www/adzap2squirm/files/patch-ab
Edwin Groothuis dc0cb7ddc0 new port: www/adzap2squirm
adzap2Squirm is a Perl script to take an Ad Zapper pattern
	file (or the original Ad Zapper script itself, which includes
	the patterns) and write out a corresponding file of patterns
	which Squirm can use for ad zapping.  This port also includes
	a modified update-zapper (from the Ad Zapper) so that updates
	of the ad definitions can be run through cron

PR:		ports/56359
Submitted by:	rmuir@radford.edu
2004-01-08 01:43:26 +00:00

24 lines
861 B
Plaintext

--- update-zapper.orig Sun Jan 5 05:28:38 2003
+++ update-zapper Tue Sep 2 23:01:53 2003
@@ -8,15 +8,16 @@
#
masterurl=http://adzapper.sourceforge.net/scripts/squid_redirect
-zapper=/usr/local/etc/squid_redirect ## hack to suit your site
-pidfile=/var/run/squid-noads.pid ## hack to suit, again
+zapper=%%PREFIX%%/etc/squirm/squid_redirect ## hack to suit your site
+pidfile=%%PREFIX%%/squid/logs/squid.pid ## hack to suit, again
tmp=/tmp/newzapper$$
-if wget -q --cache=off -O $tmp "$masterurl"
+if %%FETCH_CMD%% -q -o $tmp "$masterurl"
then
[ ! -s "$tmp" ] \
|| cmp -s "$tmp" "$zapper" \
- || ( cat "$tmp" >"$zapper" || exit 1
+ || ( cat "$tmp" | sed -e "s@\|)@\|\.\*)@g" -e "s@(\|@(\.\*\|@g" >"$zapper" || exit 1
+ (cd %%PREFIX%%/etc/squirm && %%PREFIX%%/bin/a2swrap)
[ -s "$pidfile" ] && kill -1 `cat "$pidfile"`
)
fi