summaryrefslogtreecommitdiffstats
path: root/source/d/scons/scons.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/scons/scons.SlackBuild')
-rwxr-xr-xsource/d/scons/scons.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/d/scons/scons.SlackBuild b/source/d/scons/scons.SlackBuild
index bd46d328c..68787861f 100755
--- a/source/d/scons/scons.SlackBuild
+++ b/source/d/scons/scons.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# Copyright 2015 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
@@ -21,10 +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=scons
VERSION=${VERSION:-$(echo scons-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -36,6 +37,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# 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"
LIBDIRSUFFIX=""
@@ -50,7 +59,6 @@ elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -60,7 +68,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf scons-$VERSION
tar xvf $CWD/scons-$VERSION.tar.*z* || exit 1
-cd scons-$VERSION
+cd scons-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \