summaryrefslogtreecommitdiff
path: root/office/texworks/texworks.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2010-05-19 22:02:19 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-21 01:37:08 -0500
commit2efd42afd82a48d8b7ff0a10cf205c236e862040 (patch)
treef8f11c4169d9430500edd210bc4d7911479dd72d /office/texworks/texworks.SlackBuild
parent4f724c31b564caed41857384fb8a84f911560772 (diff)
downloadslackbuilds-2efd42afd82a48d8b7ff0a10cf205c236e862040.tar.gz
office/texworks: Miscellaneous cleanups.
Diffstat (limited to 'office/texworks/texworks.SlackBuild')
-rw-r--r--office/texworks/texworks.SlackBuild16
1 files changed, 14 insertions, 2 deletions
diff --git a/office/texworks/texworks.SlackBuild b/office/texworks/texworks.SlackBuild
index 67cf4f8b1f..c86b5825a9 100644
--- a/office/texworks/texworks.SlackBuild
+++ b/office/texworks/texworks.SlackBuild
@@ -6,10 +6,19 @@
PRGNAM=texworks
VERSION=${VERSION:-0.2.3}
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -24,6 +33,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -57,7 +69,7 @@ cp -a \
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG | xargs file | grep -e "executable" -e "shared object" \
-| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -pv $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc