summaryrefslogtreecommitdiffstats
path: root/source/ap/bpe/bpe.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/bpe/bpe.SlackBuild')
-rwxr-xr-xsource/ap/bpe/bpe.SlackBuild29
1 files changed, 19 insertions, 10 deletions
diff --git a/source/ap/bpe/bpe.SlackBuild b/source/ap/bpe/bpe.SlackBuild
index 4be1f97d7..f832007b2 100755
--- a/source/ap/bpe/bpe.SlackBuild
+++ b/source/ap/bpe/bpe.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,22 +20,32 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+PKGNAM=bpe
VERSION=2.01.00
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -44,7 +54,6 @@ else
SLKCFLAGS="-O2"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-bpe
@@ -59,9 +68,9 @@ find . -perm 777 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr
-make
-make install DESTDIR=$PKG
+ --prefix=/usr || exit 1
+make || exit 1
+make install DESTDIR=$PKG || exit 1
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null