summaryrefslogtreecommitdiffstats
path: root/misc/deb2tgz/deb2tgz.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/deb2tgz/deb2tgz.SlackBuild')
-rw-r--r--misc/deb2tgz/deb2tgz.SlackBuild20
1 files changed, 15 insertions, 5 deletions
diff --git a/misc/deb2tgz/deb2tgz.SlackBuild b/misc/deb2tgz/deb2tgz.SlackBuild
index 1106fd0db3..81c04fc9b0 100644
--- a/misc/deb2tgz/deb2tgz.SlackBuild
+++ b/misc/deb2tgz/deb2tgz.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for deb2tgz
-# Copyright 2016 Vitor Borrego, Corroios, Portugal
+# Copyright 2023 Vitor Borrego, Corroios, Portugal
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,23 @@
# 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=deb2tgz
-VERSION=${VERSION:-0.2}
+VERSION=${VERSION:-0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
ARCH="noarch"
-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}
@@ -59,4 +69,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