summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--development/zed/zed.SlackBuild39
1 files changed, 21 insertions, 18 deletions
diff --git a/development/zed/zed.SlackBuild b/development/zed/zed.SlackBuild
index 3e589782d1..ba770d7e93 100644
--- a/development/zed/zed.SlackBuild
+++ b/development/zed/zed.SlackBuild
@@ -24,25 +24,16 @@
PRGNAM=zed
SRCNAM=Zed
VERSION=${VERSION:-1.1.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-TARBALL_x86=${PRGNAM}"-linux32-"
-TARBALL_x86_64=${PRGNAM}"-linux64-"
-TARBALL_ROOT=${PRGNAM}
-
+# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486;
- LIBDIRSUFFIX="";
- TARBALL=${TARBALL_x86};
- ;;
- arm*) ARCH=arm;
- ;;
- *) ARCH=$( uname -m );
- LIBDIRSUFFIX="64";
- TARBALL=${TARBALL_x86_64};
- ;;
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
esac
fi
@@ -51,14 +42,26 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-${PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
+SHORTARCH=`getconf LONG_BIT`
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ${TARBALL_ROOT}
-tar -xvf $CWD/${TARBALL}v${VERSION}.tar.gz
-cd ${TARBALL_ROOT}
+rm -rf ${PRGNAM}
+tar -xvf $CWD/${PRGNAM}-linux${SHORTARCH}-v${VERSION}.tar.gz
+cd ${PRGNAM}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \