aboutsummaryrefslogtreecommitdiff
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
parentae12f0de00055080b996422053a4d685f7d1fb3b (diff)
system/ksh-openbsd: Updated for version 20190127 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/ksh-openbsd/README12
-rw-r--r--system/ksh-openbsd/doinst.sh9
-rw-r--r--system/ksh-openbsd/ksh-openbsd.SlackBuild50
-rw-r--r--system/ksh-openbsd/ksh-openbsd.info10
-rw-r--r--system/ksh-openbsd/oksh.patch37
-rw-r--r--system/ksh-openbsd/slack-desc2
6 files changed, 83 insertions, 37 deletions
diff --git a/system/ksh-openbsd/README b/system/ksh-openbsd/README
index 8c23245a83d73..47ac8c61d79be 100644
--- a/system/ksh-openbsd/README
+++ b/system/ksh-openbsd/README
@@ -1,8 +1,6 @@
-This package is a patched version of the OpenBSD ksh ported to Linux, which is
-based on the original PD-ksh, but heavily modified and maintained by OpenBSD
-developers.
-"Patched" means it contains modifications outside of the OpenBSD tree (and
-besides the Linux port bits).
+This package is a patched version of the OpenBSD ksh ported to Linux,
+which is based on the original PD-ksh, but heavily modified and
+maintained by OpenBSD developers.
-See the Changelog.ksh-openbsd and the homepage for more information about the
-changes: https://github.com/levaidaniel/ksh-openbsd
+"Patched" means it contains modifications outside of the OpenBSD tree
+(And besides the Linux port bits).
diff --git a/system/ksh-openbsd/doinst.sh b/system/ksh-openbsd/doinst.sh
index 1e26ea54a4c1c..de374ed98deb3 100644
--- a/system/ksh-openbsd/doinst.sh
+++ b/system/ksh-openbsd/doinst.sh
@@ -1,3 +1,8 @@
-if ! grep -q '/bin/pdksh' etc/shells ; then
- printf "/bin/pdksh\n" >> etc/shells ;
+if [ ! -r etc/shells ]; then
+ touch etc/shells
+ chmod 644 etc/shells
+fi
+
+if ! grep -q /bin/oksh etc/shells ; then
+ printf %s\\n /bin/oksh >> etc/shells
fi
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
diff --git a/system/ksh-openbsd/ksh-openbsd.info b/system/ksh-openbsd/ksh-openbsd.info
index be79c4e289ef4..08edda81b25ec 100644
--- a/system/ksh-openbsd/ksh-openbsd.info
+++ b/system/ksh-openbsd/ksh-openbsd.info
@@ -1,10 +1,10 @@
PRGNAM="ksh-openbsd"
-VERSION="20180115"
+VERSION="20190127"
HOMEPAGE="https://github.com/levaidaniel/ksh-openbsd"
-DOWNLOAD="https://github.com/levaidaniel/ksh-openbsd/archive/20180115.tar.gz"
-MD5SUM="738aaeaed76fa05feaa8900040fd16b1"
+DOWNLOAD="https://github.com/levaidaniel/ksh-openbsd/archive/20190127/ksh-openbsd-20190127.tar.gz"
+MD5SUM="a039295afd4e917c6a74901dacac6f28"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libbsd"
-MAINTAINER="LEVAI Daniel"
-EMAIL="leva@ecentrum.hu"
+MAINTAINER="Hunter Sezen"
+EMAIL="orbea@fredslev.dk"
diff --git a/system/ksh-openbsd/oksh.patch b/system/ksh-openbsd/oksh.patch
new file mode 100644
index 0000000000000..00d1c7ea0fefa
--- /dev/null
+++ b/system/ksh-openbsd/oksh.patch
@@ -0,0 +1,37 @@
+commit 2e3b7a715793bbb9fe857b37ffaad44b076e3e12
+Author: orbea <orbea@fredslev.dk>
+Date: Sat Oct 20 19:54:17 2018 -0700
+
+ Makefile: Support a custom binary name.
+
+diff --git a/Makefile b/Makefile
+index 6b96f38..707ab5e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,6 +3,7 @@ PREFIX = $(PREFIX)
+ else
+ PREFIX = /usr
+ endif
++BINNAM = pdksh
+ BINDIR = $(DESTDIR)/bin
+ MANDIR = $(DESTDIR)$(PREFIX)/man
+ TMP ?= /tmp
+@@ -33,14 +34,14 @@ all: $(PROG)
+
+ check test:
+ /usr/bin/perl tests/th -s tests -p ./ksh -T $(TMP) \
+- -C pdksh,sh,ksh,posix,posix-upu
++ -C $(BINNAM),sh,ksh,posix,posix-upu
+
+ install:
+ install -m755 -d $(BINDIR)
+- install -m755 --strip --no-target-directory ksh $(BINDIR)/pdksh
++ install -m755 --strip --no-target-directory ksh $(BINDIR)/$(BINNAM)
+ install -m755 -d $(MANDIR)/man1
+- install -m644 --no-target-directory ksh.1 $(MANDIR)/man1/pdksh.1
+- install -m644 --no-target-directory sh.1 $(MANDIR)/man1/pdksh-sh.1
++ install -m644 --no-target-directory ksh.1 $(MANDIR)/man1/$(BINNAM).1
++ install -m644 --no-target-directory sh.1 $(MANDIR)/man1/$(BINNAM)-sh.1
+
+ clean:
+ rm -f $(OBJS) $(PROG)
diff --git a/system/ksh-openbsd/slack-desc b/system/ksh-openbsd/slack-desc
index 8ed3b1d34205d..e1c74689d82fc 100644
--- a/system/ksh-openbsd/slack-desc
+++ b/system/ksh-openbsd/slack-desc
@@ -11,9 +11,9 @@ ksh-openbsd:
ksh-openbsd: This package is a patched version of the OpenBSD ksh ported to Linux,
ksh-openbsd: which is based on the original PD-ksh, but heavily modified and
ksh-openbsd: maintained by OpenBSD developers.
+ksh-openbsd:
ksh-openbsd: "Patched" means it contains modifications (improvements, bug fixes)
ksh-openbsd: separate from the OpenBSD tree (and besides the Linux port bits).
ksh-openbsd:
ksh-openbsd: Homepage: https://github.com/levaidaniel/ksh-openbsd
ksh-openbsd:
-ksh-openbsd: