aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-02-10 20:49:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-02-10 20:50:26 +0700
commit3a4c44101c4d90a5db4e7e6ec1d8ae3b418363be (patch)
treeee06b310e7a8f31613dab1ab2bbf27eac3b07a79
parentd80298d80370c2c670a9e5182c5bc4eb40c4a0e0 (diff)
system/ksh-openbsd: Updated for version 20180115.
This reverts commit 06a99f4aa15c8cfec1fa88e58579d7760bd548f4. 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, 37 insertions, 83 deletions
diff --git a/system/ksh-openbsd/README b/system/ksh-openbsd/README
index 47ac8c61d79be..8c23245a83d73 100644
--- a/system/ksh-openbsd/README
+++ b/system/ksh-openbsd/README
@@ -1,6 +1,8 @@
-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.
+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).
-"Patched" means it contains modifications outside of the OpenBSD tree
-(And besides the Linux port bits).
+See the Changelog.ksh-openbsd and the homepage for more information about the
+changes: https://github.com/levaidaniel/ksh-openbsd
diff --git a/system/ksh-openbsd/doinst.sh b/system/ksh-openbsd/doinst.sh
index de374ed98deb3..1e26ea54a4c1c 100644
--- a/system/ksh-openbsd/doinst.sh
+++ b/system/ksh-openbsd/doinst.sh
@@ -1,8 +1,3 @@
-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
+if ! grep -q '/bin/pdksh' etc/shells ; then
+ printf "/bin/pdksh\n" >> etc/shells ;
fi
diff --git a/system/ksh-openbsd/ksh-openbsd.SlackBuild b/system/ksh-openbsd/ksh-openbsd.SlackBuild
index 603cfe8f9ca1b..529530c8c8bb7 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
diff --git a/system/ksh-openbsd/ksh-openbsd.info b/system/ksh-openbsd/ksh-openbsd.info
index 08edda81b25ec..be79c4e289ef4 100644
--- a/system/ksh-openbsd/ksh-openbsd.info
+++ b/system/ksh-openbsd/ksh-openbsd.info
@@ -1,10 +1,10 @@
PRGNAM="ksh-openbsd"
-VERSION="20190127"
+VERSION="20180115"
HOMEPAGE="https://github.com/levaidaniel/ksh-openbsd"
-DOWNLOAD="https://github.com/levaidaniel/ksh-openbsd/archive/20190127/ksh-openbsd-20190127.tar.gz"
-MD5SUM="a039295afd4e917c6a74901dacac6f28"
+DOWNLOAD="https://github.com/levaidaniel/ksh-openbsd/archive/20180115.tar.gz"
+MD5SUM="738aaeaed76fa05feaa8900040fd16b1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libbsd"
-MAINTAINER="Hunter Sezen"
-EMAIL="orbea@fredslev.dk"
+MAINTAINER="LEVAI Daniel"
+EMAIL="leva@ecentrum.hu"
diff --git a/system/ksh-openbsd/oksh.patch b/system/ksh-openbsd/oksh.patch
deleted file mode 100644
index 00d1c7ea0fefa..0000000000000
--- a/system/ksh-openbsd/oksh.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-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 e1c74689d82fc..8ed3b1d34205d 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: