1 Summary: MirBSD Korn Shell
6 Group: Applications/Shells
7 Source0: http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.cpio.gz
8 # Source0-md5: a7c77428bd2b887c1583095a00c84aac
9 Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c
10 URL: http://mirbsd.de/mksh
12 Requires: setup >= 2.4.6-2
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 mksh is the MirBSD enhanced version of the Public Domain Korn shell
19 (pdksh), a bourne-compatible shell which is largely similar to the
20 original AT&T Korn shell. It includes bug fixes and feature
21 improvements in order to produce a modern, robust shell good for
22 interactive and especially script use. It has UTF-8 support in the
23 emacs command line editing mode; corresponds to OpenBSD 4.2-current
24 ksh sans GNU bash-like $PS1; the build environment requirements are
25 autoconfigured; throughout code simplification/bugfix/enhancement has
26 been done, and the shell has extended compatibility to other modern
31 gzip -dc %{SOURCE0} | cpio -mid
37 CC="%{__cc}" CFLAGS="%{rpmcflags}" sh ./Build.sh -Q -r -j
41 rm -rf $RPM_BUILD_ROOT
42 install -D mksh $RPM_BUILD_ROOT%{_bindir}/mksh
43 install -D mksh.1 $RPM_BUILD_ROOT%{_mandir}/man1/mksh.1
46 rm -rf $RPM_BUILD_ROOT
50 f = io.open("/etc/shells", "r")
52 for l in f:lines() do t[l]=l; end
55 for _, s in ipairs({"/bin/mksh"}) do
57 f = io.open("/etc/shells", "a"); f:write(s.."\n"); f:close()
63 f = io.open("/etc/shells", "r")
67 if not string.match(l,"^/bin/mksh$") then
72 io.open("/etc/shells", "w"):write(s)
77 %defattr(644,root,root,755)
79 %attr(755,root,root) %{_bindir}/mksh