diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/ziproxy/Makefile | 74 | ||||
-rw-r--r-- | www/ziproxy/distinfo | 3 | ||||
-rw-r--r-- | www/ziproxy/files/patch-ziproxy.conf | 39 | ||||
-rw-r--r-- | www/ziproxy/files/pkg-message.in | 16 | ||||
-rw-r--r-- | www/ziproxy/files/ziproxy.in | 30 | ||||
-rw-r--r-- | www/ziproxy/pkg-descr | 6 | ||||
-rw-r--r-- | www/ziproxy/pkg-plist | 11 |
8 files changed, 180 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index efae7abb96a3..aa2bd0ee8438 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1115,6 +1115,7 @@ SUBDIR += yabb SUBDIR += yaws SUBDIR += zerowait-httpd + SUBDIR += ziproxy SUBDIR += znavigator SUBDIR += zope SUBDIR += zope28 diff --git a/www/ziproxy/Makefile b/www/ziproxy/Makefile new file mode 100644 index 000000000000..45ce9da31ae2 --- /dev/null +++ b/www/ziproxy/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: ziproxy +# Date created: 2006-07-28 +# Whom: Pankov Pavel <pankov_p@mail.ru> +# +# $FreeBSD$ + +PORTNAME= ziproxy +PORTVERSION= 2.1.0 +CATEGORIES= www +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= pankov_p@mail.ru +COMMENT= A forwarding, non-caching, compressing proxy server + +LIB_DEPENDS= ungif.5:${PORTSDIR}/graphics/libungif \ + png.5:${PORTSDIR}/graphics/png \ + jpeg.9:${PORTSDIR}/graphics/jpeg \ + confuse.0:${PORTSDIR}/devel/libconfuse + +USE_BZIP2= yes +USE_GCC= 3.2+ +USE_GETOPT_LONG= yes + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +ERRORFILES= 400.html 404.html 408.html 500.html 503.html + +CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --enable-shared-confuse --with-cfgfile=${PREFIX}/etc/ziproxy.conf + +.if !defined(NOPORTDOCS) +PORTDOCS= README +.endif + +USE_RC_SUBR= ziproxy + +SUB_FILES+= pkg-message + +.include <bsd.port.pre.mk> + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${WRKSRC}/etc/ziproxy.conf + @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \ + ${WRKSRC}/etc/ziproxy.conf + + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \ + ${WRKSRC}/configure + +post-install: + @${MKDIR} ${PREFIX}/etc + @${INSTALL_DATA} ${WRKSRC}/etc/ziproxy.conf ${PREFIX}/etc/ziproxy.conf.sample + @if [ ! -f ${PREFIX}/etc/ziproxy.conf ]; then \ + ${CP} -p ${WRKSRC}/etc/ziproxy.conf ${PREFIX}/etc/ziproxy.conf ; \ + fi + +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for FILE in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${DOC} +.endfor +.endif + + @${MKDIR} ${DATADIR}/error +.for FILE in ${ERRORFILES} + @${INSTALL_DATA} ${WRKSRC}/var/ziproxy/error/${FILE} ${DATADIR}/error/${FILE} +.endfor + + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/www/ziproxy/distinfo b/www/ziproxy/distinfo new file mode 100644 index 000000000000..b94525eadca0 --- /dev/null +++ b/www/ziproxy/distinfo @@ -0,0 +1,3 @@ +MD5 (ziproxy-2.1.0.tar.bz2) = e474fbddfd9af2fba36318705746b997 +SHA256 (ziproxy-2.1.0.tar.bz2) = 7d9ebee8824d8cba1b212cf830346455ae0fe52af1ea2231a5d02237e37bfd58 +SIZE (ziproxy-2.1.0.tar.bz2) = 134815 diff --git a/www/ziproxy/files/patch-ziproxy.conf b/www/ziproxy/files/patch-ziproxy.conf new file mode 100644 index 000000000000..b6bfeb94631d --- /dev/null +++ b/www/ziproxy/files/patch-ziproxy.conf @@ -0,0 +1,39 @@ +--- etc/ziproxy.conf.orig Wed Jul 26 09:01:36 2006 ++++ etc/ziproxy.conf Mon Jul 31 01:07:02 2006 +@@ -9,7 +9,7 @@ + + ## WARNING: Remember to restrict the access to Ziproxy + ## if your machine is directly connected to the Internet. +-# OnlyFrom = "127.0.0.1" ++OnlyFrom = "localhost" + + # Inactivity timeout before closing the daemon (0 = no timeout) + NetdTimeout = 0 +@@ -36,7 +36,7 @@ + ## HTTP auth file + ## Should contain user:pass pairs, lines no longer than 128 chars + ## Password is unencrypted +-# PasswdFile="/usr/local/ziproxy/ziproxy.passwd" ++# PasswdFile="/usr/local/etc/ziproxy.passwd" + + ## Forward everything to another proxy server. + ## Modifications/compression is still applied. +@@ -151,13 +151,12 @@ + ## Note: The internal defaults give more precise error messages. + ## + ## 400 - Bad request (malformed URL, or unknown URL type) +-# CustomError400="/var/ziproxy/error/400.html" ++# CustomError400="%%DATADIR%%/error/400.html" + ## 404 - Unknown host (Ziproxy will not issue 'page not found' errors itself) +-# CustomError404="/var/ziproxy/error/404.html" ++# CustomError404="%%DATADIR%%/error/404.html" + ## 408 - Request timed out +-# CustomError408="/var/ziproxy/error/408.html" ++# CustomError408="%%DATADIR%%/error/408.html" + ## 500 - Internal error (or empty response from server) +-# CustomError500="/var/ziproxy/error/500.html" ++# CustomError500="%%DATADIR%%/error/500.html" + ## 503 - Connection refused (or service unavailable) +-# CustomError503="/var/ziproxy/error/503.html" +- ++# CustomError503="%%DATADIR%%/error/503.html" diff --git a/www/ziproxy/files/pkg-message.in b/www/ziproxy/files/pkg-message.in new file mode 100644 index 000000000000..df672e2013ea --- /dev/null +++ b/www/ziproxy/files/pkg-message.in @@ -0,0 +1,16 @@ +By default, to prevent creating non-controllable public proxies, ziproxy is +configured to accept connections only on localhost. +You have to edit %%PREFIX%%/etc/ziproxy.conf +to enable remote access to service. + +There is no man page for ziproxy, but info can be found in +%%DOCSDIR%%/README. + +ziproxy can be started by the following ways: +o daemon mode: + * add ziproxy_enable="YES" to your /etc/rc.conf + * use rc(8) script %%PREFIX%%/etc/rc.d/ziproxy.sh +o inetd mode: + * add ``http-proxy 8080/tcp #HTTP Proxy'' to /etc/services + * add ``http-proxy stream tcp nowait nobody /usr/local/bin/ziproxy ziproxy -i'' to your /etc/inetd.conf + * reload inetd(8) config files by doing `/etc/rc.d/inetd reload` diff --git a/www/ziproxy/files/ziproxy.in b/www/ziproxy/files/ziproxy.in new file mode 100644 index 000000000000..0ff86a4a3fba --- /dev/null +++ b/www/ziproxy/files/ziproxy.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# PROVIDE: ziproxy +# REQUIRE: DAEMON +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# ziproxy_enable (bool): Set to NO by default. +# Set it to YES to enable ziproxy. +# ziproxy_config (path): Set to %%PREFIX%%/etc/ziproxy.conf +# by default. +# + +. "%%RC_SUBR%%" + +name="ziproxy" +rcvar=${name}_enable + +command=%%PREFIX%%/bin/${name} +pidfile=/var/run/${name}.pid + +load_rc_config $name + +: ${ziproxy_enable="NO"} +: ${ziproxy_config="%%PREFIX%%/etc/ziproxy.conf"} + +command_args="-d -c ${ziproxy_config}" + +run_rc_command "$1" diff --git a/www/ziproxy/pkg-descr b/www/ziproxy/pkg-descr new file mode 100644 index 000000000000..2fff2d5615b0 --- /dev/null +++ b/www/ziproxy/pkg-descr @@ -0,0 +1,6 @@ +Ziproxy is forwarding, non-caching, compressing proxy server. It +squeezes images by converting them to low quality jpegs and +optionally can also gzip HTML and other text-like data. It is +intended to free bandwidth on dialup connections. + +WWW: http://ziproxy.sourceforge.net/ diff --git a/www/ziproxy/pkg-plist b/www/ziproxy/pkg-plist new file mode 100644 index 000000000000..86f54858ff4c --- /dev/null +++ b/www/ziproxy/pkg-plist @@ -0,0 +1,11 @@ +bin/ziproxy +@unexec if cmp -s %D/etc/ziproxy.conf.sample %D/etc/ziproxy.conf; then rm -f %D/etc/ziproxy.conf; fi +@exec if [ ! -f %D/etc/ziproxy.conf ] ; then cp -p %D/%F %B/ziproxy.conf; fi +etc/ziproxy.conf.sample +%%DATADIR%%/error/400.html +%%DATADIR%%/error/404.html +%%DATADIR%%/error/408.html +%%DATADIR%%/error/500.html +%%DATADIR%%/error/503.html +@dirrm %%DATADIR%%/error +@dirrm %%DATADIR%% |