summaryrefslogtreecommitdiffstats
path: root/network/varnish/varnish.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/varnish/varnish.SlackBuild')
-rw-r--r--network/varnish/varnish.SlackBuild37
1 files changed, 26 insertions, 11 deletions
diff --git a/network/varnish/varnish.SlackBuild b/network/varnish/varnish.SlackBuild
index 950474649c..2b76da61da 100644
--- a/network/varnish/varnish.SlackBuild
+++ b/network/varnish/varnish.SlackBuild
@@ -1,29 +1,40 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for varnish-cache
# Written by Matt Schurenko <matt.schurenko@gmail.com>
+# Updated by Emmanuel N. Millan
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=varnish
-VERSION=${VERSION:-4.0.3}
+VERSION=${VERSION:-7.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -36,14 +47,16 @@ else
LIBDIRSUFFIX=""
fi
-set -e
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
+#patch -p1 -i $CWD/0051cbe3b9cc24586e0ad99cff72041c6df944b8.patch
+#patch -p1 -i $CWD/f04d7df6e6d5b350740e01d24749a3930390b7a0.patch
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -67,6 +80,8 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -82,9 +97,9 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
mkdir -p $PKG/etc/varnish/
-cp $PKG/usr/doc/$PRGNAM-$VERSION/example.vcl $PKG/etc/varnish/default.vcl.new
+cat $PKG/usr/doc/$PRGNAM-$VERSION/example.vcl > $PKG/etc/varnish/default.vcl.new
mkdir -p $PKG/etc/rc.d/
-cp -p $CWD/rc.varnishd $PKG/etc/rc.d/rc.varnishd.new
+cat $CWD/rc.varnishd > $PKG/etc/rc.d/rc.varnishd.new
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE