aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-02-14 00:25:27 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-02-18 10:06:56 +0700
commit4b186b476c669967aeeec9642811cff510dd95f5 (patch)
treebeb921b99d78cfb5149c5e8ffc2bd1a95d3e2dd4 /games
parent6c5c06f10075472a4c73d563f38be58f9e005d6a (diff)
games/dwarffortress: Align to template.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/dwarffortress/dwarffortress.SlackBuild16
1 files changed, 7 insertions, 9 deletions
diff --git a/games/dwarffortress/dwarffortress.SlackBuild b/games/dwarffortress/dwarffortress.SlackBuild
index 1a305129662c..cde1b298e75e 100644
--- a/games/dwarffortress/dwarffortress.SlackBuild
+++ b/games/dwarffortress/dwarffortress.SlackBuild
@@ -22,6 +22,8 @@
# 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=dwarffortress
VERSION=${VERSION:-0.47.05}
SRCNAM=df_47_05_linux
@@ -30,14 +32,6 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# 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
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -46,6 +40,11 @@ if [ -z "$ARCH" ]; then
esac
fi
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
BITFLAG="32"
elif [ "$ARCH" = "x86_64" ]; then
@@ -54,7 +53,6 @@ else
BITFLAG=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}