diff options
Diffstat (limited to 'system/loksh/loksh.SlackBuild')
-rw-r--r-- | system/loksh/loksh.SlackBuild | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/system/loksh/loksh.SlackBuild b/system/loksh/loksh.SlackBuild index 9a57d890d4..b17f14c8b0 100644 --- a/system/loksh/loksh.SlackBuild +++ b/system/loksh/loksh.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for loksh # Copyright 2018-2020 Hunter Sezen California, USA +# Copyright 2023-2024 K. Eugene Carlson Tsukuba, JP # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +23,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=loksh -VERSION=${VERSION:-6.8.1} +VERSION=${VERSION:-7.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,23 +39,26 @@ 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" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -eu @@ -80,10 +87,9 @@ fi CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -meson \ +meson setup \ --prefix=/ \ --bindir=bin \ - --libdir=usr/lib${LIBDIRSUFFIX} \ --mandir=usr/man \ --datadir=usr \ -Dstrip=$NDEBUG \ @@ -96,8 +102,9 @@ DESTDIR=$PKG "$NINJA" -C build install mv -- $PKG/bin/ksh $PKG/bin/$PRGNAM mv -- $PKG/usr/man/man1/ksh.1 $PKG/usr/man/man1/$PRGNAM.1 -mv -- $PKG/usr/man/man1/sh.1 $PKG/usr/man/man1/$PRGNAM-sh.1 mv -- $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +# bash is the default sh in Slackware, so this page is unwanted. +rm -f $PKG/usr/man/man1/sh.1 mkdir -p $PKG/usr/bin ln -s /bin/$PRGNAM $PKG/usr/bin/$PRGNAM @@ -113,4 +120,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 |