summaryrefslogtreecommitdiff
path: root/system/v7sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-05-17 16:40:01 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-05-21 08:25:11 +0700
commitd0f680474ffa53b3840b9864148da7c6f205eb37 (patch)
tree1acfe1c2aadcc487a93dffdd0d33bf118712199a /system/v7sh
parent5575ec60dba3a5a01c8b68ff9952aa87adedff03 (diff)
downloadslackbuilds-d0f680474ffa53b3840b9864148da7c6f205eb37.tar.gz
system/v7sh: Added (port of original Steve Bourne shell from 1978)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/v7sh')
-rw-r--r--system/v7sh/README18
-rw-r--r--system/v7sh/doinst.sh1
-rw-r--r--system/v7sh/slack-desc19
-rw-r--r--system/v7sh/v7sh.SlackBuild91
-rw-r--r--system/v7sh/v7sh.info10
5 files changed, 139 insertions, 0 deletions
diff --git a/system/v7sh/README b/system/v7sh/README
new file mode 100644
index 0000000000..6c8b1e743d
--- /dev/null
+++ b/system/v7sh/README
@@ -0,0 +1,18 @@
+v7sh (port of the original Steve Bourne shell from 1978)
+
+This is Nikola Vladov's port of the V7 Unix Bourne shell to
+modern systems, based on Geoff Collyer's port. It functions
+almost identically to the original Bourne shell, with some slight
+differences, and one major one: The original V7 shell didn't support
+comments with the # character, but this one does.
+
+Installing this package adds /bin/v7sh to /etc/shells. The man page is
+also called v7sh, though it calls itself "sh" in the text.
+
+See https://www.in-ulm.de/~mascheck/bourne/ for more information.
+
+See also:
+
+system/etsh - Ken Thompson's shell, from V6 (~1975).
+system/heirloom-sh - newer Bourne shell, based on SVr4 (~1988).
+system/csh - historical version of the C shell.
diff --git a/system/v7sh/doinst.sh b/system/v7sh/doinst.sh
new file mode 100644
index 0000000000..edbdb7ab36
--- /dev/null
+++ b/system/v7sh/doinst.sh
@@ -0,0 +1 @@
+grep -q '^/bin/v7sh$' etc/shells 2>/dev/null || echo '/bin/v7sh' >> etc/shells
diff --git a/system/v7sh/slack-desc b/system/v7sh/slack-desc
new file mode 100644
index 0000000000..ea1e04db41
--- /dev/null
+++ b/system/v7sh/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+v7sh: v7sh (port of the original Steve Bourne shell from 1978)
+v7sh:
+v7sh: This is Nikola Vladov's port of the V7 Unix Bourne shell to
+v7sh: modern systems, based on Geoff Collyer's port. It functions
+v7sh: almost identically to the original Bourne shell, with some
+v7sh: slight differences, and one major one: The original V7 shell
+v7sh: didn't support comments with the # character, but this one does.
+v7sh:
+v7sh: See https://www.in-ulm.de/~mascheck/bourne/ for more information.
+v7sh:
+v7sh:
diff --git a/system/v7sh/v7sh.SlackBuild b/system/v7sh/v7sh.SlackBuild
new file mode 100644
index 0000000000..18cb2fde8c
--- /dev/null
+++ b/system/v7sh/v7sh.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Slackware build script for v7sh
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Notes:
+
+# - The source tarball is called v7_sh, but the existing FreeBSD
+# port of the Version 7 shell is called v7sh. I prefer the name
+# without the underscore, if only because it's easier to type.
+
+# - I put the shell in /bin/v7sh, and add it to /etc/shells in doinst.sh,
+# meaning it'll work as a login shell (if anyone's feeling *that*
+# nostalgic...)
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=v7sh
+SRCNAM=v7_sh
+VERSION=${VERSION:-20100108}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM
+tar xvf $CWD/$SRCNAM.tar.gz
+cd $SRCNAM
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# add timestamp and section/header info to man page
+sed -i \
+ -e '/^\.TH/s|$| "January 8, 2010" "SlackBuilds.org" "UNIX 7th Edition"|' \
+ sh.1
+
+make CFLAGS="$SLKCFLAGS -fcommon"
+
+# no 'make install' target. it's just the binary, man page, and docs.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/{bin,usr/man/man1} $PKGDOC
+install -s sh $PKG/bin/$PRGNAM
+gzip -9c < sh.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+install -m0644 CHANGES NOTICE.pdf README Version changes_since_v7 $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/v7sh/v7sh.info b/system/v7sh/v7sh.info
new file mode 100644
index 0000000000..b0c98e2aed
--- /dev/null
+++ b/system/v7sh/v7sh.info
@@ -0,0 +1,10 @@
+PRGNAM="v7sh"
+VERSION="20100108"
+HOMEPAGE="https://web.archive.org/web/20150805115723/http://riemann.fmi.uni-sofia.bg/sh/"
+DOWNLOAD="https://web.archive.org/web/20150805115723/http://riemann.fmi.uni-sofia.bg/sh/v7_sh.tar.gz"
+MD5SUM="e503e6110a95a8387421f5c938e0ce92"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"