diff options
Diffstat (limited to 'system/loksh/loksh.SlackBuild')
-rw-r--r-- | system/loksh/loksh.SlackBuild | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/system/loksh/loksh.SlackBuild b/system/loksh/loksh.SlackBuild index 31f9e194c8..3720480e91 100644 --- a/system/loksh/loksh.SlackBuild +++ b/system/loksh/loksh.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for loksh -# Copyright 2018-2019 Hunter Sezen California, USA +# Copyright 2018-2020 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=loksh -VERSION=${VERSION:-6.6} +VERSION=${VERSION:-6.7.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -59,9 +59,9 @@ set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,16 +69,35 @@ 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 {} \; -make \ - CFLAGS="$SLKCFLAGS" +if [ "${DEBUG:=0}" != 0 ]; then + NDEBUG=false + RELEASE=debug + SLKCFLAGS="$(printf %s "$SLKCFLAGS" | sed 's/-O2/-O0/')" +else + NDEBUG=true + RELEASE=plain +fi -make install \ - PREFIX=/usr \ - BIN_NAME=$PRGNAM \ - BIN_DIR=/bin \ - MAN_DIR=/usr/man \ - DOC_DIR=/usr/doc/$PRGNAM-$VERSION \ - DESTDIR=$PKG +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +meson \ + --prefix=/ \ + --bindir=bin \ + --libdir=usr/lib${LIBDIRSUFFIX} \ + --mandir=usr/man \ + --datadir=usr \ + -Dstrip=$NDEBUG \ + -Db_ndebug=$NDEBUG \ + -Dbuildtype=$RELEASE \ + build + +"${NINJA:=ninja}" -C build +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 mkdir -p $PKG/usr/bin ln -s /bin/$PRGNAM $PKG/usr/bin/$PRGNAM |