summaryrefslogtreecommitdiffstats
path: root/python/py3sensors/py3sensors.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/py3sensors/py3sensors.SlackBuild')
-rw-r--r--python/py3sensors/py3sensors.SlackBuild18
1 files changed, 14 insertions, 4 deletions
diff --git a/python/py3sensors/py3sensors.SlackBuild b/python/py3sensors/py3sensors.SlackBuild
index 1df55add9c..1eeb1eb239 100644
--- a/python/py3sensors/py3sensors.SlackBuild
+++ b/python/py3sensors/py3sensors.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for py3sensors
@@ -22,10 +22,13 @@
# 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=py3sensors
VERSION=${VERSION:-0cf96f4e2cfe}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=gleb_zhulik-$PRGNAM
@@ -37,9 +40,16 @@ 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=${PKG:-$TMP/package-$PRGNAM}
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
@@ -82,4 +92,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