summaryrefslogtreecommitdiffstats
path: root/desktop/bukubrow/bukubrow.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/bukubrow/bukubrow.SlackBuild')
-rw-r--r--desktop/bukubrow/bukubrow.SlackBuild23
1 files changed, 17 insertions, 6 deletions
diff --git a/desktop/bukubrow/bukubrow.SlackBuild b/desktop/bukubrow/bukubrow.SlackBuild
index c657e3ffdb..33e5e0ff98 100644
--- a/desktop/bukubrow/bukubrow.SlackBuild
+++ b/desktop/bukubrow/bukubrow.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for bukubrow
-# Copyright 2019 Andrew Clemons, Wellington New Zealand
+# Copyright 2019-2021 Andrew Clemons, Wellington New Zealand
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,14 @@
# 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=bukubrow
SRCNAM=bukubrow-host
-VERSION=${VERSION:-5.0.0}
+VERSION=${VERSION:-5.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -42,7 +45,14 @@ if [ -z "$ARCH" ]; then
fi
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}
@@ -120,7 +130,7 @@ mkdir vendor
sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/'
printf "}\n"
- } | python -c "import sys, json; data = sys.stdin.read(); print json.dumps(json.loads(data), sort_keys=True, indent=4, separators=(',', ' : '))" > $dep-$ver/.cargo-checksum.json
+ } > $dep-$ver/.cargo-checksum.json
done
)
@@ -131,6 +141,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+CARGO_HOME=.cargo \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
cargo build --release $CARGOTARGET
@@ -149,4 +160,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