diff options
author | Cy Schubert <cy@FreeBSD.org> | 2002-03-28 02:25:13 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2002-03-28 02:25:13 +0000 |
commit | a2edf7fc8d48342093258f3cae8c9e1760bd5e43 (patch) | |
tree | 624d87ba75be5c748a56be75ef653eaef290cc08 | |
parent | No longer need to explicitly provide a GNU autconf target. (diff) |
Add dansguardian 2.2.7.1, a fast, simple web content filter for
Squid proxy servers.
PR: 35382
Submitted by: Freddie Cash <fcash@bigfoot.com>
Notes
Notes:
svn path=/head/; revision=56767
Diffstat (limited to '')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/dansguardian/Makefile | 55 | ||||
-rw-r--r-- | www/dansguardian/distinfo | 1 | ||||
-rw-r--r-- | www/dansguardian/files/patch-ConnectionHandler.cpp | 12 | ||||
-rw-r--r-- | www/dansguardian/files/patch-autoconf::fbsd.in | 74 | ||||
-rw-r--r-- | www/dansguardian/files/patch-configure | 85 | ||||
-rw-r--r-- | www/dansguardian/files/patch-dansguardian.8 | 11 | ||||
-rw-r--r-- | www/dansguardian/pkg-comment | 1 | ||||
-rw-r--r-- | www/dansguardian/pkg-descr | 20 | ||||
-rw-r--r-- | www/dansguardian/pkg-plist | 17 |
10 files changed, 277 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 28c7a409ceb1..f57efc744d8a 100644 --- a/www/Makefile +++ b/www/Makefile @@ -50,6 +50,7 @@ SUBDIR += comline SUBDIR += crawl SUBDIR += css-mode.el + SUBDIR += dansguardian SUBDIR += decss SUBDIR += demoroniser SUBDIR += dillo diff --git a/www/dansguardian/Makefile b/www/dansguardian/Makefile new file mode 100644 index 000000000000..12832927b754 --- /dev/null +++ b/www/dansguardian/Makefile @@ -0,0 +1,55 @@ +# New ports collection makefile for: dansguardian +# Date created: March 26, 2002 +# Whom: Freddie Cash <fcash@bigfoot.com> +# +# $FreeBSD$ +# + +PORTNAME= dansguardian +PORTVERSION= 2.2.7.1 +CATEGORIES= www +MASTER_SITES= # empty, see below +DISTNAME= DansGuardian-2.2.7-1.source + +MAINTAINER= fcash@bigfoot.com + +RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid24:install \ + ${LOCALBASE}/sbin/httpd:${PORTSDIR}/www/apache13:install + +WRKSRC= ${WRKDIR}/DansGuardian-2.2.7 +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} \ + --bindir=/sbin/ \ + --sysconfdir=/etc/dansguardian/ \ + --sysvdir=/etc/rc.d/ \ + --mandir=/man/ \ + --logdir=/squid/logs/ \ + --cgidir=/www/cgi-bin/ \ + --piddir=/var/run/ + +DG_URL= http://dansguardian.org/index.php?page=copyright2 + +.if defined(WITHOUT_PICS) +CONFIGURE_ARGS+= --without-pics-filter +.endif + +MAN8= dansguardian.8 +MANCOMPRESSED= no + +NO_CDROM= "Commercial download is restricted. Check ${DG_URL} for more info" +NO_PACKAGE= "Redistribution is restricted. Check ${DG_URL} for more info" + +do-fetch: + @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \ + ${ECHO} ""; \ + ${ECHO} " Commercial downloading is restricted. Please read"; \ + ${ECHO} " the licensing info at ${DG_URL}"; \ + ${ECHO} ""; \ + ${ECHO} " The DansGuardian sources must be fetched manually."; \ + ${ECHO} " Download ${DISTNAME}${EXTRACT_SUFX} and place it in";\ + ${ECHO} " ${DISTDIR} then run make install.";\ + ${ECHO} "";\ + ${FALSE};\ + fi + +.include <bsd.port.mk> diff --git a/www/dansguardian/distinfo b/www/dansguardian/distinfo new file mode 100644 index 000000000000..37e727b7bc3a --- /dev/null +++ b/www/dansguardian/distinfo @@ -0,0 +1 @@ +MD5 (DansGuardian-2.2.7-1.source.tar.gz) = f2157a54a2a07d78323e2cc64072ff6e diff --git a/www/dansguardian/files/patch-ConnectionHandler.cpp b/www/dansguardian/files/patch-ConnectionHandler.cpp new file mode 100644 index 000000000000..493611d4d5b3 --- /dev/null +++ b/www/dansguardian/files/patch-ConnectionHandler.cpp @@ -0,0 +1,12 @@ +--- ConnectionHandler.cpp.orig Tue Mar 26 08:22:34 2002 ++++ ConnectionHandler.cpp Tue Mar 26 08:25:12 2002 +@@ -293,7 +293,9 @@ + + checkme.checkphrase(docbodyblock, dblen, options); + ++#ifndef WITHOUT_PICS_FILTER + checkme.checkPICS(docbodyblock, dblen, options); ++#endif + } catch (exception& e) {} + delete[] docbodyblock; + } diff --git a/www/dansguardian/files/patch-autoconf::fbsd.in b/www/dansguardian/files/patch-autoconf::fbsd.in new file mode 100644 index 000000000000..46a0d1c638f8 --- /dev/null +++ b/www/dansguardian/files/patch-autoconf::fbsd.in @@ -0,0 +1,74 @@ +--- autoconf/fbsd.in.orig Thu Mar 14 16:54:40 2002 ++++ autoconf/fbsd.in Tue Mar 26 09:29:25 2002 +@@ -17,7 +17,7 @@ + dansguardian.conf config.cache Makefile logrotation + + PASSVARS = -DPROXYUSER=\"${PROXYUSER}\" +-PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}access.log\" ++PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}dansguardian.log\" + PASSVARS += -DCONFFILELOCATION=\"${CONFFILELOCATION}dansguardian.conf\" + PASSVARS += -DPIDDIR=\"${PIDDIR}\" + +@@ -29,7 +29,7 @@ + + + CFLAGS = $(OPTIMISE) $(WARNING) +-DGCFLAGS = $(OPTIMISE) $(PASSVARS) -lz $(STATIC) ++DGCFLAGS = $(OPTIMISE) $(PASSVARS) $(PICS_FLAG) -lz $(STATIC) + + .cpp.o: + $(CPP) $(DEBUG) $(CFLAGS) -c $< +@@ -44,26 +44,24 @@ + @test -d $(MANUALFILES)man8/ || install -d $(MANUALFILES)man8/ + @test -d $(LOGLOCATION) || install -d $(LOGLOCATION) + @test -d $(BINARYLOCATION) || /usr/sbin/install -d $(BINARYLOCATION) +- cp -f ./dansguardian $(BINARYLOCATION)dansguardian +- cp -f ./dansguardian.conf $(CONFFILELOCATION)dansguardian.conf +- cp -f ./bannedphraselist $(CONFFILELOCATION)bannedphraselist +- cp -f ./bannedextensionlist $(CONFFILELOCATION)bannedextensionlist +- cp -f ./bannedmimetypelist $(CONFFILELOCATION)bannedmimetypelist +- cp -f ./bannedurllist $(CONFFILELOCATION)bannedurllist +- cp -f ./bannedregexpurllist $(CONFFILELOCATION)bannedregexpurllist +- cp -f ./bannedsitelist $(CONFFILELOCATION)bannedsitelist +- cp -f ./exceptionsitelist $(CONFFILELOCATION)exceptionsitelist +- cp -f ./exceptionuserlist $(CONFFILELOCATION)exceptionuserlist +- cp -f ./exceptioniplist $(CONFFILELOCATION)exceptioniplist +- cp -f ./pics $(CONFFILELOCATION)pics +- cp -f ./logrotation $(CONFFILELOCATION)logrotation +- cp -f ./dansguardian.bsdv $(SYSVLOCATION)dansguardian.sh +- cp -f ./dansguardian.pl $(CGIBINLOCATION)dansguardian.pl +- chmod o+x $(CGIBINLOCATION)dansguardian.pl +- cp -f ./dansguardian.8.gz $(MANUALFILES)man8/dansguardian.8.gz +- chown -R $(PROXYUSER).$(PROXYGROUP) $(LOGLOCATION) +- chmod -R u+wr $(LOGLOCATION) +- chmod u+wrx $(LOGLOCATION) ++ @install -m 755 -o root -g wheel ./dansguardian $(BINARYLOCATION)dansguardian ++ @install -m 644 -o root -g wheel ./dansguardian.conf $(CONFFILELOCATION)dansguardian.conf ++ @install -m 644 -o root -g wheel ./bannedphraselist $(CONFFILELOCATION)bannedphraselist ++ @install -m 644 -o root -g wheel ./bannedextensionlist $(CONFFILELOCATION)bannedextensionlist ++ @install -m 644 -o root -g wheel ./bannedmimetypelist $(CONFFILELOCATION)bannedmimetypelist ++ @install -m 644 -o root -g wheel ./bannedurllist $(CONFFILELOCATION)bannedurllist ++ @install -m 644 -o root -g wheel ./bannedregexpurllist $(CONFFILELOCATION)bannedregexpurllist ++ @install -m 644 -o root -g wheel ./bannedsitelist $(CONFFILELOCATION)bannedsitelist ++ @install -m 644 -o root -g wheel ./exceptionsitelist $(CONFFILELOCATION)exceptionsitelist ++ @install -m 644 -o root -g wheel ./exceptionuserlist $(CONFFILELOCATION)exceptionuserlist ++ @install -m 644 -o root -g wheel ./exceptioniplist $(CONFFILELOCATION)exceptioniplist ++ @install -m 644 -o root -g wheel ./pics $(CONFFILELOCATION)pics ++ @install -m 755 -o root -g wheel ./logrotation $(CONFFILELOCATION)logrotation ++ @install -m 755 -o root -g wheel ./dansguardian.bsdv $(SYSVLOCATION)dansguardian.sh ++ @install -m 755 -o root -g wheel ./dansguardian.pl $(CGIBINLOCATION)dansguardian.pl ++ @install -m 644 -o root -g wheel ./dansguardian.8 $(MANUALFILES)man8/dansguardian.8 ++ @touch $(LOGLOCATION)dansguardian.log ++ @chown $(PROXYUSER):$(PROXYGROUP) $(LOGLOCATION)dansguardian.log + + uninstall: + rm -f $(BINARYLOCATION)dansguardian +@@ -71,7 +69,7 @@ + rm -f $(CGIBINLOCATION)dansguardian.pl + rm -f $(MANUALFILES)man8/dansguardian.8.gz + rm -fr $(CONFFILELOCATION) +- rm -fr $(LOGLOCATION) ++ rm -f $(LOGLOCATION)dansguardian.log + + clean: + rm -f $(OBJ) $(PROG) diff --git a/www/dansguardian/files/patch-configure b/www/dansguardian/files/patch-configure new file mode 100644 index 000000000000..bbef89706147 --- /dev/null +++ b/www/dansguardian/files/patch-configure @@ -0,0 +1,85 @@ +--- configure.orig Thu Mar 14 16:54:40 2002 ++++ configure Tue Mar 26 08:58:45 2002 +@@ -43,6 +43,7 @@ + mandir='/usr/man/' + logdir='/var/log/dansguardian/' + piddir='/var/run/' ++with_pics_filter="yes" + + + case `uname -s` in +@@ -112,7 +113,10 @@ + --runas_usr=USER run as user DEFAULT [$runas_usr] + --runas_grp=GROUP run as group DEFAULT [$runas_grp] + --piddir=DIR pid file in DIR [$piddir] (ignores prefix) + --prefix=DIR prefix root path DEFAULT [$prefixdir] (no trailing /) ++Features and packages: ++ --without-pics-filter Disables PICS/ICRA filtering ++ + Do not forget the heading *and* trailing / except for prefix which only needs + a heading / + EOF +@@ -2668,6 +2672,13 @@ + echo "PROXYGROUP = $runas_grp" >>Makefile + echo "PIDDIR = $piddir" >>Makefile + ++case "${with_pics_filter}" in ++ no) ++ $extendedecho " Turning off PICS/ICRA filtering." ++ $extendedecho "\n\${PICS_FLAG} = -DWITHOUT_PICS_FILTER" >> Makefile ++ ;; ++esac ++ + case `uname -s` in + SunOS*) + echo "#undef __BSD" >autoconf/platform.h +@@ -2740,31 +2751,24 @@ + chmod u+x dansguardian.bsdv + ;; + FreeBSD*) +- if [ -f dansguardian.bsdv ]; then +- rm -f dansguardian.bsdv +- fi +- cat autoconf/bsdv.in > dansguardian.bsdv +- $extendedecho " [ -x $prefixdir$bindir\c" >> dansguardian.bsdv +- $extendedecho "dansguardian ] && $prefixdir$bindir\c" >> dansguardian.bsdv +- echo "dansguardian > /dev/null && $extendedecho ' dansguardian\c'" >> dansguardian.bsdv +- echo " ;;" >> dansguardian.bsdv +- echo "stop)" >> dansguardian.bsdv +- $extendedecho " $prefixdir$bindir\c" >> dansguardian.bsdv +- echo "dansguardian -q" >> dansguardian.bsdv +- $extendedecho " [ -r /tmp/\c" >> dansguardian.bsdv +- echo ".dguardianipc ] && $extendedecho ' dansguardian\c'" >> dansguardian.bsdv +- echo " rm -f /tmp/.dguardianipc" >> dansguardian.bsdv +- echo " ;;" >> dansguardian.bsdv +- echo "restart)" >> dansguardian.bsdv +- echo " \$0 stop" >> dansguardian.bsdv +- echo " \$0 start" >> dansguardian.bsdv +- echo " ;;" >> dansguardian.bsdv +- echo "*)" >> dansguardian.bsdv +- echo " echo \"Usage: `basename \$0` {start|stop|restart}\" >&2" >> dansguardian.bsdv +- echo " ;;" >> dansguardian.bsdv +- echo "esac" >> dansguardian.bsdv +- echo "exit 0" >> dansguardian.bsdv +- chmod u+x dansguardian.bsdv ++ cat autoconf/bsdv.in > dansguardian.bsdv ++ $extendedecho "\t[ -x /usr/local/sbin/dansguardian ] && /usr/local/sbin/dansguardian > /dev/null && echo -n \" dansguardian\"" >> dansguardian.bsdv ++ $extendedecho "\t;;" >> dansguardian.bsdv ++ $extendedecho "stop)" >> dansguardian.bsdv ++ $extendedecho "\t/usr/local/sbin/dansguardian -q" >> dansguardian.bsdv ++ $extendedecho "\t[ -r /tmp/.dguardianipc ] && echo -n \" dansguardian\"" >> dansguardian.bsdv ++ $extendedecho "\trm -f /tmp/.dguardianipc" >> dansguardian.bsdv ++ $extendedecho "\t;;" >> dansguardian.bsdv ++ $extendedecho "restart)" >> dansguardian.bsdv ++ $extendedecho "\t\$0 stop" >> dansguardian.bsdv ++ $extendedecho "\t\$0 start" >> dansguardian.bsdv ++ $extendedecho "\t;;" >> dansguardian.bsdv ++ $extendedecho "*)" >> dansguardian.bsdv ++ $extendedecho "\techo \"Usage: \$0 {start|stop|restart}\" >&2" >> dansguardian.bsdv ++ $extendedecho "\t;;" >> dansguardian.bsdv ++ $extendedecho "esac" >> dansguardian.bsdv ++ $extendedecho "exit 0" >> dansguardian.bsdv ++ + ;; + Linux*) + if [ -f dansguardian.sysv ]; then diff --git a/www/dansguardian/files/patch-dansguardian.8 b/www/dansguardian/files/patch-dansguardian.8 new file mode 100644 index 000000000000..f2e3d60e8c3e --- /dev/null +++ b/www/dansguardian/files/patch-dansguardian.8 @@ -0,0 +1,11 @@ +--- dansguardian.8.orig Tue Mar 26 09:03:19 2002 ++++ dansguardian.8 Tue Mar 26 09:03:25 2002 +@@ -3,7 +3,7 @@ + .SH NAME + DansGuardian 2 + .SH SYNOPSIS +-/etc/rc.d/init.d/dansguardian [stop|start|status|restart] ++/usr/local/etc/rc.d/dansguardian.sh [stop|start|restart] + .SH DESCRIPTION + A Introduction + diff --git a/www/dansguardian/pkg-comment b/www/dansguardian/pkg-comment new file mode 100644 index 000000000000..20dd2dfe4b92 --- /dev/null +++ b/www/dansguardian/pkg-comment @@ -0,0 +1 @@ +A fast, simple web content filter for Squid proxy servers diff --git a/www/dansguardian/pkg-descr b/www/dansguardian/pkg-descr new file mode 100644 index 000000000000..7b797234eca6 --- /dev/null +++ b/www/dansguardian/pkg-descr @@ -0,0 +1,20 @@ +DansGuardian is a web content filtering proxy for Linux, FreeBSD, OpenBSD, +and Solaris. It relies on a proxy server, such as Squid, for all fetching; +however, DansGuardian should work with any proxy server. + +It filters using multiple methods, including: + - URL and domain filtering + - content phrase filtering + - PICS filtering + - MIME filtering + - file extension filtering + - POST filtering + +Running make with WITHOUT_PICS=yes will disable the PICS filtering. All +other filtering is controlled via the configuration file. + +WWW: http://dansguardian.org +WWW: http://backup.dansguardian.org + +- Freddie Cash +fcash@bigfoot.com diff --git a/www/dansguardian/pkg-plist b/www/dansguardian/pkg-plist new file mode 100644 index 000000000000..2a3909ca830d --- /dev/null +++ b/www/dansguardian/pkg-plist @@ -0,0 +1,17 @@ +@exec mkdir -p etc/dansguardian +etc/dansguardian/dansguardian.conf +etc/dansguardian/bannedphraselist +etc/dansguardian/bannedextensionlist +etc/dansguardian/bannedmimetypelist +etc/dansguardian/bannedurllist +etc/dansguardian/bannedregexpurllist +etc/dansguardian/bannedsitelist +etc/dansguardian/exceptionsitelist +etc/dansguardian/exceptionuserlist +etc/dansguardian/exceptioniplist +etc/dansguardian/pics +etc/dansguardian/logrotation +sbin/dansguardian +squid/logs/dansguardian.log +www/cgi-bin/dansguardian.pl +@dirrm etc/dansguardian |