summaryrefslogtreecommitdiff
path: root/source/d/pmake/pmake.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/pmake/pmake.SlackBuild')
-rwxr-xr-xsource/d/pmake/pmake.SlackBuild29
1 files changed, 18 insertions, 11 deletions
diff --git a/source/d/pmake/pmake.SlackBuild b/source/d/pmake/pmake.SlackBuild
index 23cc58d4..5cbd437b 100755
--- a/source/d/pmake/pmake.SlackBuild
+++ b/source/d/pmake/pmake.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2006-2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006-2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,22 +20,30 @@
# 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=pmake
VERSION=${VERSION:-1.111}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
# 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
-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-${PKGNAM}
@@ -44,8 +52,7 @@ mkdir -p $TMP $PKG
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE"
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE"
+elif [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE"
@@ -56,9 +63,9 @@ else
fi
cd $TMP
-rm -rf ${PKGNAM}-${VERSION}
-tar xzvf $CWD/${PKGNAM}-$VERSION.tar.gz
-cd ${PKGNAM}
+rm -rf ${PKGNAM}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
+cd ${PKGNAM} || exit 1
zcat $CWD/pmake_1.111-1.diff.gz | patch -p1 || exit 1
# Not sure why the defines in the cflags didn't work here, but
@@ -77,7 +84,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" make -f Makefile.boot
+CFLAGS="$SLKCFLAGS" make -f Makefile.boot || exit 1
mkdir -p $PKG/usr/bin
cp bmake $PKG/usr/bin/pmake