aboutsummaryrefslogtreecommitdiffstats
path: root/www/junkbuster
diff options
context:
space:
mode:
Diffstat (limited to 'www/junkbuster')
-rw-r--r--www/junkbuster/Makefile32
-rw-r--r--www/junkbuster/distinfo2
-rw-r--r--www/junkbuster/files/junkbuster.sh.in18
-rw-r--r--www/junkbuster/files/patch-aa27
-rw-r--r--www/junkbuster/files/patch-ag14
-rw-r--r--www/junkbuster/files/patch-al18
-rw-r--r--www/junkbuster/files/patch-an11
-rw-r--r--www/junkbuster/files/patch-jcc.c28
-rw-r--r--www/junkbuster/pkg-descr10
9 files changed, 103 insertions, 57 deletions
diff --git a/www/junkbuster/Makefile b/www/junkbuster/Makefile
index 7cc14132311d..ae35f539aed5 100644
--- a/www/junkbuster/Makefile
+++ b/www/junkbuster/Makefile
@@ -11,13 +11,16 @@
PORTNAME= junkbuster
PORTVERSION= 2.0.2
+PORTREVISION= 1
CATEGORIES= www
-MASTER_SITES= http://www.junkbusters.com/ht/en/
-DISTNAME= ijb20
+MASTER_SITES= http://server44.hypermart.net/f2org/ \
+ http://f2.org/download/ \
+ http://www.junkbusters.com/ht/en/
+DISTNAME= ijb-zlib-10
+EXTRACT_SUFX= .tgz
-MAINTAINER= ian@broken.net
+MAINTAINER= sobomax@FreeBSD.org
-USE_ZIP= yes
ALL_TARGET= # yes, an empty target.
JDIR= ${PREFIX}/etc/junkbuster
MAN1= junkbuster.1
@@ -27,18 +30,19 @@ post-patch:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/junkbuster ${PREFIX}/sbin/junkbuster
- ${MKDIR} -m 755 ${PREFIX}/etc/junkbuster
- ${INSTALL_DATA} ${WRKSRC}/junkbstr.ini ${PREFIX}/etc/junkbuster/configfile.sample
- ${INSTALL_DATA} ${WRKSRC}/sblock.ini ${PREFIX}/etc/junkbuster/blockfile.sample
- ${INSTALL_DATA} ${WRKSRC}/saclfile.ini ${PREFIX}/etc/junkbuster/aclfile.sample
- ${INSTALL_DATA} ${WRKSRC}/scookie.ini ${PREFIX}/etc/junkbuster/cookiefile.sample
- ${INSTALL_DATA} ${WRKSRC}/sforward.ini ${PREFIX}/etc/junkbuster/forwardfile.sample
- ${INSTALL_DATA} ${WRKSRC}/strust.ini ${PREFIX}/etc/junkbuster/trustfile.sample
+ ${MKDIR} -m 755 ${JDIR}
+ ${INSTALL_DATA} ${WRKSRC}/junkbstr.ini ${JDIR}/configfile.sample
+ ${INSTALL_DATA} ${WRKSRC}/sblock.ini ${JDIR}/blockfile.sample
+ ${INSTALL_DATA} ${WRKSRC}/saclfile.ini ${JDIR}/aclfile.sample
+ ${INSTALL_DATA} ${WRKSRC}/scookie.ini ${JDIR}/cookiefile.sample
+ ${INSTALL_DATA} ${WRKSRC}/sforward.ini ${JDIR}/forwardfile.sample
+ ${INSTALL_DATA} ${WRKSRC}/strust.ini ${JDIR}/trustfile.sample
$(INSTALL_MAN) ${WRKSRC}/junkbuster.1 $(PREFIX)/man/man1/
# Create the startup script. JB will run as user nobody.
- @${SED} -e 's%JDIR%${JDIR}%g' -e 's%PREFIX%${PREFIX}%g' \
- ${FILESDIR}/junkbuster.sh.in > ${PREFIX}/etc/rc.d/junkbuster.sh
- ${CHMOD} 755 ${PREFIX}/etc/rc.d/junkbuster.sh
+ @${SED} 's|%%JDIR%%|${JDIR}|g ; s|%%PREFIX%%|${PREFIX}|g' \
+ ${FILESDIR}/junkbuster.sh.in > ${WRKDIR}/junkbuster.sh
+ ${INSTALL_SCRIPT} ${WRKDIR}/junkbuster.sh \
+ ${PREFIX}/etc/rc.d/junkbuster.sh
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/www/junkbuster/distinfo b/www/junkbuster/distinfo
index e5e9b38da8de..dbf6bc9daa01 100644
--- a/www/junkbuster/distinfo
+++ b/www/junkbuster/distinfo
@@ -1 +1 @@
-MD5 (ijb20.zip) = 4a384a649bf7bda12e5c3f8e0b809d08
+MD5 (ijb-zlib-10.tgz) = 3c410f61eeb7e24641fc7eaf3dc5063e
diff --git a/www/junkbuster/files/junkbuster.sh.in b/www/junkbuster/files/junkbuster.sh.in
index e4e4f199ec6f..387ce84eeed6 100644
--- a/www/junkbuster/files/junkbuster.sh.in
+++ b/www/junkbuster/files/junkbuster.sh.in
@@ -1,11 +1,21 @@
#!/bin/sh
+# $CVSHeader$
case $1 in
start)
- test -d JDIR -a -x PREFIX/sbin/junkbuster -a -f JDIR/configfile || exit 1
- cd JDIR
- su -m nobody -c "PREFIX/sbin/junkbuster configfile &"
- echo -n " junkbuster"
+ if [ -d %%JDIR%% \
+ -a -x %%PREFIX%%/sbin/junkbuster \
+ -a -f %%JDIR%%/configfile ]; then
+ : seems OK
+ else
+ echo >&2 "$0: missing files!"
+ exit 1
+ fi
+ cd %%JDIR%%
+ su -m nobody -c "%%PREFIX%%/sbin/junkbuster configfile &" \
+ >/dev/null \
+ && echo -n " junkbuster" \
+ || echo " junkbuster FAILED TO START"
;;
stop)
killall junkbuster && echo -n " junkbuster"
diff --git a/www/junkbuster/files/patch-aa b/www/junkbuster/files/patch-aa
index 08cddfae34e0..59a1478d4e9d 100644
--- a/www/junkbuster/files/patch-aa
+++ b/www/junkbuster/files/patch-aa
@@ -1,20 +1,31 @@
-diff -ruN /usr/ports/www/ijb/work/ijb20/Makefile ./Makefile
---- /usr/ports/www/ijb/work/ijb20/Makefile Mon Feb 28 02:35:10 2000
-+++ ./Makefile Mon Feb 28 02:37:39 2000
-@@ -8,10 +8,11 @@
+--- Makefile.orig Fri Aug 4 15:40:15 2000
++++ Makefile Fri Nov 3 12:23:48 2000
+@@ -5,20 +5,20 @@
+
+ # set include and library paths for the zlib compression library
+ #
+-ZLIB_INC_FLAGS=-I../zlib
+-ZLIB_LIB_FLAGS=-L ../zlib
++#ZLIB_INC_FLAGS=-I../zlib
++#ZLIB_LIB_FLAGS=-L ../zlib
+
+ DEFAULT_CFLAGS = -I. $(ZLIB_INC_FLAGS) $(REGEX) -DSTDC_HEADERS -DHAVE_STRING
+
PROG = junkbuster
O = o
RM = rm -f
-MORE_CFLAGS = -g
+MORE_CFLAGS =
+ LD = $(CC) $(CFLAGS) $(ZLIB_LIB)
+ LDFLAGS = -lz
# use this for Solaris 2.x
- #LDFLAGS = -lnsl -lsocket
+-#LDFLAGS = -lnsl -lsocket -lz
+LDFLAGS += -lgnuregex
# use these for SunOS 4.x
- #LDFLAGS = -nsl
-@@ -47,10 +48,10 @@
+ #LDFLAGS = -nsl -lz
+@@ -63,10 +63,10 @@
#MORE_CFLAGS = -relax_pointers
#LDFLAGS = -map junkbuster.xMAP
@@ -26,4 +37,4 @@ diff -ruN /usr/ports/www/ijb/work/ijb20/Makefile ./Makefile
+ encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) win32.$(O)
$(PROG): $(OBJS)
- $(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
+ $(LD) -o $(PROG) $(ZLIB_LIB_FLAGS) $(OBJS) $(LDFLAGS)
diff --git a/www/junkbuster/files/patch-ag b/www/junkbuster/files/patch-ag
index 7850ba53c513..c8e942b32401 100644
--- a/www/junkbuster/files/patch-ag
+++ b/www/junkbuster/files/patch-ag
@@ -1,7 +1,6 @@
-diff -ruN /usr/ports/www/ijb/work/ijb20/jcc.c ./jcc.c
---- /usr/ports/www/ijb/work/ijb20/jcc.c Mon Feb 28 02:35:10 2000
-+++ ./jcc.c Mon Feb 28 02:31:06 2000
-@@ -39,7 +39,7 @@
+--- jcc.c.orig Fri Nov 3 12:28:39 2000
++++ jcc.c Fri Nov 3 12:31:58 2000
+@@ -39,11 +39,12 @@
#endif
#ifdef REGEX
@@ -10,4 +9,9 @@ diff -ruN /usr/ports/www/ijb/work/ijb20/jcc.c ./jcc.c
#endif
#include "jcc.h"
-Binary files /usr/ports/www/ijb/work/ijb20/junkbuster and ./junkbuster differ
+-#include "zutil.h"
++#include "zlib.h"
++#define DEF_MEM_LEVEL 8
+
+ char *prog;
+
diff --git a/www/junkbuster/files/patch-al b/www/junkbuster/files/patch-al
index 6b78b5f1a731..98010e51f392 100644
--- a/www/junkbuster/files/patch-al
+++ b/www/junkbuster/files/patch-al
@@ -1,12 +1,14 @@
-diff -ruN /usr/ports/www/ijb/work/ijb20/ssplit.c ./ssplit.c
---- /usr/ports/www/ijb/work/ijb20/ssplit.c Mon Feb 28 02:35:10 2000
-+++ ./ssplit.c Mon Feb 28 02:31:06 2000
-@@ -18,6 +18,8 @@
+--- ssplit.c.orig Fri Aug 4 09:39:24 2000
++++ ssplit.c Fri Nov 3 12:24:59 2000
+@@ -22,9 +22,10 @@
* l = flag indicating whether to ignore leading field separators
*/
+#include "loaders.h"
-+#include <stdlib.h>
- #include <string.h>
-
- int ssplit(char *s, char *c, char *v[], int n, int m, int l)
+ #include <stdlib.h> /* For free() */
+ #include <stdio.h> /* Required by jcc.h */
+-#include "gnu_regex.h"
++#include "gnuregex.h"
+ #include "jcc.h" /* For zalloc() */
+ #undef DEBUG /* DEBUG macro use in this file is not */
+ /* consistent with use in jcc.h */
diff --git a/www/junkbuster/files/patch-an b/www/junkbuster/files/patch-an
new file mode 100644
index 000000000000..cc89552a1df2
--- /dev/null
+++ b/www/junkbuster/files/patch-an
@@ -0,0 +1,11 @@
+--- bind.c 2000/11/03 10:27:18 1.1
++++ bind.c 2000/11/03 10:27:22
+@@ -37,7 +37,7 @@
+ #endif
+
+ #ifdef REGEX
+-#include <gnu_regex.h>
++#include <gnuregex.h>
+ #endif
+
+ #include "jcc.h" /* For atoip() */
diff --git a/www/junkbuster/files/patch-jcc.c b/www/junkbuster/files/patch-jcc.c
index d921d4c01faa..ae80b57ac806 100644
--- a/www/junkbuster/files/patch-jcc.c
+++ b/www/junkbuster/files/patch-jcc.c
@@ -1,6 +1,6 @@
---- jcc.c.orig Fri Oct 30 22:58:48 1998
-+++ jcc.c Sat Mar 11 11:42:32 2000
-@@ -96,9 +96,27 @@
+--- jcc.c.orig Sun Sep 23 10:38:37 2001
++++ jcc.c Sun Sep 23 10:39:23 2001
+@@ -100,9 +100,27 @@
char DEFAULT_USER_AGENT[] ="User-Agent: Mozilla/3.01Gold (Macintosh; I; 68K)";
@@ -26,19 +26,19 @@
int hideConsole = 0;
+int tinygif = 0;
- #ifdef _WIN32
- #define sleep(N) Sleep(((N) * 1000))
-@@ -198,6 +216,9 @@
- struct cookie_spec *cs;
- struct gateway *gw;
+ char *logfile = NULL;
+ FILE *logfp;
+@@ -351,6 +369,9 @@
struct http_request *http;
-+ char *my_image_regexp = ".*(\\.gif|\\.jpe?g|\\gif$|\\jpe?g$)";
-+ regex_t my_regexp;
-+ int errcode;
+ char *iob_buf;
+ int iob_len;
++ char *my_image_regexp = ".*(\\.gif|\\.jpe?g|\\gif$|\\jpe?g$)";
++ regex_t my_regexp;
++ int errcode;
- http = csp->http;
-@@ -328,7 +349,21 @@
+ http = csp->http;
+@@ -493,7 +514,21 @@
prog, http->hostport, http->path);
}
@@ -61,7 +61,7 @@
if(DEBUG(LOG)) fwrite(p, strlen(p), 1, logfp);
-@@ -704,6 +739,11 @@
+@@ -926,6 +961,11 @@
if(strcmp(cmd, "debug") == 0) {
debug |= atoi(arg);
diff --git a/www/junkbuster/pkg-descr b/www/junkbuster/pkg-descr
index cb326c9e036d..b26e0be3db54 100644
--- a/www/junkbuster/pkg-descr
+++ b/www/junkbuster/pkg-descr
@@ -2,7 +2,11 @@ This is a port of The Internet Junkbuster Proxy(TM). An excelent way
to enhance your privacy while browsing the web. And it also happens
to do a great job of filtering out all those annoying banner ads!
-WWW: http://www.junkbusters.com/ht/en/ijb.html
+This modified version allows one to specify appearance of blocked GIFs.
+It can automatically compress text/html and text/plain documents for clients
+which support Accept-Encoding: gzip (e.g. Netscape 4.7, Internet Explorer 5,
+Lynx 2.8.3) to save downstream modem/network bandwidth. It uses the zlib
+compression library to perform on-the-fly compression of HTML documents.
-- Ian Struble
-ian@broken.net
+WWW: http://www.junkbusters.com/ht/en/ijb.html
+ http://f2.org/products/ijb-zlib/