diff options
author | Roman Bogorodskiy <novel@FreeBSD.org> | 2006-06-18 04:54:26 +0000 |
---|---|---|
committer | Roman Bogorodskiy <novel@FreeBSD.org> | 2006-06-18 04:54:26 +0000 |
commit | 72e48206fb0f3b024b4bb9d25824133b3102eb06 (patch) | |
tree | 4b5cc83d6b26ee3d2ab0aa00bbef8c663fb9c2c6 /www/havp | |
parent | Update to 0.14 (diff) |
HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The
main aims are continuous, non-blocking downloads and smooth scanning of
dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent
and transparent proxy mode. It can be used with squid or standalone.
WWW: http://www.server-side.de/
PR: ports/99073
Submitted by: Elisey Savateev <b3k@mail.ru>
Notes
Notes:
svn path=/head/; revision=165675
Diffstat (limited to 'www/havp')
-rw-r--r-- | www/havp/Makefile | 43 | ||||
-rw-r--r-- | www/havp/distinfo | 3 | ||||
-rw-r--r-- | www/havp/files/havp.in | 33 | ||||
-rw-r--r-- | www/havp/files/patch-havp_Makefile.in | 34 | ||||
-rw-r--r-- | www/havp/files/pkg-deinstall.in | 16 | ||||
-rw-r--r-- | www/havp/files/pkg-install.in | 51 | ||||
-rw-r--r-- | www/havp/pkg-descr | 6 | ||||
-rw-r--r-- | www/havp/pkg-plist | 126 |
8 files changed, 312 insertions, 0 deletions
diff --git a/www/havp/Makefile b/www/havp/Makefile new file mode 100644 index 000000000000..ccb4a0126a3a --- /dev/null +++ b/www/havp/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: havp +# Date created: 17 June 2006 +# Whom: Elisey Savateev <b3k@mail.ru> +# +# $FreeBSD$ +# + +PORTNAME= havp +PORTVERSION= 0.81 +CATEGORIES= www +MASTER_SITES= http://www.server-side.de/download/ \ + http://bio3k.softboard.ru/uploads/arch/ + +MAINTAINER= b3k@mail.ru +COMMENT= HTTP Antivirus Proxy + +LIB_DEPENDS= clamav.1:${PORTSDIR}/security/clamav + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_RC_SUBR= havp + +LOG_DIR= /var/log/havp +TMP_DIR= /var/tmp/havp +RUN_DIR= /var/run/havp +PLIST_SUB+= LOG_DIR=${LOG_DIR} TMP_DIR=${TMP_DIR} RUN_DIR=${RUN_DIR} + +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST= LOG_DIR=${LOG_DIR} TMP_DIR=${TMP_DIR} RUN_DIR=${RUN_DIR} + +pre-install: + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +post-install: + @[ -f ${PREFIX}/etc/havp/havp.config ] || \ + ${CP} -p ${PREFIX}/etc/havp/havp.config.default ${PREFIX}/etc/havp/havp.config + @${MKDIR} ${EXAMPLESDIR} + @${CP} ${WRKSRC}/etc/havp/blacklist ${EXAMPLESDIR}/blacklist.sample + @${CP} -R ${WRKSRC}/etc/havp/templates ${EXAMPLESDIR} + @${CP} ${WRKSRC}/etc/havp/whitelist ${EXAMPLESDIR}/whitelist.sample + @${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL + +.include <bsd.port.mk> diff --git a/www/havp/distinfo b/www/havp/distinfo new file mode 100644 index 000000000000..d094e83f7943 --- /dev/null +++ b/www/havp/distinfo @@ -0,0 +1,3 @@ +MD5 (havp-0.81.tar.gz) = 248a0020cca73ca8833e6e0090af4302 +SHA256 (havp-0.81.tar.gz) = ec1fe99858b79a9f440569ce353b2eba5bcba0920a092025d26df35d63941a77 +SIZE (havp-0.81.tar.gz) = 104299 diff --git a/www/havp/files/havp.in b/www/havp/files/havp.in new file mode 100644 index 000000000000..69285a88a9ed --- /dev/null +++ b/www/havp/files/havp.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: havp +# REQUIRE: DAEMON cleanvar +# BEFORE: LOGIN + +# +# Add the following lines to /etc/rc.conf to enable c-icap: +# +# havp_enable="YES" +# +# See '%%PREFIX%%/sbin/havp --help' for flags +# + +. %%RC_SUBR%% + +name="havp" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/$name" +pidfile="%%RUN_DIR%%/${name}.pid" +required_dirs="%%TMP_DIR%%" +required_files="%%PREFIX%%/etc/havp/blacklist %%PREFIX%%/etc/havp/havp.config %%PREFIX%%/etc/havp/whitelist" + +# read settings, set default values +load_rc_config "$name" +: ${havp_enable="NO"} +: ${havp_flags=""} + +run_rc_command "$1" diff --git a/www/havp/files/patch-havp_Makefile.in b/www/havp/files/patch-havp_Makefile.in new file mode 100644 index 000000000000..2a96281e8854 --- /dev/null +++ b/www/havp/files/patch-havp_Makefile.in @@ -0,0 +1,34 @@ +--- havp/Makefile.in.bak Sun Apr 23 18:31:11 2006 ++++ havp/Makefile.in Sat Jun 17 12:12:17 2006 +@@ -26,31 +26,7 @@ + install: all + $(INSTALL) -d $(sbindir) + $(INSTALL) -s -m 755 havp $(sbindir)/havp +- $(INSTALL) -d -m 755 /var/log/havp/ +- $(INSTALL) -d -m 755 /var/tmp/havp/ +- $(INSTALL) -d -m 755 /var/run/havp/ +- $(INSTALL) -d /etc/init.d +- $(INSTALL) -m 755 ../etc/init.d/havp /etc/init.d/ + $(INSTALL) -m 644 ../etc/havp/havp.config $(etcdir)/havp/havp.config.default +- @if [ ! -f $(etcdir)/havp/havp.config ]; then \ +- $(INSTALL) -m 644 ../etc/havp/havp.config $(etcdir)/havp/havp.config; \ +- else \ +- ../update-conf $(etcdir)/havp/havp.config; \ +- fi +- @if [ ! -f $(etcdir)/havp/whitelist ]; then \ +- $(INSTALL) -m 644 ../etc/havp/whitelist $(etcdir)/havp/whitelist; \ +- fi +- @if [ ! -f $(etcdir)/havp/blacklist ]; then \ +- $(INSTALL) -m 644 ../etc/havp/blacklist $(etcdir)/havp/blacklist; \ +- fi +- cp -r ../etc/havp/templates $(etcdir)/havp +- chmod -R a+rX $(etcdir)/havp/templates +- @echo "" +- @echo "Remember to give correct permissions:" +- @echo " chown <havpuser> /var/tmp/havp (after mounting if needed)" +- @echo " chown <havpuser> /var/log/havp" +- @echo " chown <havpuser> /var/run/havp" +- @echo "" + + clean: + rm -f havp *.o scanners/*.o diff --git a/www/havp/files/pkg-deinstall.in b/www/havp/files/pkg-deinstall.in new file mode 100644 index 000000000000..4338bcc9642f --- /dev/null +++ b/www/havp/files/pkg-deinstall.in @@ -0,0 +1,16 @@ +#!/bin/sh +# $FreeBSD$ + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +HAVP_USER=havp + +if pw usershow "$HAVP_USER" 2>/dev/null 1>&2; then + echo "==============================================================================" + echo "To delete $HAVP_USER user permanently, use 'pw userdel \"$HAVP_USER\"'" + echo "==============================================================================" +fi + +exit 0 diff --git a/www/havp/files/pkg-install.in b/www/havp/files/pkg-install.in new file mode 100644 index 000000000000..f84758aa9366 --- /dev/null +++ b/www/havp/files/pkg-install.in @@ -0,0 +1,51 @@ +#!/bin/sh +# $FreeBSD$ + +DEST_DIR=${PKG_DESTDIR:-} + +HAVP_USER=havp +HAVP_GROUP=havp + +LOG_DIR=$DEST_DIR%%LOG_DIR%% +TMP_DIR=$DEST_DIR%%TMP_DIR%% +RUN_DIR=$DEST_DIR%%RUN_DIR%% + +if [ "$2" = "PRE-INSTALL" ]; then + if ! pw groupshow "$HAVP_GROUP" 2>/dev/null 1>&2; then + if pw groupadd $HAVP_GROUP; then + echo "=> Added group \"$HAVP_GROUP\"." + else + echo "=> Adding group \"$HAVP_GROUP\" failed..." + exit 1 + fi + fi + + if ! pw usershow "$HAVP_USER" 2>/dev/null 1>&2; then + if pw useradd $HAVP_USER -g $HAVP_GROUP -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "havp daemon"; \ + then + echo "=> Added user \"$HAVP_USER\"." + else + echo "=> Adding user \"$HAVP_USER\" failed..." + exit 1 + fi + fi +elif [ "$2" = "POST-INSTALL" ]; then + if [ ! -d "$LOG_DIR" ]; then + mkdir -p "$LOG_DIR" || exit 1 + chown "$HAVP_USER:$HAVP_GROUP" "$LOG_DIR" || exit 1 + fi + + if [ ! -d "$TMP_DIR" ]; then + mkdir -p "$TMP_DIR" || exit 1 + chown "$HAVP_USER:$HAVP_GROUP" "$TMP_DIR" || exit 1 + fi + + if [ ! -d "$RUN_DIR" ]; then + mkdir -p "$RUN_DIR" || exit 1 + chown "$HAVP_USER:$HAVP_GROUP" "$RUN_DIR" || exit 1 + fi +fi + +exit 0 diff --git a/www/havp/pkg-descr b/www/havp/pkg-descr new file mode 100644 index 000000000000..08d519ecd71b --- /dev/null +++ b/www/havp/pkg-descr @@ -0,0 +1,6 @@ +HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The +main aims are continuous, non-blocking downloads and smooth scanning of +dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent +and transparent proxy mode. It can be used with squid or standalone. + +WWW: http://www.server-side.de/ diff --git a/www/havp/pkg-plist b/www/havp/pkg-plist new file mode 100644 index 000000000000..213dc520e7c2 --- /dev/null +++ b/www/havp/pkg-plist @@ -0,0 +1,126 @@ +@comment $FreeBSD$ +sbin/havp +@unexec if cmp -s %D/etc/havp/havp.config %D/etc/havp/havp.config.default; then rm -f %D/etc/havp/havp.config; fi +etc/havp/havp.config.default +@exec [ -f %B/havp.config ] || cp %B/%f %B/havp.config +@dirrmtry etc/havp +@unexec [ ! -f %%RUN_DIR%%/havp.pid ] || %D/etc/rc.d/havp stop +%%EXAMPLESDIR%%/blacklist.sample +%%EXAMPLESDIR%%/templates/br/blacklist.html +%%EXAMPLESDIR%%/templates/br/dns.html +%%EXAMPLESDIR%%/templates/br/down.html +%%EXAMPLESDIR%%/templates/br/error.html +%%EXAMPLESDIR%%/templates/br/invalid.html +%%EXAMPLESDIR%%/templates/br/maxsize.html +%%EXAMPLESDIR%%/templates/br/request.html +%%EXAMPLESDIR%%/templates/br/scanner.html +%%EXAMPLESDIR%%/templates/br/virus.html +@dirrm %%EXAMPLESDIR%%/templates/br +%%EXAMPLESDIR%%/templates/css2/havp.css +@dirrm %%EXAMPLESDIR%%/templates/css2 +%%EXAMPLESDIR%%/templates/de/blacklist.html +%%EXAMPLESDIR%%/templates/de/dns.html +%%EXAMPLESDIR%%/templates/de/down.html +%%EXAMPLESDIR%%/templates/de/error.html +%%EXAMPLESDIR%%/templates/de/invalid.html +%%EXAMPLESDIR%%/templates/de/maxsize.html +%%EXAMPLESDIR%%/templates/de/request.html +%%EXAMPLESDIR%%/templates/de/scanner.html +%%EXAMPLESDIR%%/templates/de/virus.html +@dirrm %%EXAMPLESDIR%%/templates/de +%%EXAMPLESDIR%%/templates/en/blacklist.html +%%EXAMPLESDIR%%/templates/en/dns.html +%%EXAMPLESDIR%%/templates/en/down.html +%%EXAMPLESDIR%%/templates/en/error.html +%%EXAMPLESDIR%%/templates/en/invalid.html +%%EXAMPLESDIR%%/templates/en/maxsize.html +%%EXAMPLESDIR%%/templates/en/request.html +%%EXAMPLESDIR%%/templates/en/scanner.html +%%EXAMPLESDIR%%/templates/en/virus.html +@dirrm %%EXAMPLESDIR%%/templates/en +%%EXAMPLESDIR%%/templates/es/blacklist.html +%%EXAMPLESDIR%%/templates/es/dns.html +%%EXAMPLESDIR%%/templates/es/down.html +%%EXAMPLESDIR%%/templates/es/error.html +%%EXAMPLESDIR%%/templates/es/invalid.html +%%EXAMPLESDIR%%/templates/es/maxsize.html +%%EXAMPLESDIR%%/templates/es/request.html +%%EXAMPLESDIR%%/templates/es/scanner.html +%%EXAMPLESDIR%%/templates/es/virus.html +@dirrm %%EXAMPLESDIR%%/templates/es +%%EXAMPLESDIR%%/templates/fr/blacklist.html +%%EXAMPLESDIR%%/templates/fr/dns.html +%%EXAMPLESDIR%%/templates/fr/down.html +%%EXAMPLESDIR%%/templates/fr/error.html +%%EXAMPLESDIR%%/templates/fr/invalid.html +%%EXAMPLESDIR%%/templates/fr/maxsize.html +%%EXAMPLESDIR%%/templates/fr/request.html +%%EXAMPLESDIR%%/templates/fr/scanner.html +%%EXAMPLESDIR%%/templates/fr/virus.html +@dirrm %%EXAMPLESDIR%%/templates/fr +%%EXAMPLESDIR%%/templates/it/blacklist.html +%%EXAMPLESDIR%%/templates/it/dns.html +%%EXAMPLESDIR%%/templates/it/down.html +%%EXAMPLESDIR%%/templates/it/error.html +%%EXAMPLESDIR%%/templates/it/invalid.html +%%EXAMPLESDIR%%/templates/it/maxsize.html +%%EXAMPLESDIR%%/templates/it/request.html +%%EXAMPLESDIR%%/templates/it/scanner.html +%%EXAMPLESDIR%%/templates/it/virus.html +@dirrm %%EXAMPLESDIR%%/templates/it +%%EXAMPLESDIR%%/templates/nl/blacklist.html +%%EXAMPLESDIR%%/templates/nl/dns.html +%%EXAMPLESDIR%%/templates/nl/down.html +%%EXAMPLESDIR%%/templates/nl/error.html +%%EXAMPLESDIR%%/templates/nl/invalid.html +%%EXAMPLESDIR%%/templates/nl/maxsize.html +%%EXAMPLESDIR%%/templates/nl/request.html +%%EXAMPLESDIR%%/templates/nl/scanner.html +%%EXAMPLESDIR%%/templates/nl/virus.html +@dirrm %%EXAMPLESDIR%%/templates/nl +%%EXAMPLESDIR%%/templates/pf/blacklist.html +%%EXAMPLESDIR%%/templates/pf/dns.html +%%EXAMPLESDIR%%/templates/pf/down.html +%%EXAMPLESDIR%%/templates/pf/error.html +%%EXAMPLESDIR%%/templates/pf/invalid.html +%%EXAMPLESDIR%%/templates/pf/maxsize.html +%%EXAMPLESDIR%%/templates/pf/request.html +%%EXAMPLESDIR%%/templates/pf/scanner.html +%%EXAMPLESDIR%%/templates/pf/virus.html +@dirrm %%EXAMPLESDIR%%/templates/pf +%%EXAMPLESDIR%%/templates/pl/blacklist.html +%%EXAMPLESDIR%%/templates/pl/dns.html +%%EXAMPLESDIR%%/templates/pl/down.html +%%EXAMPLESDIR%%/templates/pl/error.html +%%EXAMPLESDIR%%/templates/pl/invalid.html +%%EXAMPLESDIR%%/templates/pl/maxsize.html +%%EXAMPLESDIR%%/templates/pl/request.html +%%EXAMPLESDIR%%/templates/pl/scanner.html +%%EXAMPLESDIR%%/templates/pl/virus.html +@dirrm %%EXAMPLESDIR%%/templates/pl +%%EXAMPLESDIR%%/templates/ru/blacklist.html +%%EXAMPLESDIR%%/templates/ru/dns.html +%%EXAMPLESDIR%%/templates/ru/down.html +%%EXAMPLESDIR%%/templates/ru/error.html +%%EXAMPLESDIR%%/templates/ru/invalid.html +%%EXAMPLESDIR%%/templates/ru/maxsize.html +%%EXAMPLESDIR%%/templates/ru/request.html +%%EXAMPLESDIR%%/templates/ru/scanner.html +%%EXAMPLESDIR%%/templates/ru/virus.html +@dirrm %%EXAMPLESDIR%%/templates/ru +%%EXAMPLESDIR%%/templates/sv/blacklist.html +%%EXAMPLESDIR%%/templates/sv/dns.html +%%EXAMPLESDIR%%/templates/sv/down.html +%%EXAMPLESDIR%%/templates/sv/error.html +%%EXAMPLESDIR%%/templates/sv/invalid.html +%%EXAMPLESDIR%%/templates/sv/maxsize.html +%%EXAMPLESDIR%%/templates/sv/request.html +%%EXAMPLESDIR%%/templates/sv/scanner.html +%%EXAMPLESDIR%%/templates/sv/virus.html +@dirrm %%EXAMPLESDIR%%/templates/sv +@dirrm %%EXAMPLESDIR%%/templates +%%EXAMPLESDIR%%/whitelist.sample +@dirrm %%EXAMPLESDIR%% +@unexec rmdir %%LOG_DIR%% 2>/dev/null || true +@unexec rmdir %%TMP_DIR%% 2>/dev/null || true +@unexec rmdir %%RUN_DIR%% 2>/dev/null || true |