summaryrefslogtreecommitdiffstats
path: root/system/telegraf/telegraf.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/telegraf/telegraf.SlackBuild')
-rw-r--r--system/telegraf/telegraf.SlackBuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/system/telegraf/telegraf.SlackBuild b/system/telegraf/telegraf.SlackBuild
index 18e1a5dfc2..779f723af2 100644
--- a/system/telegraf/telegraf.SlackBuild
+++ b/system/telegraf/telegraf.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Telegraf
-# Copyright 2017-2019 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=telegraf
-VERSION=${VERSION:-1.12.6}
+VERSION=${VERSION:-1.30.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -46,7 +49,14 @@ elif ! getent passwd $PRGNAM; then
exit 1
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=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -67,7 +77,7 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-${VERSION}_linux_${PKG_ARCH}.tar.gz
-cd $PRGNAM
+cd $PRGNAM-${VERSION}
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -104,4 +114,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