Osh(1) is an enhanced, backward-compatible port of the Sixth Edition

Thompson shell. Sh6(1) is an unenhanced port of the shell, and
glob6(1) is a port of its global command. Together, sh6 and glob6
provide a user interface which is backward compatible with that
provided by the Sixth Edition Thompson shell and global command,
but without the obvious enhancements found in osh.

The original Thompson shell was principally written by Ken Thompson
of Bell Labs.

ok landry@
This commit is contained in:
pascal 2012-06-26 22:02:32 +00:00
parent ce1ac7a874
commit 67358852de
5 changed files with 151 additions and 0 deletions

37
shells/osh/Makefile Normal file
View File

@ -0,0 +1,37 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/06/26 22:02:32 pascal Exp $
COMMENT = Sixth Edition UNIX Shell
DISTNAME = osh-20120604
CATEGORIES = shells
HOMEPAGE = http://v6shell.org
MAINTAINER = Pascal Stumpf <Pascal.Stumpf@cubes.de>
# BSD
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c
MASTER_SITES = ${HOMEPAGE}/src/
MAKE_FLAGS = SYSCONFDIR="${SYSCONFDIR}" PREFIX="${TRUEPREFIX}"
NO_REGRESS = Yes
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/osh
${INSTALL_DATA} ${WRKSRC}/examples/etc.osh.login \
${PREFIX}/share/examples/osh.login
${INSTALL_DATA} ${WRKSRC}/examples/etc.osh.logout \
${PREFIX}/share/examples/osh.logout
${INSTALL_DATA} ${WRKSRC}/examples/etc.osh.oshrc \
${PREFIX}/share/examples/osh.oshrc
.include <bsd.port.mk>

5
shells/osh/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (osh-20120604.tar.gz) = qx32hg2ZXNZTDE4Uj+Kdgw==
RMD160 (osh-20120604.tar.gz) = JPI88Tnrf6n5Ap2UfX3DZInM1Zc=
SHA1 (osh-20120604.tar.gz) = Gqm7d7HaUyaRUgD4A6ZWrn5+Otg=
SHA256 (osh-20120604.tar.gz) = Dn18tt1IhSwRcQ5kA4Vcjf4yMUBUB9KW1zSik1r68Bk=
SIZE (osh-20120604.tar.gz) = 124688

View File

@ -0,0 +1,79 @@
$OpenBSD: patch-Makefile,v 1.1.1.1 2012/06/26 22:02:32 pascal Exp $
--- Makefile.orig Tue Jun 5 01:53:10 2012
+++ Makefile Fri Jun 15 20:37:23 2012
@@ -15,12 +15,12 @@ PREFIX?= /usr/local
BINDIR?= $(PREFIX)/bin
DOCDIR?= $(PREFIX)/share/doc/$(OSH_VERSION)
EXPDIR?= $(DOCDIR)/examples
-MANDIR?= $(PREFIX)/share/man/man1
+MANDIR?= $(PREFIX)/man/man1
SYSCONFDIR?= $(PREFIX)/etc
#BINGRP= -g bin
-BINMODE= -m 0555
+#BINMODE= -m 0555
#MANGRP= -g bin
-MANMODE= -m 0444
+#MANMODE= -m 0444
#
# Build utilities (SHELL must be POSIX-compliant)
@@ -45,7 +45,7 @@ WARNINGS= -Wall -W
#WARNINGS+= -Wstack-protector
#WARNINGS+= -Wshorten-64-to-32
#CFLAGS+= -g
-CFLAGS+= -Os $(OPTIONS) $(WARNINGS)
+CFLAGS+= $(OPTIONS) $(WARNINGS)
#LDFLAGS+= -static
#
@@ -179,24 +179,24 @@ install-sh6all: sh6all install-sh6 install-utils
install-utils: install-ubin install-uman
install-osh: $(OSH) $(OSHMAN) install-dest
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) osh $(DESTBINDIR)
- $(INSTALL) -c $(MANGRP) $(MANMODE) osh.1.out $(DESTMANDIR)/osh.1
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) osh $(DESTBINDIR)
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) osh.1.out $(DESTMANDIR)/osh.1
install-sh6: $(SH6) $(SH6MAN) install-dest
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) sh6 $(DESTBINDIR)
- $(INSTALL) -c $(MANGRP) $(MANMODE) sh6.1.out $(DESTMANDIR)/sh6.1
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) glob6 $(DESTBINDIR)
- $(INSTALL) -c $(MANGRP) $(MANMODE) glob6.1.out $(DESTMANDIR)/glob6.1
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) sh6 $(DESTBINDIR)
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) sh6.1.out $(DESTMANDIR)/sh6.1
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) glob6 $(DESTBINDIR)
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) glob6.1.out $(DESTMANDIR)/glob6.1
install-ubin: $(UBIN) install-dest
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) fd2 $(DESTBINDIR)
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) goto $(DESTBINDIR)
- $(INSTALL) -c -s $(BINGRP) $(BINMODE) if $(DESTBINDIR)
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) fd2 $(DESTBINDIR)
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) goto $(DESTBINDIR)
+ $(INSTALL) -c -s -g $(BINGRP) -m $(BINMODE) if $(DESTBINDIR)
install-uman: $(UMAN) install-dest
- $(INSTALL) -c $(MANGRP) $(MANMODE) fd2.1.out $(DESTMANDIR)/fd2.1
- $(INSTALL) -c $(MANGRP) $(MANMODE) goto.1.out $(DESTMANDIR)/goto.1
- $(INSTALL) -c $(MANGRP) $(MANMODE) if.1.out $(DESTMANDIR)/if.1
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) fd2.1.out $(DESTMANDIR)/fd2.1
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) goto.1.out $(DESTMANDIR)/goto.1
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) if.1.out $(DESTMANDIR)/if.1
install-dest:
test -d $(DESTBINDIR) || { umask 0022 && mkdir -p $(DESTBINDIR) ; }
@@ -204,11 +204,11 @@ install-dest:
install-doc:
test -d $(DESTDOCDIR) || { umask 0022 && mkdir -p $(DESTDOCDIR) ; }
- $(INSTALL) -c $(MANGRP) $(MANMODE) [ACDILNPR]* $(DESTDOCDIR)
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) [ACDILNPR]* $(DESTDOCDIR)
install-exp:
test -d $(DESTEXPDIR) || { umask 0022 && mkdir -p $(DESTEXPDIR) ; }
- $(INSTALL) -c $(MANGRP) $(MANMODE) examples/* $(DESTEXPDIR)
+ $(INSTALL) -c -g $(MANGRP) -m $(MANMODE) examples/* $(DESTEXPDIR)
#
# Cleanup targets

9
shells/osh/pkg/DESCR Normal file
View File

@ -0,0 +1,9 @@
Osh(1) is an enhanced, backward-compatible port of the Sixth Edition
Thompson shell. Sh6(1) is an unenhanced port of the shell, and
glob6(1) is a port of its global command. Together, sh6 and glob6
provide a user interface which is backward compatible with that
provided by the Sixth Edition Thompson shell and global command,
but without the obvious enhancements found in osh.
The original Thompson shell was principally written by Ken Thompson
of Bell Labs.

21
shells/osh/pkg/PLIST Normal file
View File

@ -0,0 +1,21 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/06/26 22:02:32 pascal Exp $
@conflict devel/omake
@bin bin/fd2
@bin bin/glob6
@bin bin/goto
@bin bin/if
@shell bin/osh
@shell bin/sh6
@man man/man1/fd2.1
@man man/man1/glob6.1
@man man/man1/goto.1
@man man/man1/if.1
@man man/man1/osh.1
@man man/man1/sh6.1
share/examples/osh/
share/examples/osh.login
@sample ${SYSCONFDIR}/osh.login
share/examples/osh.logout
@sample ${SYSCONFDIR}/osh.logout
share/examples/osh.oshrc
@sample ${SYSCONFDIR}/osh.oshrc