ports/185659: [MAINTAINER-UPDATE] STAGEDIR support for www/privoxy
Fabian Keil
fk at fabiankeil.de
Sat Jan 11 15:10:00 UTC 2014
>Number: 185659
>Category: ports
>Synopsis: [MAINTAINER-UPDATE] STAGEDIR support for www/privoxy
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 11 15:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Fabian Keil
>Release: HEAD
>Organization:
>Environment:
FreeBSD r500.local 11.0-CURRENT FreeBSD 11.0-CURRENT #624 r260167+e1986e1(fk): Wed Jan 1 23:47:46 CET 2014 fk at r500.local:/usr/obj/usr/src/sys/ZOEY amd64
>Description:
The attached patch adds STAGEDIR support for www/privoxy.
Redports build details are available at:
https://redports.org/buildarchive/20140111142600-31904/
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
>From db75bcf7198999b60b6bccd54342424930291bca Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk at fabiankeil.de>
Date: Mon, 7 Oct 2013 19:24:56 +0200
Subject: [PATCH] www/privoxy: Add STAGEDIR support
---
www/privoxy/Makefile | 38 ++++++++++++++------------------------
www/privoxy/files/pkg-message.in | 14 +++++---------
www/privoxy/files/privoxy.in | 11 ++++++++---
www/privoxy/pkg-plist | 11 ++++++-----
4 files changed, 33 insertions(+), 41 deletions(-)
diff --git www/privoxy/Makefile www/privoxy/Makefile
index 4dcb682..919d4d1 100644
--- www/privoxy/Makefile
+++ www/privoxy/Makefile
@@ -3,6 +3,7 @@
PORTNAME= privoxy
PORTVERSION= 3.0.21
+PORTREVISION= 1
CATEGORIES= www ipv6
MASTER_SITES= SF/ijbswa/Sources/${PORTVERSION}%20%28stable%29
DISTNAME= privoxy-${PORTVERSION}-stable-src
@@ -26,8 +27,6 @@ MAKEFILE= GNUmakefile
# It's not (yet) part of the FreeBSD ports collection.
CONFLICTS= privoxy-devel-[0-9]*
-MAN1= privoxy.1
-
USERS= privoxy
GROUPS= privoxy
@@ -48,7 +47,6 @@ TOGGLE_DESC= Support for remote toggling
OPTIONS_DEFAULT= BROKEN_STRPTIME EDITOR DOCS FORCE TOGGLE
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MACCEPT_FILTER}
@@ -88,6 +86,8 @@ PLIST_SUB+= PRIVOXY_TOOLS=""
PLIST_SUB+= PRIVOXY_TOOLS="@comment "
.endif
+PLIST_SUB+= MAN1PREFIX=${MAN1PREFIX}
+
post-patch:
${REINPLACE_CMD} \
-e 's,^\(confdir\) \.,\1 ${PREFIX}/etc/privoxy,' \
@@ -107,36 +107,26 @@ pre-configure:
@cd ${WRKSRC}; ${AUTOHEADER}
do-install:
- @${MKDIR} ${PREFIX}/etc/privoxy/templates
- @${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin
- @${INSTALL_DATA} ${WRKSRC}/templates/[a-z]* ${PREFIX}/etc/privoxy/templates
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/privoxy/templates
+ @${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${STAGEDIR}${PREFIX}/sbin
+ @${INSTALL_DATA} ${WRKSRC}/templates/[a-z]* ${STAGEDIR}${PREFIX}/etc/privoxy/templates
.if ${PORT_OPTIONS:MPRIVOXY_TOOLS}
.for privoxy_tool in privoxy-log-parser.pl privoxy-regression-test.pl uagen.pl
- @${INSTALL_SCRIPT} ${WRKSRC}/tools/${privoxy_tool} ${PREFIX}/bin
+ @${INSTALL_SCRIPT} ${WRKSRC}/tools/${privoxy_tool} ${STAGEDIR}${PREFIX}/bin
.endfor
.endif
.for defaultfile in default.action default.filter regression-tests.action
- @${INSTALL_DATA} ${WRKSRC}/${defaultfile} ${PREFIX}/etc/privoxy
- @${CHOWN} privoxy:privoxy ${PREFIX}/etc/privoxy/${defaultfile}
- @${CHMOD} 0444 ${PREFIX}/etc/privoxy/${defaultfile}
+ @${INSTALL_DATA} ${WRKSRC}/${defaultfile} ${STAGEDIR}${PREFIX}/etc/privoxy
.endfor
- @${MKDIR} ${EXAMPLESDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for examplefile in config match-all.action trust user.action
- @${INSTALL_DATA} ${WRKSRC}/${examplefile} ${EXAMPLESDIR}/
- @${CHOWN} privoxy:privoxy ${EXAMPLESDIR}/${examplefile}
- @${CHMOD} 0640 ${EXAMPLESDIR}/${examplefile}
+ @${INSTALL_DATA} ${WRKSRC}/${examplefile} ${STAGEDIR}${EXAMPLESDIR}/
.endfor
- @${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1
+ @${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}/user-manual
- @${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${DOCSDIR}/user-manual
- @${INSTALL_DATA} ${WRKSRC}/doc/webserver/p_doc.css ${DOCSDIR}/user-manual
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/user-manual
+ @${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${STAGEDIR}${DOCSDIR}/user-manual
+ @${INSTALL_DATA} ${WRKSRC}/doc/webserver/p_doc.css ${STAGEDIR}${DOCSDIR}/user-manual
.endif
-post-install:
- @${MKDIR} /var/run/privoxy
- @${CHOWN} privoxy:privoxy /var/run/privoxy
- @${CHMOD} 0750 /var/run/privoxy
- @${CAT} ${PKGMESSAGE}
-
.include <bsd.port.mk>
diff --git www/privoxy/files/pkg-message.in www/privoxy/files/pkg-message.in
index f24e5be..45ade5f 100644
--- www/privoxy/files/pkg-message.in
+++ www/privoxy/files/pkg-message.in
@@ -3,10 +3,11 @@
to /etc/rc.conf.
To start Privoxy manually, run:
- /usr/local/etc/rc.d/privoxy forcestart
- The script understands most of the commands listed
- in rc(8), it also contains a list of other rc
- variables you can use.
+ service privoxy forcestart
+
+ The rc script understands most of the commands listed
+ in rc(8), it also contains a list of other rc variables
+ you can use.
Privoxy's example files were copied to:
%%EXAMPLESDIR%%
@@ -19,9 +20,4 @@
changing them you should use your own action and
filter files as described in Privoxy's manual.
- If you installed Privoxy as package and are using
- the default configuration, you have to make sure
- the directory /var/run/privoxy exists and is owned
- by privoxy:privoxy.
-
***********************************************************
diff --git www/privoxy/files/privoxy.in www/privoxy/files/privoxy.in
index 02632cb..98d766c 100644
--- www/privoxy/files/privoxy.in
+++ www/privoxy/files/privoxy.in
@@ -32,9 +32,10 @@ load_rc_config ${name}
: ${privoxy_config="%%PREFIX%%/etc/privoxy/config"}
: ${privoxy_logdir="/var/log/privoxy"}
: ${privoxy_user="privoxy"}
-: ${privoxy_pidfile="/var/run/privoxy/privoxy.pid"}
+: ${privoxy_piddir="/var/run/privoxy"}
+: ${privoxy_pidfile="${privoxy_piddir}/privoxy.pid"}
-config_file_check () {
+privoxy_prestart () {
if [ ! -e ${privoxy_config} ]; then
echo config file not found. Copying the example file to ${privoxy_config}.
cp %%PREFIX%%/share/examples/privoxy/config ${privoxy_config}
@@ -52,9 +53,13 @@ config_file_check () {
chown ${privoxy_user}:${privoxy_user} ${privoxy_logdir}
chmod 0750 ${privoxy_logdir}
fi
+ if [ ! -d ${privoxy_piddir} ]; then
+ mkdir -p ${privoxy_piddir}
+ chown ${privoxy_user}:${privoxy_user} ${privoxy_piddir}
+ fi
}
-start_precmd="config_file_check"
+start_precmd="privoxy_prestart"
command="%%PREFIX%%/sbin/privoxy"
command_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}"
diff --git www/privoxy/pkg-plist www/privoxy/pkg-plist
index c7354b0..4933cd7 100644
--- www/privoxy/pkg-plist
+++ www/privoxy/pkg-plist
@@ -2,6 +2,7 @@
%%PRIVOXY_TOOLS%%bin/privoxy-regression-test.pl
%%PRIVOXY_TOOLS%%bin/uagen.pl
sbin/privoxy
+%%MAN1PREFIX%%/man/man1/privoxy.1.gz
etc/privoxy/default.action
etc/privoxy/default.filter
etc/privoxy/regression-tests.action
@@ -65,8 +66,8 @@ etc/privoxy/templates/url-info-osd.xml
%%EXAMPLESDIR%%/match-all.action
%%EXAMPLESDIR%%/trust
%%EXAMPLESDIR%%/user.action
- at dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/user-manual
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/
- at dirrm etc/privoxy/templates
- at dirrm etc/privoxy
+ at dirrmtry %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/user-manual
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
+ at dirrmtry etc/privoxy/templates
+ at dirrmtry etc/privoxy
--
1.8.5.2
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list