diff options
author | miwi <miwi@FreeBSD.org> | 2006-12-11 06:47:05 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-12-11 06:47:05 +0800 |
commit | dab2c046660fbf56ace5671d7419d32778fe919b (patch) | |
tree | defff8df6ad99506c62dc1e4cd7fdd5cb3ff2874 /www/privoxy | |
parent | 8c2ebc62cd7c534cae962c844fe91a105a5e0a34 (diff) | |
download | freebsd-ports-gnome-dab2c046660fbf56ace5671d7419d32778fe919b.tar.gz freebsd-ports-gnome-dab2c046660fbf56ace5671d7419d32778fe919b.tar.zst freebsd-ports-gnome-dab2c046660fbf56ace5671d7419d32778fe919b.zip |
- Copies the config file as example file and
leaves old versions unmodified. The rc script later
copies the example if the config file is missing.
- Makes the make output less noisy.
- Compiles with TOGGLE option disabled.
- Bump PORTREVISION
PR: ports/106426
Submitted by: Pete Slagle<freebsd-stable@box559.com>
Fabian Keil <fk@fabiankeil.de> (maintainer)
Approved by: maintainer
Diffstat (limited to 'www/privoxy')
-rw-r--r-- | www/privoxy/Makefile | 31 | ||||
-rw-r--r-- | www/privoxy/files/patch-cgi.c | 15 | ||||
-rw-r--r-- | www/privoxy/files/patch-cgiedit.c | 32 | ||||
-rw-r--r-- | www/privoxy/files/pkg-message.in | 24 | ||||
-rw-r--r-- | www/privoxy/files/privoxy.in | 5 | ||||
-rw-r--r-- | www/privoxy/pkg-plist | 8 |
6 files changed, 89 insertions, 26 deletions
diff --git a/www/privoxy/Makefile b/www/privoxy/Makefile index 202339707818..76dc34547755 100644 --- a/www/privoxy/Makefile +++ b/www/privoxy/Makefile @@ -7,6 +7,7 @@ PORTNAME= privoxy PORTVERSION= 3.0.6 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ijbswa @@ -78,25 +79,31 @@ do-install: @${MKDIR} ${PREFIX}/etc/privoxy/templates @${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin @${INSTALL_DATA} ${WRKSRC}/templates/[a-z]* ${PREFIX}/etc/privoxy/templates -.for file in config default.action standard.action default.filter trust - @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/etc/privoxy +.for defaultfile in default.action standard.action default.filter + @${INSTALL_DATA} ${WRKSRC}/${defaultfile} ${PREFIX}/etc/privoxy + @${CHOWN} privoxy:privoxy ${PREFIX}/etc/privoxy/${defaultfile} + @${CHMOD} 0640 ${PREFIX}/etc/privoxy/${defaultfile} +.endfor + @${MKDIR} ${PREFIX}/share/examples/privoxy +.for examplefile in config trust user.action + @${INSTALL_DATA} ${WRKSRC}/${examplefile} ${PREFIX}/share/examples/privoxy + @${CHOWN} privoxy:privoxy ${PREFIX}/share/examples/privoxy/${examplefile} + @${CHMOD} 0640 ${PREFIX}/share/examples/privoxy/${examplefile} .endfor @${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1 -# @${MKDIR} ${PREFIX}/share/examples/privoxy -# @${INSTALL_DATA} ${WRKSRC}/user.action ${PREFIX}/share/examples/privoxy .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/privoxy-manual - ${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${PREFIX}/share/doc/privoxy-manual - ${INSTALL_DATA} ${WRKSRC}/doc/webserver/p_doc.css ${PREFIX}/share/doc/privoxy-manual + @${INSTALL_DATA} ${WRKSRC}/doc/webserver/user-manual/[a-z]* ${PREFIX}/share/doc/privoxy-manual + @${INSTALL_DATA} ${WRKSRC}/doc/webserver/p_doc.css ${PREFIX}/share/doc/privoxy-manual .endif post-install: - ${MKDIR} /var/log/privoxy - ${CHOWN} privoxy:privoxy /var/log/privoxy - ${CHMOD} 0750 /var/log/privoxy - ${MKDIR} /var/run/privoxy - ${CHOWN} privoxy:privoxy /var/run/privoxy - ${CHMOD} 0750 /var/run/privoxy + @${MKDIR} /var/log/privoxy + @${CHOWN} privoxy:privoxy /var/log/privoxy + @${CHMOD} 0750 /var/log/privoxy + @${MKDIR} /var/run/privoxy + @${CHOWN} privoxy:privoxy /var/run/privoxy + @${CHMOD} 0750 /var/run/privoxy @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/www/privoxy/files/patch-cgi.c b/www/privoxy/files/patch-cgi.c new file mode 100644 index 000000000000..fdb6a1d31d4c --- /dev/null +++ b/www/privoxy/files/patch-cgi.c @@ -0,0 +1,15 @@ +--- cgi.c Mon Nov 13 20:05:50 2006 ++++ cgi.c Sat Dec 9 14:49:16 2006 +@@ -571,10 +579,12 @@ + "Look up which actions apply to a URL and why", + TRUE }, + #ifdef FEATURE_CGI_EDIT_ACTIONS ++#ifdef FEATURE_TOGGLE + { "toggle", + cgi_toggle, + "Toggle Privoxy on or off", + FALSE }, ++#endif /* def FEATURE_TOGGLE */ + { "edit-actions", /* Edit the actions list */ + cgi_edit_actions, + NULL, FALSE }, diff --git a/www/privoxy/files/patch-cgiedit.c b/www/privoxy/files/patch-cgiedit.c new file mode 100644 index 000000000000..0d83b7b96ca3 --- /dev/null +++ b/www/privoxy/files/patch-cgiedit.c @@ -0,0 +1,32 @@ +--- cgiedit.c Tue Jul 18 16:48:45 2006 ++++ cgiedit.c Sat Dec 9 14:49:16 2006 +@@ -333,8 +337,10 @@ + #include "miscutil.h" + #include "errlog.h" + #include "loaders.h" +-#include "loadcfg.h" ++#ifdef FEATURE_TOGGLE + /* loadcfg.h is for global_toggle_state only */ ++#include "loadcfg.h" ++#endif /* def FEATURE_TOGGLE */ + #include "urlmatch.h" + + const char cgiedit_h_rcs[] = CGIEDIT_H_VERSION; +@@ -4232,7 +4238,7 @@ + return cgi_redirect(rsp, target); + } + +- ++#ifdef FEATURE_TOGGLE + /********************************************************************* + * + * Function : cgi_toggle +@@ -4300,7 +4306,7 @@ + + return template_fill_for_cgi(csp, template_name, exports, rsp); + } +- ++#endif /* def FEATURE_TOGGLE */ + + /********************************************************************* + * diff --git a/www/privoxy/files/pkg-message.in b/www/privoxy/files/pkg-message.in index c4bd244652bc..be30cf9ec574 100644 --- a/www/privoxy/files/pkg-message.in +++ b/www/privoxy/files/pkg-message.in @@ -1,13 +1,6 @@ *********************************************************** -** Privoxy's default configuration file is: ** -** %%PREFIX%%/etc/privoxy/config ** -** It gets overwritten on (re)install, if you make your ** -** own modifications, you should rename it first. ** -** ** ** To start Privoxy on boot, add: privoxy_enable="YES" ** -** to /etc/rc.conf. If you changed the location of the ** -** configuration file, additionally add: ** -** privoxy_config="%%PREFIX%%/etc/privoxy/your-config" ** +** to /etc/rc.conf. ** ** ** ** To start Privoxy manually, run: ** ** %%PREFIX%%/etc/rc.d/privoxy forcestart ** @@ -15,11 +8,20 @@ ** in rc(8), it also contains a list of other rc ** ** variables you can use. ** ** ** +** Privoxy example files were copied to: ** +** %%PREFIX%%/share/examples/privoxy ** +** ** +** For documentation see: ** +** %%PREFIX%%/share/doc/privoxy-manual or 'man privoxy' ** +** ** +** Note that default.filter, standard.action and ** +** default.action get overwritten with each Privoxy ** +** update. Instead of 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 ** ** directories /var/log/privoxy and /var/run/privoxy ** ** exist and are owned by privoxy:privoxy. ** -** ** -** For documentation see: ** -** %%PREFIX%%/share/doc/privoxy-manual or 'man privoxy' ** *********************************************************** diff --git a/www/privoxy/files/privoxy.in b/www/privoxy/files/privoxy.in index 56814f098e08..5e44c6497868 100644 --- a/www/privoxy/files/privoxy.in +++ b/www/privoxy/files/privoxy.in @@ -34,6 +34,11 @@ load_rc_config ${name} : ${privoxy_user="privoxy"} : ${privoxy_pidfile="/var/run/privoxy/privoxy.pid"} +start_precmd="if [ ! -e ${privoxy_config} ]; then\ + echo ${privoxy_config} not found. Copying default configuration.;\ + cp %%PREFIX%%/share/examples/privoxy/config ${privoxy_config};\ + chown ${privoxy_user}:${privoxy_user} ${privoxy_config};\ +fi" 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 717fd9131ead..0eb7723fcb67 100644 --- a/www/privoxy/pkg-plist +++ b/www/privoxy/pkg-plist @@ -1,9 +1,7 @@ sbin/privoxy -etc/privoxy/config etc/privoxy/default.action -etc/privoxy/standard.action etc/privoxy/default.filter -etc/privoxy/trust +etc/privoxy/standard.action etc/privoxy/templates/blocked etc/privoxy/templates/cgi-error-404 etc/privoxy/templates/cgi-error-bad-param @@ -57,6 +55,10 @@ etc/privoxy/templates/untrusted %%PORTDOCS%%share/doc/privoxy-manual/templates.html %%PORTDOCS%%share/doc/privoxy-manual/upgradersnote.html %%PORTDOCS%%share/doc/privoxy-manual/whatsnew.html +share/examples/privoxy/config +share/examples/privoxy/trust +share/examples/privoxy/user.action +@dirrm share/examples/privoxy %%PORTDOCS%%@dirrm share/doc/privoxy-manual @dirrm etc/privoxy/templates @dirrm etc/privoxy |