mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
network/squid: Updated for version 3.0.STABLE21
This commit is contained in:
parent
0b3f8d9c4c
commit
7f829d9a90
7 changed files with 34 additions and 104 deletions
|
@ -7,4 +7,6 @@ Squid supports SSL, extensive access controls, and full request logging.
|
|||
By using the lightweight Internet Cache Protocol, squid caches can be
|
||||
arranged in a hierarchy or mesh for additional bandwidth savings.
|
||||
|
||||
See /usr/doc/squid-3.0.STABLE13/README.SBo for configuration help.
|
||||
See /usr/doc/squid-3.0.STABLE21/README.SBo for configuration help.
|
||||
Note that the default squid.conf and /etc/logrotate.d/squid files have
|
||||
changed in this release, so be sure to merge the changes into place.
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Start/stop/restart/reload the Squid Internet Object Cache (squid)
|
||||
# To make Squid start automatically at boot, make this
|
||||
# file executable: chmod 755 /etc/rc.d/rc.Squid
|
||||
#
|
||||
# Written for Slackware Linux by Erik Jan Tromp
|
||||
# Modified by David Somero <xgizzmo@slackbuilds.org>
|
||||
|
||||
SQUIDCFG=/etc/squid/squid.conf
|
||||
SQUIDCMD=/usr/sbin/squid
|
||||
|
||||
if [ ! -r $SQUIDCFG ]; then
|
||||
echo "Please set the correct path to $SQUIDCFG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -x $SQUIDCMD ]; then
|
||||
echo "$SQUIDCMD not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
squid_start() {
|
||||
# Create cache directory hierarchy if needed
|
||||
ALL_DIRS=$(awk '/^cache_dir/ {print $3}' $SQUIDCFG)
|
||||
[ -z "$ALL_DIRS" ] && ALL_DIRS=/var/cache/squid
|
||||
|
||||
for CACHE_DIR in $ALL_DIRS ; do
|
||||
if [ ! -d $CACHE_DIR/00 ] ; then
|
||||
echo "Creating swap directories: $SQUIDCMD -z"
|
||||
$SQUIDCMD -z 2> /dev/null
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Starting Squid: $SQUIDCMD -DF"
|
||||
$SQUIDCMD -DF
|
||||
}
|
||||
|
||||
squid_stop() {
|
||||
COUNTDOWN=$(awk '/^shutdown_lifetime/ {print $2}' $SQUIDCFG)
|
||||
[ -z "$COUNTDOWN" ] && COUNTDOWN=30
|
||||
|
||||
echo -n "Shutting down Squid in $COUNTDOWN seconds: "
|
||||
$SQUIDCMD -k shutdown 2> /dev/null
|
||||
while $SQUIDCMD -k check 2> /dev/null ; do
|
||||
sleep 1
|
||||
echo -n .
|
||||
COUNTDOWN=$[ $COUNTDOWN - 1 ]
|
||||
if [ $COUNTDOWN -le 0 ] ; then
|
||||
$SQUIDCMD -k interrupt 2> /dev/null
|
||||
sleep 1
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo
|
||||
}
|
||||
|
||||
squid_restart() {
|
||||
squid_stop
|
||||
sleep 1
|
||||
squid_start
|
||||
}
|
||||
|
||||
squid_reload() {
|
||||
$SQUIDCMD -k reconfigure 2> /dev/null
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
squid_start
|
||||
;;
|
||||
'stop')
|
||||
squid_stop
|
||||
;;
|
||||
'restart')
|
||||
squid_restart
|
||||
;;
|
||||
'reload')
|
||||
squid_reload
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 start|stop|restart|reload"
|
||||
esac
|
|
@ -12,9 +12,8 @@ squid: Squid is a high-performance proxy caching server for web clients,
|
|||
squid: supporting FTP, gopher, and HTTP data objects.
|
||||
squid:
|
||||
squid: Homepage: http://www.squid-cache.org/
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
squid:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Slackware build script for squid
|
||||
# http://www.squid-cache.org/
|
||||
|
||||
# Copyright 2006-2008 David Somero (dsomero@hotmail.com) Athens,TN USA
|
||||
# Copyright 2006-2009 David Somero (dsomero@hotmail.com) Athens,TN USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -24,7 +24,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=squid
|
||||
VERSION=3.0.STABLE14
|
||||
VERSION=3.0.STABLE21
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
@ -39,10 +39,13 @@ SQUIDGROUP=${SQUIDGROUP:-nobody}
|
|||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
@ -64,15 +67,17 @@ CFLAGS="$SLKCFLAGS" \
|
|||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc/squid \
|
||||
--localstatedir=/var/log/squid \
|
||||
--datadir=/usr/share/squid \
|
||||
--mandir=/usr/man \
|
||||
--enable-snmp \
|
||||
--enable-auth="basic" \
|
||||
--enable-basic-auth-helpers="NCSA" \
|
||||
--enable-linux-netfilter \
|
||||
--enable-async-io \
|
||||
--build=$ARCH-slackware-linux \
|
||||
--host=$ARCH-slackware-linux
|
||||
--build=$ARCH-slackware-linux
|
||||
|
||||
make all
|
||||
make install DESTDIR=$PKG
|
||||
|
@ -81,7 +86,7 @@ make install DESTDIR=$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
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
)
|
||||
|
||||
( cd $PKG/usr/man
|
||||
|
@ -125,4 +130,4 @@ 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
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
|
|
@ -1919,7 +1919,7 @@ cache_store_log /var/log/squid/store.log
|
|||
# <pid>'.
|
||||
#
|
||||
#Default:
|
||||
# logfile_rotate 10
|
||||
logfile_rotate 0
|
||||
|
||||
# TAG: emulate_httpd_log on|off
|
||||
# The Cache can emulate the log file format which many 'httpd'
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
PRGNAM="squid"
|
||||
VERSION="3.0.STABLE14"
|
||||
VERSION="3.0.STABLE21"
|
||||
HOMEPAGE="http://www.squid-cache.org/"
|
||||
DOWNLOAD="http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE14.tar.bz2"
|
||||
MD5SUM="7aaff2319d2263404d788a82a10c8633"
|
||||
DOWNLOAD="http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE21.tar.bz2"
|
||||
MD5SUM="279168fe1fe5b38bbf6eee12babbc4ad"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="David Somero"
|
||||
EMAIL="dsomero@hotmail.com"
|
||||
APPROVED="rworkman"
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
# We set logfile_rotate=0 in squid.conf, which disables filename rotation
|
||||
# by squid itself (as we'll let logrotate handle the filename rotation), but
|
||||
# squid still closes and then reopens the logfile. The goal of this file is
|
||||
# to rotate the logfile (rename it from squid.log to squid.log.1) without
|
||||
# compressing it immediately, as squid will still be writing to the renamed
|
||||
# log file. Then the postrotate script will tell squid to close and then
|
||||
# reopen squid.log, effectively using the new logfile. The old logfile
|
||||
# (squid.log.1) will be compressed by logrotate's next invocation.
|
||||
/var/log/squid/*.log {
|
||||
weekly
|
||||
rotate 5
|
||||
copytruncate
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
missingok
|
||||
# This script asks squid to rotate its logs on its own.
|
||||
# Restarting squid is a long process and it is not worth
|
||||
# doing it just to rotate logs
|
||||
postrotate
|
||||
/usr/sbin/squid -k rotate
|
||||
endscript
|
||||
|
|
Loading…
Reference in a new issue