summaryrefslogtreecommitdiffstats
path: root/games/tome-sx/tome-sx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/tome-sx/tome-sx.SlackBuild')
-rw-r--r--games/tome-sx/tome-sx.SlackBuild28
1 files changed, 20 insertions, 8 deletions
diff --git a/games/tome-sx/tome-sx.SlackBuild b/games/tome-sx/tome-sx.SlackBuild
index c12eed96ff..b2660e4028 100644
--- a/games/tome-sx/tome-sx.SlackBuild
+++ b/games/tome-sx/tome-sx.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for tome-sx
@@ -22,12 +22,17 @@
# 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=tome-sx
-VERSION=${VERSION:-c1fe5a0ad25317a4bdf27ddba1522fd896389873}
+VERSION=${VERSION:-20160915_c1fe5a0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+GITVER="$( echo $VERSION | cut -d_ -f2 )"
-SRCPRGNAM=ToME-SX
+SRCNAM=ToME-SX
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +42,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}
@@ -61,9 +73,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCPRGNAM-$VERSION
-tar xvf $CWD/$SRCPRGNAM-$VERSION.tar.gz
-cd $SRCPRGNAM-$VERSION
+rm -rf $SRCNAM-$GITVER*
+tar xvf $CWD/$SRCNAM-$GITVER*.tar.gz
+cd $SRCNAM-$GITVER*
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -102,4 +114,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