Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 2014 07:21:18 +0000 (UTC)
From:      Martin Wilke <miwi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r339760 - in head/www/privoxy: . files
Message-ID:  <201401150721.s0F7LIbD005349@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: miwi
Date: Wed Jan 15 07:21:17 2014
New Revision: 339760
URL: http://svnweb.freebsd.org/changeset/ports/339760
QAT: https://qat.redports.org/buildarchive/r339760/

Log:
  -  STAGEDIR support
  
  PR:		185659
  Submitted by:	maintainer

Modified:
  head/www/privoxy/Makefile
  head/www/privoxy/files/pkg-message.in   (contents, props changed)
  head/www/privoxy/files/privoxy.in   (contents, props changed)
  head/www/privoxy/pkg-plist   (contents, props changed)

Modified: head/www/privoxy/Makefile
==============================================================================
--- head/www/privoxy/Makefile	Wed Jan 15 07:20:40 2014	(r339759)
+++ head/www/privoxy/Makefile	Wed Jan 15 07:21:17 2014	(r339760)
@@ -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 togglin
 
 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>

Modified: head/www/privoxy/files/pkg-message.in
==============================================================================
--- head/www/privoxy/files/pkg-message.in	Wed Jan 15 07:20:40 2014	(r339759)
+++ head/www/privoxy/files/pkg-message.in	Wed Jan 15 07:21:17 2014	(r339760)
@@ -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.
-
 ***********************************************************

Modified: head/www/privoxy/files/privoxy.in
==============================================================================
--- head/www/privoxy/files/privoxy.in	Wed Jan 15 07:20:40 2014	(r339759)
+++ head/www/privoxy/files/privoxy.in	Wed Jan 15 07:21:17 2014	(r339760)
@@ -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}"

Modified: head/www/privoxy/pkg-plist
==============================================================================
--- head/www/privoxy/pkg-plist	Wed Jan 15 07:20:40 2014	(r339759)
+++ head/www/privoxy/pkg-plist	Wed Jan 15 07:21:17 2014	(r339760)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401150721.s0F7LIbD005349>