summaryrefslogtreecommitdiffstats
path: root/source/ap/vbetool/vbetool.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/vbetool/vbetool.SlackBuild')
-rwxr-xr-xsource/ap/vbetool/vbetool.SlackBuild23
1 files changed, 16 insertions, 7 deletions
diff --git a/source/ap/vbetool/vbetool.SlackBuild b/source/ap/vbetool/vbetool.SlackBuild
index 8afa6391f..9bdf2bf47 100755
--- a/source/ap/vbetool/vbetool.SlackBuild
+++ b/source/ap/vbetool/vbetool.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2008 Robby Workman, Northport, Alabama, USA
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +21,11 @@
# 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=vbetool
VERSION=1.2.2
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -35,7 +37,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-vbetool
@@ -53,7 +62,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf vbetool-$VERSION
-tar xvf $CWD/vbetool-$VERSION.tar.gz
+tar xvf $CWD/vbetool-$VERSION.tar.gz || exit 1
cd vbetool-$VERSION || exit 1
chown -R root:root .
find . \
@@ -69,10 +78,10 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--mandir=/usr/man \
--docdir=/usr/doc/vbetool-$VERSION \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make || exit 1
-make install DESTDIR=$PKG
+make install DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null