summaryrefslogtreecommitdiffstats
path: root/system/runit/runit.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/runit/runit.SlackBuild')
-rw-r--r--system/runit/runit.SlackBuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/system/runit/runit.SlackBuild b/system/runit/runit.SlackBuild
index f9b9be5823..fe79f7b33d 100644
--- a/system/runit/runit.SlackBuild
+++ b/system/runit/runit.SlackBuild
@@ -1,13 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# slackware package build script for runit
# written by David Miller dave at frop dot net
# 2018, updated by Chris Abela, Malta, <kristofru@gmail.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=runit
VERSION=${VERSION:-2.1.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,7 +22,14 @@ fi
set -e
-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}
@@ -89,4 +99,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