# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	www/privoxy-devel/
#	www/privoxy-devel/files
#	www/privoxy-devel/files/privoxy.in
#	www/privoxy-devel/files/pkg-message.in
#	www/privoxy-devel/Makefile
#	www/privoxy-devel/distinfo
#	www/privoxy-devel/pkg-descr
#	www/privoxy-devel/pkg-plist
#	www/privoxy-devel/pkg-install
#
echo c - www/privoxy-devel/
mkdir -p www/privoxy-devel/ > /dev/null 2>&1
echo c - www/privoxy-devel/files
mkdir -p www/privoxy-devel/files > /dev/null 2>&1
echo x - www/privoxy-devel/files/privoxy.in
sed 's/^X//' >www/privoxy-devel/files/privoxy.in << 'END-of-www/privoxy-devel/files/privoxy.in'
X#!/bin/sh
X#
X# $FreeBSD:$
X#
X#
X# PROVIDE: privoxy
X# REQUIRE: NETWORKING
X# BEFORE: LOGIN
X#
X# This rc script understands the following variables
X# which are read from /etc/rc.conf:
X#
X# privoxy_enable  (bool): Set to "NO" by default.
X#                         Set it to "YES" to enable Privoxy.
X# privoxy_config   (str): Privoxy's configuration file. Default is:
X#                         %%PREFIX%%/etc/privoxy/config.
X# privoxy_flags    (str): List of additional Privoxy options you want
X#                         to use. None set by default.
X# privoxy_pidfile  (str): Default is /var/run/privoxy/privoxy.pid.
X# privoxy_user     (str): Privoxy Daemon user. Default is privoxy.
X#
X# Usage:
X# %%PREFIX%%/etc/rc.d/privoxy [fast|force|one](start|stop|restart|rcvar|status|poll)
X
X. %%RC_SUBR%%
X
Xname="privoxy"
Xrcvar=${name}_enable
Xload_rc_config ${name}
X
X: ${privoxy_enable="NO"}
X: ${privoxy_config="%%PREFIX%%/etc/privoxy/config"}
X: ${privoxy_flags=""}
X: ${privoxy_user="privoxy"}
X: ${privoxy_pidfile="/var/run/privoxy/privoxy.pid"}
X
X
Xcommand="%%PREFIX%%/sbin/privoxy"
Xcommand_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}"
X
Xrun_rc_command "$1"
X
END-of-www/privoxy-devel/files/privoxy.in
echo x - www/privoxy-devel/files/pkg-message.in
sed 's/^X//' >www/privoxy-devel/files/pkg-message.in << 'END-of-www/privoxy-devel/files/pkg-message.in'
X============================================================
XPrivoxy's default configuration file is:
X%%PREFIX%%/etc/privoxy/config
XIt gets overwritten on (re)install, if you make your
Xown modifications, you should rename it first.
X
XPrivoxy's user.action file was copied to:
X%%PREFIX%%/share/examples/privoxy/user.action
XIf you intend to use it, copy it to:
X%%PREFIX%%/etc/privoxy/user.action
Xand enable it in Privoxy's configuration file.
X
XTo start privoxy on boot, add: privoxy_enable="YES"
Xto /etc/rc.conf. If you changed the location of the
Xconfiguration file, additionally add:
Xprivoxy_config="%%PREFIX%%/etc/privoxy/your-config"
X
XTo start Privoxy manually, run:
X%%PREFIX%%/etc/rc.d/privoxy forcestart
XThe script understands most of the commands listed
Xin rc(8), it also contains a list of other rc
Xvariables you can use.
X
XBefore you start Privoxy the firt time, you'll have
Xto make sure the directories /var/log/privoxy and
X/var/run/privoxy exist and are owned by privoxy:privoxy.
X
X mkdir -p /var/log/privoxy/ /var/run/privoxy/
X chown privoxy:privoxy /var/log/privoxy/ /var/run/privoxy/
X
XFor documentation see:
X%%PREFIX%%/share/doc/privoxy-manual or 'man privoxy'
X============================================================
END-of-www/privoxy-devel/files/pkg-message.in
echo x - www/privoxy-devel/Makefile
sed 's/^X//' >www/privoxy-devel/Makefile << 'END-of-www/privoxy-devel/Makefile'
X# New ports collection makefile for:	privoxy
X# Date created:				2006-09-23
X# Whom:					Fabian Keil <fk@fabiankeil.de>
X#
X# $FreeBSD:$
X#
X
XPORTNAME=	privoxy
XPORTVERSION=	3.0.5
XCATEGORIES=	www
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	ijbswa
XPKGNAMESUFFIX=	-devel
XDISTNAME=	privoxy-${PORTVERSION}-beta-src
X
XMAINTAINER=	fk@fabiankeil.de
XCOMMENT=	Privoxy is a web proxy with advanced filtering capabilities
X
XWRKSRC=		${WRKDIR}/privoxy-${PORTVERSION}-BETA
X
XUSE_GMAKE=	yes
XUSE_AUTOTOOLS=	autoconf:259
X
XUSE_RC_SUBR=	privoxy
XSUB_FILES=	pkg-message
X
XMAKEFILE=	GNUmakefile
X
XMAN1=		privoxy.1
X
Xpost-patch:
X	${REINPLACE_CMD} \
X		-e 's,^\(confdir\) \.,\1 ${PREFIX}/etc/privoxy,' \
X		-e 's,^\(logdir\) \.,\1 /var/log/privoxy,' \
X		-e 's,^\(actionsfile user\),#\1,' \
X	${WRKSRC}/config
X.if !defined(NOPORTDOCS)
X	${REINPLACE_CMD} \
X		-e 's,^#\(user-manual\) http://www.privoxy.org/user-manual/,\1 ${PREFIX}/share/doc/privoxy-manual,' \
X	${WRKSRC}/config
X.endif
Xpre-configure:
X	@cd ${WRKSRC}; ${AUTOHEADER}
X
Xpre-install:
X	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
X		${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xdo-install:
X	@${MKDIR} ${PREFIX}/etc/privoxy/templates
X	@${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin
X	@${INSTALL_DATA} ${WRKSRC}/templates/[a-z]* ${PREFIX}/etc/privoxy/templates
X.for file in config default.action standard.action default.filter trust
X	@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/etc/privoxy
X.endfor
X	@${INSTALL_MAN}  ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1
X	@${MKDIR} ${PREFIX}/share/examples/privoxy
X	@${INSTALL_DATA} ${WRKSRC}/user.action ${PREFIX}/share/examples/privoxy
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${PREFIX}/share/doc/privoxy-manual
X	@if [ -d ${WRKSRC}/doc/webserver/user-manual ]; then \
X		${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${PREFIX}/share/doc/privoxy-manual; \
X	fi
X.endif
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-www/privoxy-devel/Makefile
echo x - www/privoxy-devel/distinfo
sed 's/^X//' >www/privoxy-devel/distinfo << 'END-of-www/privoxy-devel/distinfo'
XMD5 (privoxy-3.0.5-beta-src.tar.gz) = 61f16bde1f88090eae88bf8b7fdbb557
XSHA256 (privoxy-3.0.5-beta-src.tar.gz) = e7285b27311fe2093d742e4f8c553a04232946f66aa6ad6bc6141f76c1b0b489
XSIZE (privoxy-3.0.5-beta-src.tar.gz) = 1727642
END-of-www/privoxy-devel/distinfo
echo x - www/privoxy-devel/pkg-descr
sed 's/^X//' >www/privoxy-devel/pkg-descr << 'END-of-www/privoxy-devel/pkg-descr'
XPrivoxy is a web proxy with advanced filtering capabilities for protecting
Xprivacy, filtering web page content, managing cookies, controlling access,
Xand removing ads, banners, pop-ups and other obnoxious Internet junk.
XPrivoxy has a very flexible configuration and can be customized to suit
Xindividual needs and tastes. Privoxy has application for both stand-alone
Xsystems and multi-user networks.
X
XThis port installs Privoxy's beta version or cvs snapshots.
X
XWWW: http://www.privoxy.org/
END-of-www/privoxy-devel/pkg-descr
echo x - www/privoxy-devel/pkg-plist
sed 's/^X//' >www/privoxy-devel/pkg-plist << 'END-of-www/privoxy-devel/pkg-plist'
Xsbin/privoxy
Xetc/privoxy/config
Xetc/privoxy/default.action
Xetc/privoxy/standard.action
Xetc/privoxy/default.filter
Xetc/privoxy/trust
Xetc/privoxy/templates/blocked
Xetc/privoxy/templates/cgi-error-404
Xetc/privoxy/templates/cgi-error-bad-param
Xetc/privoxy/templates/cgi-error-disabled
Xetc/privoxy/templates/cgi-error-file
Xetc/privoxy/templates/cgi-error-file-read-only
Xetc/privoxy/templates/cgi-error-modified
Xetc/privoxy/templates/cgi-error-parse
Xetc/privoxy/templates/cgi-style.css
Xetc/privoxy/templates/connect-failed
Xetc/privoxy/templates/default
Xetc/privoxy/templates/edit-actions-add-url-form
Xetc/privoxy/templates/edit-actions-for-url
Xetc/privoxy/templates/edit-actions-for-url-filter
Xetc/privoxy/templates/edit-actions-list
Xetc/privoxy/templates/edit-actions-list-button
Xetc/privoxy/templates/edit-actions-list-section
Xetc/privoxy/templates/edit-actions-list-url
Xetc/privoxy/templates/edit-actions-remove-url-form
Xetc/privoxy/templates/edit-actions-url-form
Xetc/privoxy/templates/mod-local-help
Xetc/privoxy/templates/mod-support-and-service
Xetc/privoxy/templates/mod-title
Xetc/privoxy/templates/mod-unstable-warning
Xetc/privoxy/templates/no-such-domain
Xetc/privoxy/templates/show-request
Xetc/privoxy/templates/show-status
Xetc/privoxy/templates/show-status-file
Xetc/privoxy/templates/show-url-info
Xetc/privoxy/templates/show-version
Xetc/privoxy/templates/toggle
Xetc/privoxy/templates/toggle-mini
Xetc/privoxy/templates/untrusted
X%%PORTDOCS%%share/examples/privoxy/user.action
X%%PORTDOCS%%share/doc/privoxy-manual/actions-file.html
X%%PORTDOCS%%share/doc/privoxy-manual/configuration.html
X%%PORTDOCS%%share/doc/privoxy-manual/filter-file.html
X%%PORTDOCS%%share/doc/privoxy-manual/files-in-use.jpg
X%%PORTDOCS%%share/doc/privoxy-manual/introduction.html
X%%PORTDOCS%%share/doc/privoxy-manual/startup.html
X%%PORTDOCS%%share/doc/privoxy-manual/appendix.html
X%%PORTDOCS%%share/doc/privoxy-manual/contact.html
X%%PORTDOCS%%share/doc/privoxy-manual/index.html
X%%PORTDOCS%%share/doc/privoxy-manual/quickstart.html
X%%PORTDOCS%%share/doc/privoxy-manual/templates.html
X%%PORTDOCS%%share/doc/privoxy-manual/config.html
X%%PORTDOCS%%share/doc/privoxy-manual/copyright.html
X%%PORTDOCS%%share/doc/privoxy-manual/installation.html
X%%PORTDOCS%%share/doc/privoxy-manual/proxy2.jpg
X%%PORTDOCS%%share/doc/privoxy-manual/proxy_setup.jpg
X%%PORTDOCS%%share/doc/privoxy-manual/whatsnew.html
X%%PORTDOCS%%share/doc/privoxy-manual/seealso.html
X%%PORTDOCS%%share/doc/privoxy-manual/upgradersnote.html
X%%PORTDOCS%%@dirrm share/doc/privoxy-manual
X@dirrm share/examples/privoxy/
X@dirrm etc/privoxy/templates
X@dirrm etc/privoxy
END-of-www/privoxy-devel/pkg-plist
echo x - www/privoxy-devel/pkg-install
sed 's/^X//' >www/privoxy-devel/pkg-install << 'END-of-www/privoxy-devel/pkg-install'
X#!/bin/sh
X
Xif [ "$2" != "PRE-INSTALL" ]; then
X    exit 0
Xfi
X
XPW=/usr/sbin/pw
XECHO=echo
XUSER=privoxy
XGROUP=${USER}
XUIDGID=201
X
Xif ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
X	if ${PW} groupadd ${GROUP} -g ${UIDGID}; then
X		${ECHO} "Added group \"${GROUP}\"."
X	else
X                ${ECHO} "Adding group \"${GROUP}\" failed..."
X                exit 1
X        fi
Xfi
X
Xif ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
X        if ${PW} useradd ${USER} -g ${GROUP} -h - \
X                -s "/sbin/nologin" -d "/nonexistent" \
X                -c "privoxy pseudo-user" -u ${UIDGID}; \
X        then
X                ${ECHO} "Added user \"${USER}\"."
X        else
X                ${ECHO} "Adding user \"${USER}\" failed..."
X                exit 1
X        fi
Xfi
Xexit 0
END-of-www/privoxy-devel/pkg-install
exit

