summaryrefslogtreecommitdiffstats
path: root/games/goonies/goonies.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/goonies/goonies.SlackBuild')
-rw-r--r--games/goonies/goonies.SlackBuild24
1 files changed, 19 insertions, 5 deletions
diff --git a/games/goonies/goonies.SlackBuild b/games/goonies/goonies.SlackBuild
index 760f39ef37..51651bc7b9 100644
--- a/games/goonies/goonies.SlackBuild
+++ b/games/goonies/goonies.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for goonies
@@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-SRCNAM=goonies.src
-PRGNAM=$(echo $SRCNAM | cut -c1-7)
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=goonies
VERSION=${VERSION:-1.4.1528}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=$PRGNAM.src
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +40,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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -70,6 +81,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Fix for the newer compilers
+patch -p1 < $CWD/gcc6.patch
+
# fix linker and installation paths
patch -p1 < $CWD/makefile.patch
@@ -87,4 +101,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE