development/zed: Fix build issues.

Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
This commit is contained in:
Ryan P.C. McQuen 2015-11-03 07:31:38 -08:00 committed by Willy Sudiarto Raharjo
parent 76556b3f39
commit fba34985ed

View file

@ -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 \