aboutsummaryrefslogtreecommitdiff
path: root/network/squid/squid.SlackBuild
diff options
context:
space:
mode:
authorDavid Somero <dsomero@hotmail.com>2010-05-11 22:25:45 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:25:45 +0200
commit4b92df5b32dc4c10d297fb9e7545b86d040f4f4d (patch)
treef7df93a9bcbb85461542008a883068b66255a6fe /network/squid/squid.SlackBuild
parenta076c5e85b0f9c5654c22daf88b7909f00026564 (diff)
network/squid: Updated for version 3.0.STABLE10
Diffstat (limited to 'network/squid/squid.SlackBuild')
-rw-r--r--network/squid/squid.SlackBuild37
1 files changed, 22 insertions, 15 deletions
diff --git a/network/squid/squid.SlackBuild b/network/squid/squid.SlackBuild
index 7f99dfbdfdfdd..de7206f75dfda 100644
--- a/network/squid/squid.SlackBuild
+++ b/network/squid/squid.SlackBuild
@@ -24,9 +24,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=squid
-VERSION=3.0.STABLE2
+VERSION=3.0.STABLE10
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -41,6 +41,8 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
set -e
@@ -49,10 +51,14 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.*z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -62,12 +68,11 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var/log/squid \
--datadir=/usr/share/squid \
--mandir=/usr/man \
- --program-prefix="" \
- --program-suffix="" \
--enable-snmp \
--enable-linux-netfilter \
--enable-async-io \
- --build=i486-slackware-linux
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
make all
make install DESTDIR=$PKG
@@ -90,19 +95,21 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/etc/{logrotate.d,rc.d}
-cat $CWD/rc.squid.new > $PKG/etc/rc.d/rc.squid.new
-cat $CWD/squid.logrotate > $PKG/etc/logrotate.d/squid
+cat $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
+
+# Note that the .new file left hanging around in /etc/logrotate.d/ will
+# probably/surely make cron'd logrotations fail, but not installing it
+# as .new here will clobber a potentially custom file.
+cat $CWD/squid.logrotate > $PKG/etc/logrotate.d/squid.new
mv $PKG/etc/squid/mime.conf $PKG/etc/squid/mime.conf.new
mv $PKG/etc/squid/cachemgr.conf $PKG/etc/squid/cachemgr.conf.new
-rm $PKG/etc/squid/squid.conf ; cp $CWD/squid.conf $PKG/etc/squid/squid.conf.new
+rm $PKG/etc/squid/squid.conf
+cat $CWD/squid.conf > $PKG/etc/squid/squid.conf.new
-mkdir -p $PKG/var/cache/squid
-mkdir -p $PKG/var/run/squid
+mkdir -p $PKG/var/{cache,run}/squid
rmdir $PKG/var/log/squid/logs
-chown $SQUIDUSER:$SQUIDGROUP $PKG/var/log/squid
-chown $SQUIDUSER:$SQUIDGROUP $PKG/var/cache/squid
-chown $SQUIDUSER:$SQUIDGROUP $PKG/var/run/squid
+chown $SQUIDUSER:$SQUIDGROUP $PKG/var/{cache,log,run}/squid
## Edit the config file to set the user and group to run as
sed -i -e 's%^cache_effective_user nobody%cache_effective_user '"$SQUIDUSER"'%g' \