network/polipo: Added to 12.2 repository

This commit is contained in:
Marco Bonetti 2010-05-12 23:32:41 +02:00 committed by David Somero
parent 045310e29e
commit 54fed56da4
7 changed files with 189 additions and 0 deletions

23
network/polipo/README Normal file
View file

@ -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.

22
network/polipo/doinst.sh Normal file
View file

@ -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

Binary file not shown.

View file

@ -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

View file

@ -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"

30
network/polipo/rc.polipo Normal file
View file

@ -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

19
network/polipo/slack-desc Normal file
View file

@ -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: