diff options
author | alkos333 <me@alkos333.net> | 2010-05-12 17:44:10 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 17:44:10 +0200 |
commit | 83085a75138a02cabc09a50f99f9fb1394ac9324 (patch) | |
tree | 6b75a327c3195a70029830b64be277c4eabc350e /network/privoxy | |
parent | 8f1d80487b8d9de9c7ee52a62c76b60dc5bb20e5 (diff) | |
download | slackbuilds-83085a75138a02cabc09a50f99f9fb1394ac9324.tar.gz |
network/privoxy: Updated for version 3.0.12
Diffstat (limited to 'network/privoxy')
-rw-r--r-- | network/privoxy/README | 18 | ||||
-rw-r--r-- | network/privoxy/doinst.sh | 11 | ||||
-rw-r--r-- | network/privoxy/privoxy.SlackBuild | 47 | ||||
-rw-r--r-- | network/privoxy/privoxy.info | 8 | ||||
-rw-r--r-- | network/privoxy/slack-desc | 13 |
5 files changed, 64 insertions, 33 deletions
diff --git a/network/privoxy/README b/network/privoxy/README index 28c86916a1..3264d54e02 100644 --- a/network/privoxy/README +++ b/network/privoxy/README @@ -9,19 +9,11 @@ networks. Before executing the script, you will need to create a privoxy user and group. To do that, run the following commands: - /usr/sbin/groupadd -g 206 privoxy - - /usr/sbin/useradd -u 206 -g 206 -c "Web Proxy" \ - -d /dev/null -s /bin/false privoxy - -(please note that the \ is just to split the command up, the whole -'useradd' is one line) +groupadd -g 206 privoxy +useradd -u 206 -g 206 -c "Web Proxy" -d /dev/null -s /bin/false privoxy To run privoxy at boot, the following code needs to be added to /etc/rc.d/rc.local: - - if [ -x /etc/rc.d/rc.privoxy ]; then - /etc/rc.d/rc.privoxy start - fi - - + if [ -x /etc/rc.d/rc.privoxy ]; then + /etc/rc.d/rc.privoxy start + fi diff --git a/network/privoxy/doinst.sh b/network/privoxy/doinst.sh index 7d29feb84b..9187187491 100644 --- a/network/privoxy/doinst.sh +++ b/network/privoxy/doinst.sh @@ -1,4 +1,3 @@ -#!/bin/sh config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" @@ -21,6 +20,14 @@ else chmod 0755 etc/rc.d/rc.privoxy.new fi +# If there's no existing log file, move this one over; +# otherwise, kill the new one +if [ ! -e var/log/privoxy/logfile ]; then + mv var/log/privoxy/logfile.new var/log/privoxy/logfile +else + rm -f var/log/privoxy/logfile.new +fi + config etc/rc.d/rc.privoxy.new config etc/privoxy/templates/cgi-error-bad-param.new config etc/privoxy/templates/cgi-error-disabled.new @@ -57,9 +64,9 @@ config etc/privoxy/templates/edit-actions-for-url-filter.new config etc/privoxy/templates/show-status.new config etc/privoxy/templates/show-url-info.new config etc/privoxy/default.action.new -config etc/privoxy/standard.action.new config etc/privoxy/user.action.new config etc/privoxy/user.filter.new config etc/privoxy/config.new config etc/privoxy/trust.new config etc/privoxy/default.filter.new +config etc/privoxy/match-all.action.new diff --git a/network/privoxy/privoxy.SlackBuild b/network/privoxy/privoxy.SlackBuild index 6ddc0cc0f3..c94a8cade8 100644 --- a/network/privoxy/privoxy.SlackBuild +++ b/network/privoxy/privoxy.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh - # Slackware build script for privoxy + # Copyright (c) 2007 alkos333 <me@alkos333.net> # All rights reserved. # @@ -26,10 +26,8 @@ # Modified by the SlackBuilds.org project -set -e - PRGNAM=privoxy -VERSION=3.0.10 +VERSION=3.0.12 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -43,8 +41,29 @@ if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +## privoxy user & group *MUST* exist before package creation +# See http://slackbuilds.org/uid_gid.txt for current recomendations. +PRIVOXY_USER=${PRIVOXY_USER:-privoxy} +PRIVOXY_GROUP=${PRIVOXY_GROUP:-privoxy} + +if ! grep -q ^$PRIVOXY_GROUP: /etc/group 2>/dev/null ; then + echo " Error: PRIVOXY group ($PRIVOXY_GROUP) doesn't exist." + echo " Try creating one with: groupadd -g 206 $PRIVOXY_GROUP" + exit 1 +fi + +if ! grep -q ^$PRIVOXY_USER: /etc/passwd 2>/dev/null ; then + echo " Error: PRIVOXY user ($PRIVOXY_USER) doesn't exist." + echo " Try creating one with: useradd -u 206 -g $PRIVOXY_GROUP -d /dev/null -s /bin/false $PRIVOXY_USER" + exit 1 fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -65,9 +84,11 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=$PKG/var \ --datadir=$PKG/usr \ --mandir=$PKG/usr/man \ + --docdir=$PKG/usr/doc/$PRGNAM-$VERSION \ --with-docbook=no \ - --with-user=privoxy \ - --with-group=privoxy + --with-user=$PRIVOXY_USER \ + --with-group=$PRIVOXY_GROUP \ + --build=$ARCH-slackware-linux make || exit 1 make install-strip || exit 1 @@ -81,7 +102,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 644 {} \; mkdir $PKG/etc/rc.d -cat $TMP/$PRGNAM-$VERSION-stable/slackware/rc.privoxy.orig > $PKG/etc/rc.d/rc.$PRGNAM.new +cat slackware/rc.privoxy.orig > $PKG/etc/rc.d/rc.$PRGNAM.new sed -i " s/%PROGRAM%/$PRGNAM/ s/%SBIN_DEST%/\/usr\/bin/ s/%CONF_DEST%/\/etc\/$PRGNAM/ @@ -92,13 +113,17 @@ sed -i " s/%PROGRAM%/$PRGNAM/ # Fix Path within the configuration files (thanks to h4kteur) sed -i "s#$PKG##g" $PKG/etc/$PRGNAM/config -# Fix Path with the config file to point to right usermanual (thanks toBP{k}) -sed -i "s#user-manual /usr/doc/$PRGNAM#user-manual /usr/doc/$PRGNAM-$VERSION#" $PKG/etc/privoxy/config +# Fix Path with the config file to point to right usermanual (thanks to BP{k}) +sed -i \ + "s#user-manual /usr/doc/$PRGNAM#user-manual /usr/doc/$PRGNAM-$VERSION#" \ + $PKG/etc/privoxy/config # Make .new files so we dont clobber existing configuration find $PKG/etc/privoxy -type f -exec mv {} {}.new \; - -# Remove this directory since it empty and part of Slackware base +# Don't clobber the logfile either +mv $PKG/var/log/privoxy/logfile $PKG/var/log/privoxy/logfile.new + +# Remove this directory since it's empty and part of Slackware base rmdir $PKG/var/run mkdir -p $PKG/install diff --git a/network/privoxy/privoxy.info b/network/privoxy/privoxy.info index bef393736d..282aa9fb54 100644 --- a/network/privoxy/privoxy.info +++ b/network/privoxy/privoxy.info @@ -1,8 +1,8 @@ PRGNAM="privoxy" -VERSION="3.0.10" +VERSION="3.0.12" HOMEPAGE="http://www.privoxy.org/" -DOWNLOAD="http://downloads.sourceforge.net/sourceforge/ijbswa/privoxy-3.0.10-stable-src.tar.gz" -MD5SUM="01281017f28be2c7133124d1768da364" +DOWNLOAD="http://downloads.sourceforge.net/sourceforge/ijbswa/privoxy-3.0.12-stable-src.tar.gz" +MD5SUM="c973e608d27b248ef567b47664308da1" MAINTAINER="alkos333" EMAIL="me@alkos333.net" -APPROVED="Erik Hanson" +APPROVED="dsomero" diff --git a/network/privoxy/slack-desc b/network/privoxy/slack-desc index cdbee40837..da4a4d9560 100644 --- a/network/privoxy/slack-desc +++ b/network/privoxy/slack-desc @@ -1,6 +1,14 @@ - |-----handy-ruler------------------------------------------------------| +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-------------------------------------------------------| +privoxy: Privoxy (a web proxy with advanced filtering capabilities) privoxy: -privoxy: Privoxy is a web proxy with advanced filtering capabilities for +privoxy: Privoxy is a web proxy with advanced filtering capabilities for privoxy: protecting privacy, modifying web page data, managing cookies, privoxy: controlling access, and removing ads, banners, pop-ups and other privoxy: obnoxious Internet junk. Privoxy has a very flexible configuration @@ -9,4 +17,3 @@ privoxy: has application for both stand-alone systems and multi-user networks. privoxy: privoxy: Homepage: http://www.privoxy.org/ privoxy: -privoxy: |