summaryrefslogtreecommitdiffstats
path: root/games/ioquake3/ioquake3.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/ioquake3/ioquake3.SlackBuild')
-rw-r--r--games/ioquake3/ioquake3.SlackBuild49
1 files changed, 26 insertions, 23 deletions
diff --git a/games/ioquake3/ioquake3.SlackBuild b/games/ioquake3/ioquake3.SlackBuild
index 6acd5e389b..d9f4c75c51 100644
--- a/games/ioquake3/ioquake3.SlackBuild
+++ b/games/ioquake3/ioquake3.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ioquake3
@@ -22,46 +22,50 @@
# 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)
+
PRGNAM=ioquake3
-VERSION=${VERSION:-r20190822}
+VERSION=${VERSION:-1.36_70d07d9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-# Setting the arch here overrides the Makefiles
-# arch setting which causes the build to fail
-# on 32bit machines, so we change this to BARCH
-# here and let the Makefile set the ARCH.
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export BARCH=i586 ;;
- arm*) export BARCH=arm ;;
- *) export BARCH=$( uname -m ) ;;
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
esac
-else
- BARCH="$ARCH"
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}
-if [ "$BARCH" = "i586" ]; then
+if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
- ARCH="x86"
-elif [ "$BARCH" = "i686" ]; then
+ BARCH="x86"
+elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
- ARCH="x86"
-elif [ "$BARCH" = "x86_64" ]; then
+ BARCH="x86"
+elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
- ARCH="x86_64"
+ BARCH="x86_64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
- ARCH="$BARCH"
+ BARCH="$ARCH"
fi
set -e
@@ -82,7 +86,7 @@ find -L . \
make \
release \
copyfiles \
- ARCH="$ARCH" \
+ ARCH="$BARCH" \
COPYDIR="$PKG"/usr/share/games/quake3 \
CFLAGS="$SLKCFLAGS" \
USE_CODEC_VORBIS=1 \
@@ -106,8 +110,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# update quake3 files to newest point release (1.32b)
-chmod +x $CWD/linuxq3apoint-1.32b-3.x86.run
-$CWD/linuxq3apoint-1.32b-3.x86.run --tar xf
+sh $CWD/linuxq3apoint-1.32b-3.x86.run --tar xf
install -m 644 baseq3/*.pk3 $PKG/usr/share/games/quake3/baseq3
install -m 644 missionpack/*.pk3 $PKG/usr/share/games/quake3/missionpack
@@ -130,4 +133,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-$BARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE