summaryrefslogtreecommitdiff
path: root/source/l/aspell-dict/aspell-dict.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/aspell-dict/aspell-dict.SlackBuild')
-rwxr-xr-xsource/l/aspell-dict/aspell-dict.SlackBuild32
1 files changed, 24 insertions, 8 deletions
diff --git a/source/l/aspell-dict/aspell-dict.SlackBuild b/source/l/aspell-dict/aspell-dict.SlackBuild
index 4d9cb2f1..f2333eb5 100755
--- a/source/l/aspell-dict/aspell-dict.SlackBuild
+++ b/source/l/aspell-dict/aspell-dict.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,19 +25,35 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-aspell-dict
-BUILD=${BUILD:-4}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+cd src
for file in aspell*bz2 ; do
NAME=$(echo $file | cut -f 1-2 -d -)-$(echo $file | cut -f 3- -d - | rev | cut -b9- | rev | tr '[\-]' '[_]')
+ if [ -r $CWD/build/$(basename $file | cut -f 1,2 -d -) ]; then
+ BUILD="$(cat $CWD/build/$(basename $file | cut -f 1,2 -d -))"
+ else
+ BUILD=1
+ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
- tar xjf $CWD/$file
+ rm -rf $(basename $file .tar.bz2)
+ tar xjf $CWD/src/$file
cd $(basename $file .tar.bz2)
chown -R root:root .
- ./configure
- make
- make install DESTDIR=$PKG
+ ./configure || exit 1
+ make || exit 1
+ make install DESTDIR=$PKG || exit 1
# Use a uniform package name.
NAME=$(echo $NAME | sed 's/aspell5/aspell/' | sed 's/aspell6/aspell/')
mkdir -p $PKG/usr/doc/${NAME}
@@ -59,5 +75,5 @@ for file in aspell*bz2 ; do
echo "${SLACKDESC}:" >> $PKG/install/slack-desc
echo "${SLACKDESC}:" >> $PKG/install/slack-desc
cd $PKG
- makepkg -l y -c n $TMP/${NAME}-noarch-$BUILD.txz
-done
+ makepkg -l y -c n $TMP/${NAME}-$ARCH-$BUILD.txz
+done || exit 1