summaryrefslogtreecommitdiffstats
path: root/games/starfighter/starfighter.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/starfighter/starfighter.SlackBuild')
-rw-r--r--games/starfighter/starfighter.SlackBuild50
1 files changed, 35 insertions, 15 deletions
diff --git a/games/starfighter/starfighter.SlackBuild b/games/starfighter/starfighter.SlackBuild
index d8914e70f4..a8f81f0594 100644
--- a/games/starfighter/starfighter.SlackBuild
+++ b/games/starfighter/starfighter.SlackBuild
@@ -1,21 +1,34 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for starfighter
-# Written by Tim Dickson dickson.tim at googlemail.com
+# Copyright 2016-2021 Tim Dickson, Scotland dickson.tim at googlemail.com
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# changelog
-# updated 15/10/2016 for v1.6
-# make file now supports destdir and project comes with desktop file and icon
-# so separate one not needed.
-# doc location still changed to support slackware prefered location
-# updated 05/03/2017 for v1.7
-# updated 22/07/2019 for v2.0 (2.0.0.3)
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=starfighter
-VERSION=${VERSION:-2.0}
+VERSION=${VERSION:-2.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -25,7 +38,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}
@@ -49,7 +69,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION-src
-tar xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
+tar -xvf $CWD/$PRGNAM-$VERSION-src.tar.gz
cd $PRGNAM-$VERSION-src
chown -R root:root .
find -L . \
@@ -58,8 +78,8 @@ 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 {} \;
-CFLAGS="$SLKFLAGS"
-CXXFLAGS="$SLKCFLAGS"
+CFLAGS="$SLKFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -80,4 +100,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