summaryrefslogtreecommitdiffstats
path: root/system/kapacitor/kapacitor.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/kapacitor/kapacitor.SlackBuild')
-rw-r--r--system/kapacitor/kapacitor.SlackBuild36
1 files changed, 25 insertions, 11 deletions
diff --git a/system/kapacitor/kapacitor.SlackBuild b/system/kapacitor/kapacitor.SlackBuild
index 1379aa55ed..2a9d276b46 100644
--- a/system/kapacitor/kapacitor.SlackBuild
+++ b/system/kapacitor/kapacitor.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Kapacitor
-# Copyright 2017, 2018 Ebben Aries <e@dscp.org>
+# Copyright 2017-2024 Ebben Aries <slackbuilds@dscp.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -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=kapacitor
-VERSION=${VERSION:-1.5.3}
+VERSION=${VERSION:-1.7.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,17 +39,28 @@ if [ -z "$ARCH" ]; then
fi
UIDGID=351
+
+nobuild() {
+ echo " You must have the \"$PRGNAM\" group and user to run this script."
+ echo " # groupadd -g $UIDGID $PRGNAM"
+ echo " # useradd -u $UIDGID -s /bin/false -d /var/lib/kapacitor -g $PRGNAM $PRGNAM"
+ exit 1
+}
+
if ! getent group $PRGNAM; then
- echo " You must have the \"$PRGNAM\" group to run this script."
- echo " # groupadd -g $UIDGID $PRGNAM"
- exit 1
+ nobuild
elif ! getent passwd $PRGNAM; then
- echo " You must have the \"$PRGNAM\" user to run this script."
- echo " # useradd -u $UIDGID -s /bin/false -d /var/lib/kapacitor -g $PRGNAM $PRGNAM"
- exit 1
+ nobuild
+fi
+
+# 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
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -103,4 +117,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