diff options
Diffstat (limited to 'network/varnish/varnish.SlackBuild')
-rw-r--r-- | network/varnish/varnish.SlackBuild | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/network/varnish/varnish.SlackBuild b/network/varnish/varnish.SlackBuild index d15a775208bf..acc7ae779f26 100644 --- a/network/varnish/varnish.SlackBuild +++ b/network/varnish/varnish.SlackBuild @@ -1,7 +1,9 @@ #!/bin/sh -# Build/install varnish the way Slackware's binary package is made: +# +# Slackware build script for ganglia # Written by Cherife Li <cherife@dotimes.com> # Modified by Robby Workman <rworkman@slackbuilds.org> +# PRGNAM=varnish VERSION=1.1.2 @@ -15,9 +17,11 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi set -e @@ -26,7 +30,7 @@ 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.tar.gz || exit 1 cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -41,9 +45,11 @@ CXXFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --sysconfdir=/etc/varnish \ --localstatedir=/var \ - --mandir=/usr/man + --mandir=/usr/man \ + --build=$ARCH-slackware-linux \ + --host=$ARCH-slackware-linux -make -j6 +make make install DESTDIR=$PKG mkdir -p $PKG/etc/{varnish,rc.d} @@ -52,7 +58,7 @@ cat etc/zope-plone.vcl > $PKG/etc/varnish/zope-plone.vcl.new cat $CWD/rc.varnishd > $PKG/etc/rc.d/rc.varnishd.new ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + 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 ) |