aboutsummaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-07-22 10:55:20 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-07-22 10:55:20 +0000
commit1f5d8f463ce08f3f2f41134d69915657bc2798e5 (patch)
tree94c0700790476c3f7854c2ff85ccb4ca37dae858 /shells
parentdd0c3842f2243e6ed976b107b2587c8b2c59e34b (diff)
downloadports-1f5d8f463ce08f3f2f41134d69915657bc2798e5.tar.gz
ports-1f5d8f463ce08f3f2f41134d69915657bc2798e5.zip
Notes
Diffstat (limited to 'shells')
-rw-r--r--shells/Makefile1
-rw-r--r--shells/mksh/Makefile53
-rw-r--r--shells/mksh/distinfo3
-rw-r--r--shells/mksh/pkg-deinstall22
-rw-r--r--shells/mksh/pkg-descr4
-rw-r--r--shells/mksh/pkg-install19
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