diff options
Diffstat (limited to 'network')
-rw-r--r-- | network/polipo/README | 23 | ||||
-rw-r--r-- | network/polipo/doinst.sh | 22 | ||||
-rw-r--r-- | network/polipo/makefile.patch.gz | bin | 0 -> 708 bytes | |||
-rw-r--r-- | network/polipo/polipo.SlackBuild | 87 | ||||
-rw-r--r-- | network/polipo/polipo.info | 8 | ||||
-rw-r--r-- | network/polipo/rc.polipo | 30 | ||||
-rw-r--r-- | network/polipo/slack-desc | 19 |
7 files changed, 189 insertions, 0 deletions
diff --git a/network/polipo/README b/network/polipo/README new file mode 100644 index 0000000000000..f9c4c2f41b6d8 --- /dev/null +++ b/network/polipo/README @@ -0,0 +1,23 @@ +Polipo is a small and fast caching web proxy (a web cache, an HTTP proxy, a +proxy server). While Polipo was designed to be used by one person or a small +group of people, there is nothing that prevents it from being used by a larger +group. + +Polipo has some features that are, as far as I know, unique among currently +available proxies: + * Polipo will use HTTP/1.1 pipelining if it believes that the remote server + supports it, whether the incoming requests are pipelined or come in + simultaneously on multiple connections (this is more than the simple usage + of persistent connections, which is done by e.g. Squid); Polipo will cache + the initial segment of an instance if the download has been interrupted, + and, if necessary, complete it later using Range requests; + * Polipo will upgrade client requests to HTTP/1.1 even if they come in as + HTTP/1.0, and up- or downgrade server replies to the client's capabilities + (this may involve conversion to or from the HTTP/1.1 chunked encoding); + * Polipo has complete support for IPv6 (except for scoped (link-local) + addresses). + * Polipo can optionally use a technique known as Poor Man's Multiplexing to + reduce latency even further. + +In short, Polipo uses a plethora of techniques to make web browsing (seem) +faster. diff --git a/network/polipo/doinst.sh b/network/polipo/doinst.sh new file mode 100644 index 0000000000000..cd33693a41eaa --- /dev/null +++ b/network/polipo/doinst.sh @@ -0,0 +1,22 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.polipo.new: +if [ -e etc/rc.d/rc.polipo ]; then + cp -a etc/rc.d/rc.polipo etc/rc.d/rc.polipo.new.incoming + cat etc/rc.d/rc.polipo.new > etc/rc.d/rc.polipo.new.incoming + mv etc/rc.d/rc.polipo.new.incoming etc/rc.d/rc.polipo.new +fi + +config etc/rc.d/rc.polipo.new +config etc/polipo/config.new diff --git a/network/polipo/makefile.patch.gz b/network/polipo/makefile.patch.gz Binary files differnew file mode 100644 index 0000000000000..fbbf61bb07e0c --- /dev/null +++ b/network/polipo/makefile.patch.gz diff --git a/network/polipo/polipo.SlackBuild b/network/polipo/polipo.SlackBuild new file mode 100644 index 0000000000000..1f442a5451862 --- /dev/null +++ b/network/polipo/polipo.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/sh + +# Slackware build script for Polipo +# +# Copyright 2009-2010 Marco Bonetti <sid77@slackware.it> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +PRGNAM=polipo +VERSION=${VERSION:-1.0.4} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +DOCS="CHANGES COPYING INSTALL README" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION + +# Fix Makefile and add a sample config file +zcat $CWD/makefile.patch.gz | patch -p1 --verbose + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +make +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* + +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.polipo > $PKG/etc/rc.d/rc.polipo.new + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/polipo/polipo.info b/network/polipo/polipo.info new file mode 100644 index 0000000000000..5ebc3db236e6b --- /dev/null +++ b/network/polipo/polipo.info @@ -0,0 +1,8 @@ +PRGNAM="polipo" +VERSION="1.0.4" +HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/" +DOWNLOAD="http://www.pps.jussieu.fr/~jch/software/files/polipo/polipo-1.0.4.tar.gz" +MD5SUM="defdce7f8002ca68705b6c2c36c4d096" +MAINTAINER="Marco Bonetti" +EMAIL="sid77@slackware.it" +APPROVED="dsomero" diff --git a/network/polipo/rc.polipo b/network/polipo/rc.polipo new file mode 100644 index 0000000000000..c08ae73250344 --- /dev/null +++ b/network/polipo/rc.polipo @@ -0,0 +1,30 @@ +#!/bin/sh + +# Force the pid file to a known location +PIDFILE="/var/run/polipo/polipo.pid" + +start() { + echo "Starting polipo..." + polipo daemonise=true pidFile=$PIDFILE +} + +stop() { + echo "Stopping polipo..." + kill `cat $PIDFILE` +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 (start|stop|restart)" +esac diff --git a/network/polipo/slack-desc b/network/polipo/slack-desc new file mode 100644 index 0000000000000..b26e951e7dc92 --- /dev/null +++ b/network/polipo/slack-desc @@ -0,0 +1,19 @@ +# 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------------------------------------------------------| +polipo: Polipo (caching web proxy) +polipo: +polipo: Polipo is a small and fast caching web proxy (a web cache, an HTTP +polipo: proxy, a proxy server). While Polipo was designed to be used by one +polipo: person or a small group of people, there is nothing that prevents it +polipo: from being used by a larger group. +polipo: +polipo: +polipo: +polipo: +polipo: |