diff options
Diffstat (limited to 'development/rust')
-rw-r--r-- | development/rust/rust.SlackBuild | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild index ce3e441e6f5b..6d20e8fa8fe3 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 . |