summaryrefslogtreecommitdiff
path: root/source/l/ebook-tools/ebook-tools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/ebook-tools/ebook-tools.SlackBuild')
-rwxr-xr-xsource/l/ebook-tools/ebook-tools.SlackBuild29
1 files changed, 17 insertions, 12 deletions
diff --git a/source/l/ebook-tools/ebook-tools.SlackBuild b/source/l/ebook-tools/ebook-tools.SlackBuild
index 690d71de..162693f9 100755
--- a/source/l/ebook-tools/ebook-tools.SlackBuild
+++ b/source/l/ebook-tools/ebook-tools.SlackBuild
@@ -23,24 +23,20 @@
PKGNAM=ebook-tools
-VERSION=${VERSION:-0.1.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-${PKGNAM}
-rm -rf $PKG
-mkdir -p $TMP $PKG
-
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
@@ -53,11 +49,20 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1