]> git.pld-linux.org Git - packages/mksh.git/blame - mksh.spec
- raw PLD spec
[packages/mksh.git] / mksh.spec
CommitLineData
5cba9227 1Summary: MirBSD Korn Shell
2Name: mksh
3Version: 31d
4Release: 0.1
5License: BSD
6Group: Applications/Shells
7Source0: http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.cpio.gz
8# Source0-md5: a7c77428bd2b887c1583095a00c84aac
9Source1: http://www.mirbsd.org/MirOS/dist/hosted/other/arc4random.c
10URL: http://mirbsd.de/mksh
11Requires(pre): FHS
12Requires: setup >= 2.4.6-2
13BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15%define _bindir /bin
16
17%description
18mksh is the MirBSD enhanced version of the Public Domain Korn shell
19(pdksh), a bourne-compatible shell which is largely si- milar to the
20original AT&T Korn shell. It includes bug fixes and feature
21improvements in order to produce a modern, robust shell good for
22interactive and especially script use. It has UTF-8 support in the
23emacs command line editing mode; corres- ponds to OpenBSD 4.2-current
24ksh sans GNU bash-like $PS1; the build environment requirements are
25autoconfigured; throughout code simplification/bugfix/enhancement has
26been done, and the shell has extended compatibility to other modern
27shells.
28
29
30%prep
31%setup -q -T
32gzip -dc %{SOURCE0} | cpio -mid
33mv mksh/* ./ ; rm -fr mksh
34cp "%{SOURCE1}" ./
35
36%build
37CC="%__cc" CFLAGS="%{optflags}" sh ./Build.sh -Q -r -j
38./test.sh -v
39
40%install
41rm -rf $RPM_BUILD_ROOT
42
43install -D mksh $RPM_BUILD_ROOT%{_bindir}/mksh
44install -D mksh.1 $RPM_BUILD_ROOT%{_mandir}/man1/mksh.1
45
46%clean
47rm -rf $RPM_BUILD_ROOT
48
49%post -p <lua>
50t = {}
51f = io.open("/etc/shells", "r")
52if f then
53 for l in f:lines() do t[l]=l; end
54 f:close()
55end
56for _, s in ipairs({"/bin/mksh", "/bin/sh"}) do
57 if not t[s] then
58 f = io.open("/etc/shells", "a"); f:write(s.."\n"); f:close()
59 end
60end
61
62%preun -p <lua>
63if arg[2] == "0" then
64 f = io.open("/etc/shells", "r")
65 if f then
66 s=""
67 for l in f:lines() do
68 if not string.match(l,"^/bin/mksh$") then
69 s=s..l.."\n"
70 end
71 end
72 f:close()
73 io.open("/etc/shells", "w"):write(s)
74 end
75end
76
77%files
78%defattr(644,root,root,755)
79%doc dot.mkshrc
80%attr(755,root,root) %{_bindir}/mksh
81%{_mandir}/man1/*
This page took 0.048936 seconds and 4 git commands to generate.