aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-10-07 16:47:15 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-10-07 16:47:15 +0000
commit511f0f0ca578e78fa2a324bce960a9d64da13a8e (patch)
tree89610787014961037467dc91c07363a7651526d3 /www
parent8b3c859c2a1538f8199c39b5bfc5134ede2b670b (diff)
Notes
Diffstat (limited to 'www')
-rw-r--r--www/privoxy/Makefile9
-rw-r--r--www/privoxy/files/patch-configure.in141
-rw-r--r--www/privoxy/files/pkg-message.in23
-rw-r--r--www/privoxy/files/privoxy.in42
-rw-r--r--www/privoxy/files/privoxy.sh.in50
-rw-r--r--www/privoxy/pkg-plist1
6 files changed, 66 insertions, 200 deletions
diff --git a/www/privoxy/Makefile b/www/privoxy/Makefile
index 391759d8fc23..f0eb9c4862f2 100644
--- a/www/privoxy/Makefile
+++ b/www/privoxy/Makefile
@@ -7,13 +7,13 @@
PORTNAME= privoxy
PORTVERSION= 3.0.3
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ijbswa
DISTNAME= privoxy-${PORTVERSION}-stable-src
-MAINTAINER= freebsd-listen@fabiankeil.de
+MAINTAINER= fk@fabiankeil.de
COMMENT= Privoxy is a web proxy with advanced filtering capabilities
WRKSRC= ${WRKDIR}/privoxy-${PORTVERSION}-stable
@@ -21,7 +21,7 @@ WRKSRC= ${WRKDIR}/privoxy-${PORTVERSION}-stable
USE_GMAKE= yes
USE_AUTOTOOLS= autoconf:253
-USE_RC_SUBR= privoxy.sh
+USE_RC_SUBR= privoxy
SUB_FILES= pkg-message
MAKEFILE= GNUmakefile
@@ -32,7 +32,6 @@ post-patch:
${REINPLACE_CMD} \
-e 's,^\(confdir\) \.,\1 ${PREFIX}/etc/privoxy,' \
-e 's,^\(logdir\) \.,\1 /var/log/privoxy,' \
- -e 's,^\(actionsfile standard\),#\1,' \
-e 's,^\(actionsfile user\),#\1,' \
${WRKSRC}/config
@@ -47,7 +46,7 @@ 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 default.filter trust
+.for file in config default.action standard.action default.filter trust
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/etc/privoxy
.endfor
@${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1
diff --git a/www/privoxy/files/patch-configure.in b/www/privoxy/files/patch-configure.in
deleted file mode 100644
index 9282cad4e9b3..000000000000
--- a/www/privoxy/files/patch-configure.in
+++ /dev/null
@@ -1,141 +0,0 @@
--- Patch by Lars Eggert <larse@isi.edu> USC Information Sciences Institute
---- configure.in.orig Fri Feb 20 17:15:20 2003
-+++ configure.in Fri Feb 20 17:15:51 2003
-@@ -726,137 +726,6 @@
- AC_SUBST(PTHREAD_ONLY)
-
- dnl =================================================================
--dnl Support for thread-safe versions of gethostbyaddr, gethostbyname,
--dnl gmtime and localtime
--dnl =================================================================
--
--dnl Next line needed to find the gethost*_r functions on Solaris
--AC_CHECK_LIB(nsl, gethostbyname)
--
--AC_CHECK_FUNC(gethostbyaddr_r, [
-- AC_MSG_CHECKING([signature of gethostbyaddr_r])
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent *h, *hp;
-- char *a, *b;
-- int l, bl, t, e;
-- (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYADDR_R_8_ARGS)
-- AC_MSG_RESULT([8 args])
-- ], [
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent *h;
-- char *a, *b;
-- int l, bl, t, e;
-- (void) gethostbyaddr_r(a, l, t, h, b, bl, &e)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYADDR_R_7_ARGS)
-- AC_MSG_RESULT([7 args])
-- ], [
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent_data *d;
-- struct hostent *h;
-- char a,
-- int l, t;
-- (void) gethostbyaddr_r(a, l, t, h, d)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYADDR_R_5_ARGS)
-- AC_MSG_RESULT([5 args])
-- ], [
-- AC_MSG_RESULT(unrecognised)
-- ])
-- ])
-- ])
--], [
-- AC_MSG_RESULT(no)
--])
--
--AC_CHECK_FUNC(gethostbyname_r, [
-- AC_MSG_CHECKING([signature of gethostbyname_r])
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent *h, *r;
-- char *n, *b;
-- int bl, e;
-- (void) gethostbyname_r(n, h, b, bl, &r, &e)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARGS)
-- AC_MSG_RESULT([6 args])
-- ], [
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent *h;
-- char *n, *b;
-- int bl, e;
-- (void) gethostbyname_r(n, h, b, bl, &e)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARGS)
-- AC_MSG_RESULT([5 args])
-- ], [
-- AC_TRY_COMPILE([
--# include <netdb.h>
-- ], [
-- struct hostent_data *d;
-- struct hostent *h;
-- char *n,
-- (void) gethostbyname_r(n, h, d)
-- ], [
-- AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARGS)
-- AC_MSG_RESULT([3 args])
-- ], [
-- AC_MSG_RESULT(unrecognised)
-- ])
-- ])
-- ])
--], [
-- AC_MSG_RESULT(no)
--])
--
--AC_CHECK_FUNC(gmtime_r, [
-- AC_MSG_CHECKING([signature of gmtime_r])
-- AC_TRY_COMPILE([
--# include <time.h>
-- ], [
-- struct time *t;
-- struct tm *tm;
-- (void) gmtime_r(t, tm)
-- ], [
-- AC_MSG_RESULT(ok)
-- AC_DEFINE(HAVE_GMTIME_R)
-- ], [
-- AC_MSG_RESULT(unrecognised)
-- ])
--], [
-- AC_MSG_RESULT(no)
--])
--
--AC_CHECK_FUNC(localtime_r, [
-- AC_MSG_CHECKING([signature of localtime_r])
-- AC_TRY_COMPILE([
--# include <time.h>
-- ], [
-- struct time *t;
-- struct tm *tm;
-- (void) localtime_r(t, tm)
-- ], [
-- AC_MSG_RESULT(ok)
-- AC_DEFINE(HAVE_LOCALTIME_R)
-- ], [
-- AC_MSG_RESULT(unrecognised)
-- ])
--], [
-- AC_MSG_RESULT(no)
--])
--
--dnl =================================================================
- dnl Solaris specific
- dnl FIXME: Not tested on Solaris yet...
- dnl ISFIXED: Have tested it on Solaris, but there are other ways to
diff --git a/www/privoxy/files/pkg-message.in b/www/privoxy/files/pkg-message.in
index 7b127e5e7aa3..c4bd244652bc 100644
--- a/www/privoxy/files/pkg-message.in
+++ b/www/privoxy/files/pkg-message.in
@@ -1,10 +1,25 @@
***********************************************************
-** Before running privoxy you must modify the file **
+** 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. **
** **
-** Start privoxy with: **
-** %%PREFIX%%/sbin/privoxy %%PREFIX%%/etc/privoxy/config **
+** 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" **
** **
-** For documentation see: **
+** To start Privoxy manually, run: **
+** %%PREFIX%%/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. **
+** **
+** 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
new file mode 100644
index 000000000000..56814f098e08
--- /dev/null
+++ b/www/privoxy/files/privoxy.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+#
+# PROVIDE: privoxy
+# REQUIRE: NETWORKING
+# BEFORE: LOGIN
+#
+# This rc script understands the following variables
+# which are read from /etc/rc.conf:
+#
+# privoxy_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable Privoxy.
+# privoxy_config (str): Privoxy's configuration file. Default is:
+# %%PREFIX%%/etc/privoxy/config.
+# privoxy_flags (str): List of additional Privoxy options you want
+# to use. None set by default.
+# privoxy_pidfile (str): Default is /var/run/privoxy/privoxy.pid.
+# privoxy_user (str): Privoxy Daemon user. Default is privoxy.
+#
+# Usage:
+# %%PREFIX%%/etc/rc.d/privoxy [fast|force|one](start|stop|restart|rcvar|status|poll)
+
+. %%RC_SUBR%%
+
+name="privoxy"
+rcvar=${name}_enable
+load_rc_config ${name}
+
+: ${privoxy_enable="NO"}
+: ${privoxy_config="%%PREFIX%%/etc/privoxy/config"}
+: ${privoxy_flags=""}
+: ${privoxy_user="privoxy"}
+: ${privoxy_pidfile="/var/run/privoxy/privoxy.pid"}
+
+
+command="%%PREFIX%%/sbin/privoxy"
+command_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}"
+
+run_rc_command "$1"
+
diff --git a/www/privoxy/files/privoxy.sh.in b/www/privoxy/files/privoxy.sh.in
deleted file mode 100644
index f29bb8c32b2a..000000000000
--- a/www/privoxy/files/privoxy.sh.in
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-#
-#
-
-# PROVIDE: privoxy
-# REQUIRE: NETWORKING
-
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-# SET THEM IN THE /etc/rc.conf FILE
-#
-privoxy_enable=${privoxy_enable-"NO"}
-privoxy_flags=${privoxy_flags-""}
-privoxy_pidfile=${privoxy_pidfile-"/var/run/privoxy/privoxy.pid"}
-
-. %%RC_SUBR%%
-
-name="privoxy"
-rcvar=`set_rcvar`
-command="%%PREFIX%%/sbin/privoxy"
-stop_cmd="privoxy_stop"
-start_cmd="privoxy_start"
-
-pidfile="${privoxy_pidfile}"
-configfile=%%PREFIX%%/etc/privoxy/config
-
-privoxy_start()
-{
- if [ -f ${pidfile} ] ;then
- echo "${name} is already running"
- else
- echo "Starting ${name}."
- su -m privoxy -c "${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile}" \
- 1>/dev/null 2>&1
- fi
-}
-
-privoxy_stop()
-{
- if [ ! -f ${pidfile} ] ;then
- echo "${name} is not running"
- else
- kill -9 `cat ${pidfile}`
- rm -f ${pidfile}
- echo "${name} stopped"
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/www/privoxy/pkg-plist b/www/privoxy/pkg-plist
index 8ba4d147f950..734f86275af5 100644
--- a/www/privoxy/pkg-plist
+++ b/www/privoxy/pkg-plist
@@ -1,6 +1,7 @@
sbin/privoxy
etc/privoxy/config
etc/privoxy/default.action
+etc/privoxy/standard.action
etc/privoxy/default.filter
etc/privoxy/trust
etc/privoxy/templates/blocked