summaryrefslogtreecommitdiffstats
path: root/system/supervisor/supervisor.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/supervisor/supervisor.SlackBuild')
-rw-r--r--system/supervisor/supervisor.SlackBuild17
1 files changed, 12 insertions, 5 deletions
diff --git a/system/supervisor/supervisor.SlackBuild b/system/supervisor/supervisor.SlackBuild
index 61882499cd..3769f38f42 100644
--- a/system/supervisor/supervisor.SlackBuild
+++ b/system/supervisor/supervisor.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2014-2018 digwtx <wtx358@qq.com>
# All rights reserved.
@@ -20,10 +20,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=supervisor
VERSION=${VERSION:-3.3.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=supervisor
@@ -35,9 +38,13 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=${PKG:-$TMP/package-$SRCNAM}
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -eu
@@ -60,7 +67,7 @@ rm -f setuptools/*.exe
mkdir -p $PKG/etc
cat $PRGNAM/skel/sample.conf > $PKG/etc/supervisord.conf.new
-python setup.py install --root=$PKG
+python2 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
@@ -75,4 +82,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