aboutsummaryrefslogtreecommitdiff
path: root/www/privoxy
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2014-01-15 07:21:17 +0000
committerMartin Wilke <miwi@FreeBSD.org>2014-01-15 07:21:17 +0000
commit794c8e68ce219a4a1b4e1b84fc702adad2bf7531 (patch)
tree8f669585242903453af827b6c3ff4c69cd222b66 /www/privoxy
parent2aca1f41ed29856b1ea524511db937ffb456b9bc (diff)
downloadports-794c8e68ce219a4a1b4e1b84fc702adad2bf7531.tar.gz
ports-794c8e68ce219a4a1b4e1b84fc702adad2bf7531.zip
Notes
Diffstat (limited to 'www/privoxy')
-rw-r--r--www/privoxy/Makefile38
-rw-r--r--www/privoxy/files/pkg-message.in14
-rw-r--r--www/privoxy/files/privoxy.in11
-rw-r--r--www/privoxy/pkg-plist11
4 files changed, 33 insertions, 41 deletions
diff --git a/www/privoxy/Makefile b/www/privoxy/Makefile
index 4dcb682761f7..919d4d19e5c1 100644
--- a/www/privoxy/Makefile
+++ b/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 a/www/privoxy/files/pkg-message.in b/www/privoxy/files/pkg-message.in
index f24e5bee12c0..45ade5ff4c2a 100644
--- a/www/privoxy/files/pkg-message.in
+++ b/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 a/www/privoxy/files/privoxy.in b/www/privoxy/files/privoxy.in
index 02632cb92419..98d766cfd99a 100644
--- a/www/privoxy/files/privoxy.in
+++ b/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 a/www/privoxy/pkg-plist b/www/privoxy/pkg-plist
index c7354b00f569..4933cd7d5615 100644
--- a/www/privoxy/pkg-plist
+++ b/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
-@dirrm %%EXAMPLESDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/user-manual
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/
-@dirrm etc/privoxy/templates
-@dirrm etc/privoxy
+@dirrmtry %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/user-manual
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrmtry etc/privoxy/templates
+@dirrmtry etc/privoxy