xref: /illumos-gate/usr/src/contrib/ast/lib/package/ast-ksh.pkg (revision 379728489ed47862c4927c75771e767b9476c9c4)
1ast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
2
3:COVERS: ksh
4
5:LICENSE: *.open
6
7:CATEGORY: shells
8
9:INDEX: ksh and support libraries
10
11:DESCRIPTION:
12	The AT&T Software Technology ast-ksh package from AT&T Research
13	contains ksh and support libraries. This is the minimal set of
14	components needed to build ksh.
15
16:DETAILS: cyg
17	:README:
18		This package installs a standalone ksh93 executable ksh93.exe
19		and its man page ksh93.1.  If /bin/ksh.exe does not exist then
20		these symlinks
21			/bin/ksh.exe => ksh93.exe
22			/usr/share/man/man1/ksh93.1 => ksh.1
23		are created.  This allows alternative ksh impelementations,
24		e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
25		and ksh.1 symbolic links.  In addition, ksh and ksh93 paths are
26		added to /etc/shells if not already present.
27		$()
28		Each builtin or special command accepts the --man and --html
29		options to list the man page on the standard error. The --???
30		option describes the self documenting options available to all
31		builtin and special commands.
32		$()
33		The stanadlone ksh is statically linked with the ast libcmd
34		library which provides several builtin versions of /bin
35		commands. "builtin | grep /opt/ast/bin" lists the libcmd
36		builtins on the standard output. /opt/ast/bin/FOO accesses
37		the FOO builtin, whether the /opt/ast/bin directory exists
38		or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
39		as FOO, bypassing the $PATH setting. To enable all libcmd
40		builtins do one of the following:
41		  (a) create the directory /opt/ast/bin and the file
42		      /opt/ast/bin/.paths with this line
43		      	BUILTIN_LIB=.
44		      and place /opt/ast/bin before /bin and /usr/bin in $PATH
45		      (this will affect all ksh subshells and scripts)
46		  (b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
47		      (this will affect only the current shell)
48		Some scripts may run significantly faster with libcmd builtins
49		enabled.
50		$()
51		The ast library checks the DOSPATHVARS environment variable
52		for variable path values to convert to and from native windows
53		format when cross-executing between cygwin and non-cygwin
54		programs. The value is a space separated list of environment
55		variables to convert. PATH is handled by cygwin so it is not
56		converted by the ast library.
57		$()
58		The astksh cygwin source package provides a bootstrap build
59		environment that is not suited for an edit/build/debug cycle.
60		If you want to explore and modify the source then you should
61		install the (non-cygwinized) ast-base package which includes
62		AT&T nmake. With ast-base you will also be able to regenerate
63		the astksh cygwin source and binary packages.
64		$()
65		For more information on ksh and other AT&T ast tools see
66		   http://www.research.att.com/sw/download/
67	:EXPORT:
68		SHOPT_CMDLIB_DIR=1
69	bin/ksh93.exe :INSTALL: bin/ksh.exe
70	share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
71	:POSTINSTALL:
72		if	[ ! -e /bin/ksh.exe ]
73		then	ln -fs ksh93.exe /bin/ksh.exe
74			ln -fs ksh93.1 /usr/share/man/man1/ksh.1
75		else	echo "/bin/ksh.exe already exists"
76		fi
77		if [ -f /etc/shells ]
78		then	for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
79			do	if	grep $i /etc/shells >/dev/null 2>&1
80				then	echo "$i already in /etc/shells"
81				else	echo $i >> /etc/shells
82					echo "$i added to /etc/shells"
83				fi
84			done
85		else	echo "no /etc/shells file"
86		fi
87		exit 0
88	:TEST: bin/ksh
89		KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests
90