diff options
author | Kyle Guinn <elyk03@gmail.com> | 2011-12-10 09:12:35 -0200 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-12-10 09:12:35 -0200 |
commit | 7c7ac7975b888ea1976c30850161b41247b06e9e (patch) | |
tree | 94f242645ae9ea3189fc3d9dc03a3fff8f4598a3 /network/privoxy | |
parent | 4c007e25781769b4095826a7ec5cecd17179b6b4 (diff) | |
download | slackbuilds-7c7ac7975b888ea1976c30850161b41247b06e9e.tar.gz |
network/privoxy: Updated for version 3.0.18.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/privoxy')
-rw-r--r-- | network/privoxy/doinst.sh | 61 | ||||
-rw-r--r-- | network/privoxy/privoxy.SlackBuild | 64 | ||||
-rw-r--r-- | network/privoxy/privoxy.info | 8 | ||||
-rw-r--r-- | network/privoxy/slack-desc | 2 |
4 files changed, 53 insertions, 82 deletions
diff --git a/network/privoxy/doinst.sh b/network/privoxy/doinst.sh index 71fb8f31d2..69368538fb 100644 --- a/network/privoxy/doinst.sh +++ b/network/privoxy/doinst.sh @@ -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 diff --git a/network/privoxy/privoxy.SlackBuild b/network/privoxy/privoxy.SlackBuild index 4bf223cc26..27e440467b 100644 --- a/network/privoxy/privoxy.SlackBuild +++ b/network/privoxy/privoxy.SlackBuild @@ -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 - -# Make .new files so we dont clobber existing configuration -find $PKG/etc/privoxy -type f -exec mv {} {}.new \; -# Don't clobber the logfile either + -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 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 diff --git a/network/privoxy/privoxy.info b/network/privoxy/privoxy.info index af89be4e70..8cfee7c3b0 100644 --- a/network/privoxy/privoxy.info +++ b/network/privoxy/privoxy.info @@ -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" diff --git a/network/privoxy/slack-desc b/network/privoxy/slack-desc index da4a4d9560..7bcb90f85e 100644 --- a/network/privoxy/slack-desc +++ b/network/privoxy/slack-desc @@ -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 |