diff options
Diffstat (limited to 'system/ksh-openbsd/ksh-openbsd.SlackBuild')
-rw-r--r-- | system/ksh-openbsd/ksh-openbsd.SlackBuild | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/system/ksh-openbsd/ksh-openbsd.SlackBuild b/system/ksh-openbsd/ksh-openbsd.SlackBuild index 603cfe8f9ca1..529530c8c8bb 100644 --- a/system/ksh-openbsd/ksh-openbsd.SlackBuild +++ b/system/ksh-openbsd/ksh-openbsd.SlackBuild @@ -1,7 +1,6 @@ #!/bin/sh # Copyright (c) 2010-2018 LEVAI Daniel -# Copyright (c) 2019 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,8 +25,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Build script for the Linux port of OpenBSD's ksh + PRGNAM=ksh-openbsd -VERSION=${VERSION:-20190127} +VERSION=${VERSION:-20180115} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -58,42 +59,35 @@ else LIBDIRSUFFIX="" fi -set -eu +set -e -rm -rf $PKG +rm -Rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +rm -Rf $PRGNAM-$VERSION +[ -e $CWD/$VERSION.tar.gz ] && tar xvf $CWD/$VERSION.tar.gz +[ -e $CWD/$PRGNAM-$VERSION.tar.gz ] && tar xf $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 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# Makefile: Support a custom binary name. -# https://github.com/levaidaniel/ksh-openbsd/pull/1 -patch -p1 < $CWD/oksh.patch - -CFLAGS="$SLKCFLAGS" make -make check BINNAM=oksh -make install BINNAM=oksh DESTDIR=$PKG - -mkdir -p $PKG/usr/bin -ln -s /bin/oksh $PKG/usr/bin/oksh + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | - grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +CFLAGS="$SLKCFLAGS $(getconf LFS_CFLAGS)" make +make check +make install DESTDIR=$PKG -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm - $i ; done +strip --strip-unneeded $PKG/bin/pdksh +gzip -9 $PKG/usr/man/man1/pdksh.1 +gzip -9 $PKG/usr/man/man1/pdksh-sh.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a Changelog.ksh-openbsd LEGAL README $PKG/usr/doc/$PRGNAM-$VERSION -cp $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION/README.$PRGNAM +cp -a \ + Changelog.ksh-openbsd LEGAL README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cp $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION/README.ksh-openbsd cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |