summaryrefslogtreecommitdiffstats
path: root/office/xournal/xournal.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/xournal/xournal.SlackBuild')
-rw-r--r--office/xournal/xournal.SlackBuild25
1 files changed, 17 insertions, 8 deletions
diff --git a/office/xournal/xournal.SlackBuild b/office/xournal/xournal.SlackBuild
index 76d7d17b88..23c177c011 100644
--- a/office/xournal/xournal.SlackBuild
+++ b/office/xournal/xournal.SlackBuild
@@ -1,14 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for xournal
# Written by Michael Filz <the_emmel@gmx.net>
-# Updated by Rob van Nues <sborg63@disroot.org>
+# Updated 2020-2021 by Rob van Nues <sborg63@disroot.org>
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=xournal
-VERSION=${VERSION:-0.4.8}
-REL=${REL:-2016}
+VERSION=${VERSION:-0.4.8.2016}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -18,7 +20,14 @@ if [ -z "$ARCH" ]; then
esac
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}
@@ -43,8 +52,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.$REL.tar.gz
-cd $PRGNAM-$VERSION.$REL
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -78,4 +87,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