Updated slackbuild script

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-04-04 19:03:13 +03:00
parent 45abe2f546
commit 6693ede127

View file

@ -28,10 +28,13 @@ cat ../slpkg/__metadata__.py | grep "__version_info__ = (" \
| tr -d [[:space:]] | cut -c19-23 | tr , .
}
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=slpkg
VERSION=${VERSION:-$(__version)}
BUILD=${BUILD:-1}
TAG=${TAG:-_dsw}
PKGTYPE=${PKGTYPE:-txz}
INSTALL="upgradepkg --install-new"
if [ -z "$ARCH" ]; then
@ -42,7 +45,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}
@ -107,6 +117,6 @@ 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:-txz}
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
$INSTALL $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz