aboutsummaryrefslogtreecommitdiff
path: root/development/zed
diff options
context:
space:
mode:
authorRyan P.C. McQuen <ryan.q@linux.com>2015-11-03 07:31:38 -0800
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-11-07 10:33:21 +0700
commitfba34985edc972d1ba686442434546659e283660 (patch)
tree6ccd8e776c84c20dda981ad348e8851d19ede629 /development/zed
parent76556b3f39dc374df9ab63caf3c2c5f099fa4487 (diff)
development/zed: Fix build issues.
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
Diffstat (limited to 'development/zed')
-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 3e589782d160..ba770d7e939f 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 \