summaryrefslogtreecommitdiffstats
path: root/network/squid/squid.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/squid/squid.SlackBuild')
-rw-r--r--network/squid/squid.SlackBuild33
1 files changed, 16 insertions, 17 deletions
diff --git a/network/squid/squid.SlackBuild b/network/squid/squid.SlackBuild
index 900d9081c8..2f8ef8fce1 100644
--- a/network/squid/squid.SlackBuild
+++ b/network/squid/squid.SlackBuild
@@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=squid
-VERSION=${VERSION:-3.5.26}
+VERSION=${VERSION:-4.13}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -68,10 +68,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
OPT_ICAP=""
if [ "${ICAP:-no}" = "yes" ]; then
@@ -117,26 +117,25 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*
mkdir -p $PKG/etc/rc.d
-sed -e "s,@SQUIDGROUP@,$SQUIDGROUP," $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
+sed -e "s,@SQUIDUSER@,$SQUIDUSER," -e "s,@SQUIDGROUP@,$SQUIDGROUP," \
+ $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
mkdir -p $PKG/etc/logrotate.d
-sed -e "s,@USER@,$SQUIDUSER," -e "s,@GROUP@,$SQUIDGROUP," $CWD/squid.logrotate \
+sed -e "s,@SQUIDUSER@,$SQUIDUSER," -e "s,@SQUIDGROUP@,$SQUIDGROUP," $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
-cat $CWD/squid.conf > $PKG/etc/squid/squid.conf.new
-cat $CWD/squid.conf.documented > $PKG/etc/squid/squid.conf.documented
+( cd $PKG/etc/squid
+ for i in mime cachemgr squid ; do mv $i.conf $i.conf.new ; done )
+cp src/squid.conf.documented $PKG/etc/squid/squid.conf.documented
mkdir -p $PKG/var/{cache,lib,run}/squid
chown $SQUIDUSER:$SQUIDGROUP $PKG/var/{cache,lib,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' \
- $PKG/etc/squid/squid.conf.new
-sed -i -e 's%^cache_effective_group nobody%cache_effective_group '"$SQUIDGROUP"'%g' \
- $PKG/etc/squid/squid.conf.new
+# Set a chache dir, the user and group to run as and set the pid location
+sed -i "s|^#cache_dir|cache_dir|" $PKG/etc/squid/squid.conf.new
+echo -e "\npid_filename /var/run/squid/squid.pid" >> $PKG/etc/squid/squid.conf.new
+echo "cache_effective_user $SQUIDUSER" >> $PKG/etc/squid/squid.conf.new
+echo "cache_effective_group $SQUIDGROUP" >> $PKG/etc/squid/squid.conf.new
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc