mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-04 11:23:46 +00:00
- STAGEDIR support
PR: 185659 Submitted by: maintainer
This commit is contained in:
parent
2aca1f41ed
commit
794c8e68ce
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=339760
@ -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>
|
||||
|
@ -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.
|
||||
|
||||
***********************************************************
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user