aboutsummaryrefslogtreecommitdiff
path: root/system/ksh-openbsd/ksh-openbsd.SlackBuild
diff options
context:
space:
mode:
authorHunter Sezen <orbea@fredslev.dk>2019-02-08 20:53:53 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-02-08 20:53:53 +0700
commit06a99f4aa15c8cfec1fa88e58579d7760bd548f4 (patch)
tree34151131065c95cf950284dcb51de4dfadbded15 /system/ksh-openbsd/ksh-openbsd.SlackBuild
parentae12f0de00055080b996422053a4d685f7d1fb3b (diff)
system/ksh-openbsd: Updated for version 20190127 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/ksh-openbsd/ksh-openbsd.SlackBuild')
-rw-r--r--system/ksh-openbsd/ksh-openbsd.SlackBuild50
1 files changed, 28 insertions, 22 deletions
diff --git a/system/ksh-openbsd/ksh-openbsd.SlackBuild b/system/ksh-openbsd/ksh-openbsd.SlackBuild
index 529530c8c8bb7..603cfe8f9ca1b 100644
--- a/system/ksh-openbsd/ksh-openbsd.SlackBuild
+++ b/system/ksh-openbsd/ksh-openbsd.SlackBuild
@@ -1,6 +1,7 @@
#!/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
@@ -25,10 +26,8 @@
# (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:-20180115}
+VERSION=${VERSION:-20190127}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -59,35 +58,42 @@ else
LIBDIRSUFFIX=""
fi
-set -e
+set -eu
-rm -Rf $PKG
+rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-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
+rm -rf $PRGNAM-$VERSION
+tar xvf $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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -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
-CFLAGS="$SLKCFLAGS $(getconf LFS_CFLAGS)" make
-make check
-make install DESTDIR=$PKG
+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
-strip --strip-unneeded $PKG/bin/pdksh
-gzip -9 $PKG/usr/man/man1/pdksh.1
-gzip -9 $PKG/usr/man/man1/pdksh-sh.1
+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
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.ksh-openbsd
+cp -a Changelog.ksh-openbsd LEGAL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION/README.$PRGNAM
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install