From 9d29854d4a2228decf48c43a591dd62710717af5 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Sat, 23 Jan 2016 16:49:46 +0000 Subject: development/rust: Fixed ARCH for i?86. Signed-off-by: David Spencer --- development/rust/rust.SlackBuild | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'development/rust') diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild index ce3e441e6f..6d20e8fa8f 100644 --- a/development/rust/rust.SlackBuild +++ b/development/rust/rust.SlackBuild @@ -28,38 +28,29 @@ VERSION=${VERSION:-1.5.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - x86_64) ARCH=x86_64 ;; - *) ARCH=i686 ;; - esac -fi +ARCH=${ARCH:-$(uname -m)} +case "$ARCH" in + i?86) ARCH=i686 + LIBDIRSUFFIX="" + ;; + x86_64) LIBDIRSUFFIX="64" + ;; + *) echo "$ARCH is not supported" + exit 1 + ;; +esac CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -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" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG mkdir -p $TMP $PKG $PKG/usr $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION +rm -rf $PRGNAM-$VERSION-$ARCH-unknown-linux-gnu tar xvf $CWD/$PRGNAM-$VERSION-$ARCH-unknown-linux-gnu.tar.gz cd $PRGNAM-$VERSION-$ARCH-unknown-linux-gnu chown -R root:root . -- cgit v1.2.3