diff options
Diffstat (limited to 'games/sumeria/sumeria.SlackBuild')
-rw-r--r-- | games/sumeria/sumeria.SlackBuild | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/games/sumeria/sumeria.SlackBuild b/games/sumeria/sumeria.SlackBuild index 9a86e1bc5d..96f631bec8 100644 --- a/games/sumeria/sumeria.SlackBuild +++ b/games/sumeria/sumeria.SlackBuild @@ -1,17 +1,22 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for sumeria -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # VERSION came from the server timestamp of the source file. +# 20230530 bkw: BUILD=2, actually use SLKCFLAGS. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=sumeria VERSION=${VERSION:-20020219} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -21,23 +26,23 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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 [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e @@ -45,7 +50,7 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG/usr/games $OUTPUT cd $PKG/usr/games -gcc -include stdlib.h -Wl,-s -o $PRGNAM $CWD/$PRGNAM.c -lm +gcc $SLKCFLAGS -include stdlib.h -Wl,-s -o $PRGNAM $CWD/$PRGNAM.c -lm mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README @@ -55,4 +60,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |