diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2006-07-22 10:55:20 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2006-07-22 10:55:20 +0000 |
commit | 1f5d8f463ce08f3f2f41134d69915657bc2798e5 (patch) | |
tree | 94c0700790476c3f7854c2ff85ccb4ca37dae858 | |
parent | Add entry for phpua-* user. (diff) |
Add mksh , a Korn shell with many additions.
The MirOS Korn Shell, which contains many additions to the original
Korn shell.
WWW: http://mirbsd.de/mksh
PR: ports/100713
Submitted by: Andreas Kohn <andreas at syndrom23.de>
Notes
Notes:
svn path=/head/; revision=168483
Diffstat (limited to '')
-rw-r--r-- | shells/Makefile | 1 | ||||
-rw-r--r-- | shells/mksh/Makefile | 53 | ||||
-rw-r--r-- | shells/mksh/distinfo | 3 | ||||
-rw-r--r-- | shells/mksh/pkg-deinstall | 22 | ||||
-rw-r--r-- | shells/mksh/pkg-descr | 4 | ||||
-rw-r--r-- | shells/mksh/pkg-install | 19 |
6 files changed, 102 insertions, 0 deletions
diff --git a/shells/Makefile b/shells/Makefile index 85df7e7a72c1..722d155ad446 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -15,6 +15,7 @@ SUBDIR += gscommander SUBDIR += ibsh SUBDIR += ksh93 + SUBDIR += mksh SUBDIR += mudsh SUBDIR += nologinmsg SUBDIR += osh diff --git a/shells/mksh/Makefile b/shells/mksh/Makefile new file mode 100644 index 000000000000..b4d9bcdf2522 --- /dev/null +++ b/shells/mksh/Makefile @@ -0,0 +1,53 @@ +# Ports collection makefile for: mksh +# Date created: 2006-06-24 +# Whom: Andreas Kohn <andreas@syndrom23.de> +# +# $FreeBSD$ +# + +PORTNAME= mksh +DISTVERSION= R27e +CATEGORIES= shells +MASTER_SITES= http://www.mirbsd.org/MirOS/dist/mir/mksh/ +DISTFILES= ${PORTNAME}-${DISTVERSION}.cpio.gz + +MAINTAINER= andreas@syndrom23.de +COMMENT= A Korn shell with many additions + +WRKSRC= ${WRKDIR}/${PORTNAME} + +MAN1= mksh.1 +PLIST_FILES= bin/mksh + +OPTIONS= STATIC_MKSH "Build static mksh" on + +PKGINSTALL= pkg-install +PKGDEINSTALL= pkg-deinstall + +.include <bsd.port.pre.mk> + +do-extract: + ${MKDIR} ${WRKDIR} + cd ${WRKDIR} && \ + ${GZCAT} ${DISTDIR}/${DISTFILES} | ${CPIO} -id + +do-build: +.if defined(WITH_STATIC_MKSH) + cd ${WRKSRC} && CFLAGS="${CFLAGS}" CC="${CC}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" SHELL=${SH} ${SH} ${WRKSRC}/Build.sh -r +.else + cd ${WRKSRC} && CFLAGS="${CFLAGS}" CC="${CC}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" SHELL=${SH} ${SH} ${WRKSRC}/Build.sh -d -r +.endif + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mksh ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/mksh.1 ${MANPREFIX}/man/man1 + +pre-install: + @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +post-install: + @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.post.mk> diff --git a/shells/mksh/distinfo b/shells/mksh/distinfo new file mode 100644 index 000000000000..502d37153cb2 --- /dev/null +++ b/shells/mksh/distinfo @@ -0,0 +1,3 @@ +MD5 (mksh-R27e.cpio.gz) = 2eeb5c5fab32cc7a20ca3c7c2c6fda46 +SHA256 (mksh-R27e.cpio.gz) = 3a98c188f906cfa1c29c2e5e521fa6201fc63192e7da861b4c1b3c610ac9cebb +SIZE (mksh-R27e.cpio.gz) = 229752 diff --git a/shells/mksh/pkg-deinstall b/shells/mksh/pkg-deinstall new file mode 100644 index 000000000000..dc9e8fa6cd84 --- /dev/null +++ b/shells/mksh/pkg-deinstall @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +MKSH="${PKG_PREFIX-/usr/local}/bin/mksh" +SHELLS="${PKG_DESTDIR-}/etc/shells" + +case $2 in +DEINSTALL) + if grep -qs "^$MKSH\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + TMPSHELLS=`mktemp -t shells` + grep -v "^$MKSH\$" "$SHELLS" > "$TMPSHELLS" + cat "$TMPSHELLS" > "$SHELLS" + rm "$TMPSHELLS" + else + echo "Not root, please remove $MKSH from $SHELLS manually" + fi + fi + ;; +esac diff --git a/shells/mksh/pkg-descr b/shells/mksh/pkg-descr new file mode 100644 index 000000000000..c7704a7a97af --- /dev/null +++ b/shells/mksh/pkg-descr @@ -0,0 +1,4 @@ +The MirOS Korn Shell, which contains many additions to the original +Korn shell. + +WWW: http://mirbsd.de/mksh diff --git a/shells/mksh/pkg-install b/shells/mksh/pkg-install new file mode 100644 index 000000000000..dea9b5231c91 --- /dev/null +++ b/shells/mksh/pkg-install @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +MKSH="${PKG_PREFIX-/usr/local}/bin/mksh" +SHELLS="${PKG_DESTDIR-}/etc/shells" + +case $2 in +POST-INSTALL) + if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$MKSH\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + echo "$MKSH" >> "$SHELLS" + else + echo "Not root, please add $MKSH to $SHELLS manually" + fi + fi + ;; +esac |