summaryrefslogtreecommitdiffstats
path: root/games/smokinguns/smokinguns.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/smokinguns/smokinguns.SlackBuild')
-rw-r--r--games/smokinguns/smokinguns.SlackBuild34
1 files changed, 28 insertions, 6 deletions
diff --git a/games/smokinguns/smokinguns.SlackBuild b/games/smokinguns/smokinguns.SlackBuild
index 08884d004b..4a63e6ac0c 100644
--- a/games/smokinguns/smokinguns.SlackBuild
+++ b/games/smokinguns/smokinguns.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for smokinguns
-# Copyright 2013 - Fernando Giannasi - São Paulo - Brasil
+# Copyright 2013 - Fernando Giannasi - São Paulo - Brasil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +22,35 @@
# 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=smokinguns
VERSION=${VERSION:-1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# 2023-05-16 DW: need an ARCH test
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [[ $ARCH != i?86 ]]; then
+ printf "\n$ARCH is not supported... \n" >/dev/stderr
+ exit 1
+fi
+
+# 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
-ARCH=i386 # i386 binary only
-
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -74,10 +95,11 @@ install -m 0755 -D $CWD/launcher.sh $PKG/usr/bin/smokinguns
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/opt -iname *.txt -type f -exec cp {} $PKG/usr/doc/$PRGNAM-$VERSION \;
cp $PKG/opt/$PRGNAM/README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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