# 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/Makefile
#	www/privoxy-devel/distinfo
#	www/privoxy-devel/pkg-descr
#	www/privoxy-devel/pkg-plist
#	www/privoxy-devel/files
#	www/privoxy-devel/files/privoxy.in
#	www/privoxy-devel/files/pkg-message.in
#	www/privoxy-devel/pkg-install
#
echo c - www/privoxy-devel
mkdir -p www/privoxy-devel > /dev/null 2>&1
echo x - www/privoxy-devel/Makefile
sed 's/^X//' >www/privoxy-devel/Makefile << 'b55802dc717250704483ecb95d30961e'
X# New ports collection makefile for:	privoxy-devel
X# Date created:				2006-09-23
X# Whom:					Fabian Keil <fk@fabiankeil.de>
X#
X# $FreeBSD:$
X#
X
XPORTNAME=	privoxy
XPORTVERSION=	3.0.9
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
XLIB_DEPENDS=	pcre:${PORTSDIR}/devel/pcre
X
XWRKSRC=		${WRKDIR}/privoxy-${PORTVERSION}-beta
X
XUSE_GMAKE=	yes
XUSE_AUTOTOOLS=	autoconf:261
X
XUSE_RC_SUBR=	privoxy
XSUB_FILES=	pkg-message
X
XMAKEFILE=	GNUmakefile
X
XCONFLICTS=	privoxy-[0-9]*
X
XMAN1=		privoxy.1
X
XCONFIGURE_ENV=	LDFLAGS=-L${LOCALBASE}/lib \
X		CPPFLAGS=-I${LOCALBASE}/include/
X
XOPTIONS=	FORCE "Allows to optionally bypass blocks" On \
X		TOGGLE "Support for remote toggling" On \
X		EDITOR "Enable webbased action editor" On \
X		DEBUG "Build with debugging symbols" On
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITHOUT_FORCE)
XCONFIGURE_ARGS+=	--disable-force
X.endif
X
X.if defined(WITHOUT_TOGGLE)
XCONFIGURE_ARGS+=	--disable-toggle
X.endif
X
X.if defined(WITHOUT_EDITOR)
XCONFIGURE_ARGS+=	--disable-editor
X.endif
X
X.if defined(WITH_DEBUG)
XCONFIGURE_ARGS+=	--with-debug
X.endif
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 ${DOCSDIR}/user-manual,' \
X	${WRKSRC}/config
X
X.endif
X
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 defaultfile in default.action standard.action default.filter
X	@${INSTALL_DATA} ${WRKSRC}/${defaultfile} ${PREFIX}/etc/privoxy
X	@${CHOWN} privoxy:privoxy ${PREFIX}/etc/privoxy/${defaultfile}
X	@${CHMOD} 0640 ${PREFIX}/etc/privoxy/${defaultfile}
X.endfor
X	@${MKDIR} ${EXAMPLESDIR}
X.for examplefile in config trust user.action
X	@${INSTALL_DATA} ${WRKSRC}/${examplefile} ${EXAMPLESDIR}/
X	@${CHOWN} privoxy:privoxy ${EXAMPLESDIR}/${examplefile}
X	@${CHMOD} 0640 ${EXAMPLESDIR}/${examplefile}
X.endfor
X	@${INSTALL_MAN}  ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}/user-manual
X	@${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${DOCSDIR}/user-manual
X	@${INSTALL_DATA} ${WRKSRC}/doc/webserver/p_doc.css ${DOCSDIR}/user-manual
X.endif
X
Xpost-install:
X	@${MKDIR} /var/log/privoxy
X	@${CHOWN} privoxy:privoxy /var/log/privoxy
X	@${CHMOD} 0750 /var/log/privoxy
X	@${MKDIR} /var/run/privoxy
X	@${CHOWN} privoxy:privoxy /var/run/privoxy
X	@${CHMOD} 0750 /var/run/privoxy
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
b55802dc717250704483ecb95d30961e
echo x - www/privoxy-devel/distinfo
sed 's/^X//' >www/privoxy-devel/distinfo << '1d8e09f59a5b8d9976b50b876eb01102'
XMD5 (privoxy-3.0.9-beta-src.tar.gz) = 41c013f0f470ea5601a1085c10e64bc9
XSHA256 (privoxy-3.0.9-beta-src.tar.gz) = 0f320bb9717edeaee031f3befe1527f2f772ad942718758025da8c82e5493ecc
XSIZE (privoxy-3.0.9-beta-src.tar.gz) = 1973479
1d8e09f59a5b8d9976b50b876eb01102
echo x - www/privoxy-devel/pkg-descr
sed 's/^X//' >www/privoxy-devel/pkg-descr << '94f7ef00a30cf9ffd2d6504bd5da6742'
XPrivoxy is a non-caching web proxy with advanced filtering capabilities for
Xenhancing privacy, modifying web page data, managing HTTP cookies, controlling
Xaccess, and removing ads, banners, pop-ups and other obnoxious Internet junk.
XPrivoxy has a flexible configuration and can be customized to suit individual
Xneeds and tastes. Privoxy has application for both stand-alone systems and
Xmulti-user networks.
X
XWWW: http://www.privoxy.org/
94f7ef00a30cf9ffd2d6504bd5da6742
echo x - www/privoxy-devel/pkg-plist
sed 's/^X//' >www/privoxy-devel/pkg-plist << 'bbd201a48ca28de3289c50027e0f0759'
Xsbin/privoxy
Xetc/privoxy/default.action
Xetc/privoxy/default.filter
Xetc/privoxy/standard.action
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/forwarding-failed
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
Xetc/privoxy/templates/url-info-osd.xml
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/actions-file.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/appendix.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/config.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/configuration.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/contact.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/copyright.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/files-in-use.jpg
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/filter-file.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/index.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/installation.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/introduction.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/p_doc.css
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/proxy2.jpg
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/proxy_setup.jpg
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/quickstart.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/seealso.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/startup.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/templates.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/upgradersnote.html
X%%PORTDOCS%%%%DOCSDIR%%/user-manual/whatsnew.html
X%%EXAMPLESDIR%%/config
X%%EXAMPLESDIR%%/trust
X%%EXAMPLESDIR%%/user.action
X@dirrm %%EXAMPLESDIR%%
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/user-manual
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/
X@dirrm etc/privoxy/templates
X@dirrm etc/privoxy
bbd201a48ca28de3289c50027e0f0759
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 << 'b697e861cf72bfb99b6193159079d496'
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
Xstart_precmd="if [ ! -e ${privoxy_config} ]; then\
X echo ${privoxy_config} not found. Copying default configuration.;\
X cp %%PREFIX%%/share/examples/privoxy/config ${privoxy_config};\
X chown ${privoxy_user}:${privoxy_user} ${privoxy_config};\
Xfi"
X
Xcommand="%%PREFIX%%/sbin/privoxy"
Xcommand_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}"
X
Xrun_rc_command "$1"
X
b697e861cf72bfb99b6193159079d496
echo x - www/privoxy-devel/files/pkg-message.in
sed 's/^X//' >www/privoxy-devel/files/pkg-message.in << '9cf6f328f72f991d3ccbc631fd6df7f1'
X***********************************************************
X  To start Privoxy on boot, add: privoxy_enable="YES"
X  to /etc/rc.conf.
X
X  To start Privoxy manually, run:
X  /usr/local/etc/rc.d/privoxy forcestart
X  The script understands most of the commands listed
X  in rc(8), it also contains a list of other rc
X  variables you can use.
X
X  Privoxy's example files were copied to:
X  %%EXAMPLESDIR%%
X
X  For documentation see:
X  %%DOCSDIR%%/user-manual or 'man privoxy'
X
X  Note that default.filter, standard.action and
X  default.action get overwritten with each Privoxy
X  update. Instead of changing them you should use
X  your own action and filter files as described in
X  Privoxy's manual.
X
X  If you installed Privoxy as package and are using the
X  default configuration, you have to make sure the
X  directories /var/log/privoxy and /var/run/privoxy
X  exist and are owned by privoxy:privoxy.
X
X***********************************************************
9cf6f328f72f991d3ccbc631fd6df7f1
echo x - www/privoxy-devel/pkg-install
sed 's/^X//' >www/privoxy-devel/pkg-install << 'c0f53437021af1a1827f695b9798a4b8'
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
c0f53437021af1a1827f695b9798a4b8
exit

