diff options
Diffstat (limited to 'office/jstock/jstock.SlackBuild')
-rw-r--r-- | office/jstock/jstock.SlackBuild | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/office/jstock/jstock.SlackBuild b/office/jstock/jstock.SlackBuild index 16a327e02f..3c7c9f6f9c 100644 --- a/office/jstock/jstock.SlackBuild +++ b/office/jstock/jstock.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for jstock -# Copyright 2014-2018 Zhu Qun-Ying +# Copyright 2014-2023 Zhu Qun-Ying # 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=jstock -VERSION=${VERSION:-1.0.7.42} +VERSION=${VERSION:-1.0.7.60} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,19 +38,18 @@ 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} -if [ "$ARCH" = "x86_64" ]; then - LIBDIRSUFFIX="64" -else - LIBDIRSUFFIX="" -fi - -JAVAHOME="/usr/lib${LIBDIRSUFFIX}/java" - set -e rm -rf $PKG @@ -64,7 +66,6 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; chmod +x jstock/jstock.sh -sed -i '/\/usr\/lib\/java/a JAVA_HOME='"$JAVAHOME"'' jstock/jstock.sh cd $PKG/usr/bin ln -sf /opt/jstock/jstock.sh jstock @@ -77,4 +78,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-noarch-$BUILD$TAG.$PKGTYPE |