summaryrefslogtreecommitdiffstats
path: root/source.local/l/ebook-tools/ebook-tools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/l/ebook-tools/ebook-tools.SlackBuild')
-rwxr-xr-xsource.local/l/ebook-tools/ebook-tools.SlackBuild67
1 files changed, 34 insertions, 33 deletions
diff --git a/source.local/l/ebook-tools/ebook-tools.SlackBuild b/source.local/l/ebook-tools/ebook-tools.SlackBuild
index 2ebf97a..27091d8 100755
--- a/source.local/l/ebook-tools/ebook-tools.SlackBuild
+++ b/source.local/l/ebook-tools/ebook-tools.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright 2010 Eric Hameleers, Eindhoven, NL
-# Copyright 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2010, 2013 Eric Hameleers, Eindhoven, NL
+# Copyright 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,46 +25,47 @@
PKGNAM=ebook-tools
-VERSION=${VERSION:-0.1.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.2.2}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # 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
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
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 "$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=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-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
-
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1