network/privoxy: Updated for version 3.0.18.

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Kyle Guinn 2011-12-10 09:12:35 -02:00 committed by Niels Horn
parent 4c007e2578
commit 7c7ac7975b
4 changed files with 52 additions and 81 deletions

View file

@ -10,15 +10,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.privoxy.new:
if [ -e etc/rc.d/rc.privoxy ]; then
cp -a etc/rc.d/rc.privoxy etc/rc.d/rc.privoxy.new.incoming
cat etc/rc.d/rc.privoxy.new > etc/rc.d/rc.privoxy.new.incoming
mv etc/rc.d/rc.privoxy.new.incoming etc/rc.d/rc.privoxy.new
else
# Install executable otherwise - irrelevant unless user starts in rc.local
chmod 0755 etc/rc.d/rc.privoxy.new
fi
preserve_perms() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ -e $OLD ]; then
cp -a $OLD ${NEW}.incoming
cat $NEW > ${NEW}.incoming
mv ${NEW}.incoming $NEW
fi
config $NEW
}
# If there's no existing log file, move this one over;
# otherwise, kill the new one
@ -28,48 +29,14 @@ else
rm -f var/log/privoxy/logfile.new
fi
preserve_perms etc/rc.d/rc.privoxy.new
config etc/privoxy/config.new
config etc/privoxy/default.action.new
config etc/privoxy/default.filter.new
config etc/privoxy/match-all.action.new
config etc/privoxy/templates/blocked.new
config etc/privoxy/templates/cgi-error-404.new
config etc/privoxy/templates/cgi-error-bad-param.new
config etc/privoxy/templates/cgi-error-disabled.new
config etc/privoxy/templates/cgi-error-file-read-only.new
config etc/privoxy/templates/cgi-error-file.new
config etc/privoxy/templates/cgi-error-modified.new
config etc/privoxy/templates/cgi-error-parse.new
config etc/privoxy/templates/cgi-style.css.new
config etc/privoxy/templates/connect-failed.new
config etc/privoxy/templates/connection-timeout.new
config etc/privoxy/templates/default.new
config etc/privoxy/templates/edit-actions-add-url-form.new
config etc/privoxy/templates/edit-actions-for-url-filter.new
config etc/privoxy/templates/edit-actions-for-url.new
config etc/privoxy/templates/edit-actions-list-button.new
config etc/privoxy/templates/edit-actions-list-section.new
config etc/privoxy/templates/edit-actions-list-url.new
config etc/privoxy/templates/edit-actions-list.new
config etc/privoxy/templates/edit-actions-remove-url-form.new
config etc/privoxy/templates/edit-actions-url-form.new
config etc/privoxy/templates/forwarding-failed.new
config etc/privoxy/templates/mod-local-help.new
config etc/privoxy/templates/mod-support-and-service.new
config etc/privoxy/templates/mod-title.new
config etc/privoxy/templates/mod-unstable-warning.new
config etc/privoxy/templates/no-server-data.new
config etc/privoxy/templates/no-such-domain.new
config etc/privoxy/templates/show-request.new
config etc/privoxy/templates/show-status-file.new
config etc/privoxy/templates/show-status.new
config etc/privoxy/templates/show-url-info.new
config etc/privoxy/templates/show-version.new
config etc/privoxy/templates/toggle-mini.new
config etc/privoxy/templates/toggle.new
config etc/privoxy/templates/untrusted.new
config etc/privoxy/templates/url-info-osd.xml.new
config etc/privoxy/trust.new
config etc/privoxy/user.action.new
config etc/privoxy/user.filter.new
config etc/rc.d/rc.privoxy.new
for conf_file in etc/privoxy/templates/*.new; do
config $conf_file
done

View file

@ -27,7 +27,7 @@
# Modified by the SlackBuilds.org project
PRGNAM=privoxy
VERSION=${VERSION:-3.0.17}
VERSION=${VERSION:-3.0.18}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -86,56 +86,60 @@ cd $PRGNAM-$VERSION-stable
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Put the docs where we tell them to go.
# Also fix their permissions.
sed -i \
-e "/^DOC_DEST/s/= .*/= @docdir@/" \
-e "/^RA_MODE/s/0664/0644/" \
GNUmakefile.in
autoheader
autoconf
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=$PKG/usr \
--libdir=$PKG/usr/lib${LIBDIRSUFFIX} \
--sbindir=$PKG/usr/bin \
--sysconfdir=$PKG/etc/$PRGNAM \
--localstatedir=$PKG/var \
--datadir=$PKG/usr \
--mandir=$PKG/usr/man \
--docdir=$PKG/usr/doc/$PRGNAM-$VERSION \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc/$PRGNAM \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux \
--with-docbook=no \
--with-user=$PRIVOXY_USER \
--with-group=$PRIVOXY_GROUP \
--build=$ARCH-slackware-linux
--enable-no-gifs \
--enable-compression
make
make install-strip
make install-strip DESTDIR=$PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
find $PKG/usr/doc -type f -exec chmod 644 {} \;
mkdir $PKG/etc/rc.d
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,
s/%USER%/$PRGNAM/
s/%GROUP%/$PRGNAM/
" $PKG/etc/rc.d/rc.$PRGNAM.new
# 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 to BP{k})
chmod +x $PKG/etc/rc.d/rc.$PRGNAM.new
sed -i \
"s#user-manual /usr/doc/$PRGNAM#user-manual /usr/doc/$PRGNAM-$VERSION#" \
$PKG/etc/privoxy/config
-e "s/%PROGRAM%/$PRGNAM/" \
-e "s,%SBIN_DEST%,/usr/sbin," \
-e "s,%CONF_DEST%,/etc/$PRGNAM," \
-e "s/%USER%/$PRIVOXY_USER/" \
-e "s/%GROUP%/$PRIVOXY_GROUP/" \
$PKG/etc/rc.d/rc.$PRGNAM.new
# Make .new files so we dont clobber existing configuration
find $PKG/etc/privoxy -type f -exec mv {} {}.new \;
# Don't clobber the logfile either
# Make .new files so we don't clobber the existing configuration.
# The makefile already adds the .new extension to some files,
# perhaps those are the only ones that are meant to be edited?
find $PKG/etc/privoxy -name '*.new' -prune -o -type f -exec mv {} {}.new \;
# 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
# Remove empty directories that are part of Slackware base.
rmdir $PKG/usr/share
rmdir $PKG/var/run
mkdir -p $PKG/install

View file

@ -1,10 +1,10 @@
PRGNAM="privoxy"
VERSION="3.0.17"
VERSION="3.0.18"
HOMEPAGE="http://www.privoxy.org/"
DOWNLOAD="http://downloads.sourceforge.net/ijbswa/privoxy-3.0.17-stable-src.tar.gz"
MD5SUM="9d363d738a3f3d73e774d6dfeafdb15f"
DOWNLOAD="http://downloads.sourceforge.net/project/ijbswa/Sources/3.0.18%20%28stable%29/privoxy-3.0.18-stable-src.tar.gz"
MD5SUM="baf0b13bb591ec6e1ba15b720ddea65c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"
APPROVED="Erik Hanson"
APPROVED="Niels Horn"

View file

@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler-------------------------------------------------------|
|-----handy-ruler------------------------------------------------------|
privoxy: Privoxy (a web proxy with advanced filtering capabilities)
privoxy:
privoxy: Privoxy is a web proxy with advanced filtering capabilities for