diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/mksh |
Initial import
Diffstat (limited to 'package/mksh')
-rw-r--r-- | package/mksh/Config.in | 31 | ||||
-rw-r--r-- | package/mksh/Makefile | 34 | ||||
-rw-r--r-- | package/mksh/ipkg/mksh.conffiles | 1 | ||||
-rw-r--r-- | package/mksh/ipkg/mksh.control | 4 | ||||
-rw-r--r-- | package/mksh/patches/patch-dot_mkshrc | 36 |
5 files changed, 106 insertions, 0 deletions
diff --git a/package/mksh/Config.in b/package/mksh/Config.in new file mode 100644 index 000000000..39f792af3 --- /dev/null +++ b/package/mksh/Config.in @@ -0,0 +1,31 @@ +config ADK_PACKAGE_MKSH + prompt "mksh................................. The MirBSD enhanced Korn Shell" + tristate + default n + help + mksh is the MirBSD enhanced version of the Public Domain Korn + shell (pdksh), a bourne-compatible shell which is largely si- + milar to the original AT&T Korn shell. It includes bug fixes + and feature improvements in order to produce a modern, robust + shell good for interactive and especially script use. It has + UTF-8 support in the emacs command line editing mode; corres- + ponds to OpenBSD 4.4-beta ksh without GNU bash-like $PS1; the + build environment requirements are autoconfigured; throughout + code simplification/bugfix/enhancement has been done, and the + shell has extended compatibility to other modern shells. + + This package also installs mksh as /bin/ash and /bin/sh (i.e. + the default Bourne/POSIX shell) and creates a ~/.mkshrc file, + which can be used to further customise the look and feel. + + http://mirbsd.de/mksh + +config ADK_PACKAGE_MKSH_FULL + bool " Include all features" + depends ADK_PACKAGE_MKSH + default y + help + Disable this to remove a few functions from mksh to make it smaller. + Ideal for embedded systems. However, be aware you will lose some + functionality you'd otherwise expect, among these is the vi command + line editing mode. diff --git a/package/mksh/Makefile b/package/mksh/Makefile new file mode 100644 index 000000000..03a47b8c4 --- /dev/null +++ b/package/mksh/Makefile @@ -0,0 +1,34 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME= mksh +PKG_VERSION= 35b +PKG_RELEASE= 2 +DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.cpio.gz +PKG_MD5SUM= 0e96cd3f8141b7abc679bbb303a8be2c +MASTER_SITES= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/} +WRKDIST= ${WRKDIR}/${PKG_NAME} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifeq ($(strip ${ADK_PACKAGE_MKSH_FULL}),) +TCPPFLAGS+= -DMKSH_SMALL=1 +endif + +do-build: + cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' \ + CPPFLAGS='${TCPPFLAGS}' LDFLAGS='${TLDFLAGS}' \ + TARGET_OS=${UNAME_S} ${BASH} ${WRKSRC}/Build.sh -Q -r + +do-install: + install -d -m 0755 ${IDIR_MKSH}/bin + install -c -m 755 ${WRKBUILD}/mksh ${IDIR_MKSH}/bin/ + install -c -m 644 ${WRKSRC}/dot.mkshrc ${IDIR_MKSH}/.mkshrc + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mksh/ipkg/mksh.conffiles b/package/mksh/ipkg/mksh.conffiles new file mode 100644 index 000000000..f139f0b55 --- /dev/null +++ b/package/mksh/ipkg/mksh.conffiles @@ -0,0 +1 @@ +/.mkshrc diff --git a/package/mksh/ipkg/mksh.control b/package/mksh/ipkg/mksh.control new file mode 100644 index 000000000..40c076116 --- /dev/null +++ b/package/mksh/ipkg/mksh.control @@ -0,0 +1,4 @@ +Package: mksh +Priority: optional +Section: misc +Description: MirBSD enhanced version of the Korn Shell diff --git a/package/mksh/patches/patch-dot_mkshrc b/package/mksh/patches/patch-dot_mkshrc new file mode 100644 index 000000000..13093bb79 --- /dev/null +++ b/package/mksh/patches/patch-dot_mkshrc @@ -0,0 +1,36 @@ +$Id$ + + • OpenADK patches: + – no hostname(1) + – ls has no -o + – yofuh doesn’t like $? in $PS1 + +--- mksh.orig/dot.mkshrc Sat May 17 18:27:55 2008 ++++ mksh/dot.mkshrc Mon Jul 21 21:02:05 2008 +@@ -2,13 +2,15 @@ + #- + # ~/.mkshrc: mksh initialisation file for interactive shells + +-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)} ++: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)} + [[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-) + : ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi + function precmd { + typeset -i e=$? + +- (( e )) && print -n "$e|" ++# enable this back if you want the errorlevel in your prompt ++# this is default in upstream mksh, disabled locally in fwrt ++# (( e )) && print -n "$e|" + } + PS1='$(precmd)${USER:=$(ulimit -c 0;id -un 2>&- || print \?)}@${HOSTNAME%%.*}:$( + typeset pfx=~ wd=${PWD:-?} +@@ -30,7 +32,7 @@ unalias ls + alias l='ls -F' + alias la='l -a' + alias ll='l -l' +-alias lo='l -alo' ++alias lo='l -al' + alias which='whence -p' + whence -p rot13 >&- || alias rot13='tr \ + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \ |