]> git.pld-linux.org Git - packages/mksh.git/blob - mksh.spec
- package /bin/sh, typo fixed
[packages/mksh.git] / mksh.spec
1 %bcond_without  static
2 %bcond_without  tests
3 #
4 Summary:        MirBSD Korn Shell
5 Summary(pl.UTF-8):      Powłoka Korna z MirBSD
6 Name:           mksh
7 Version:        40
8 Release:        1
9 License:        BSD
10 Group:          Applications/Shells
11 Source0:        http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.cpio.gz
12 # Source0-md5:  395a6c5f39c7e2afd8f6504d90ca90bd
13 Source1:        %{name}-mkshrc
14 Patch0:         %{name}-mkshrc_support.patch
15 URL:            https://www.mirbsd.org/mksh.htm
16 %if %{with tests}
17 BuildRequires:  ed
18 BuildRequires:  perl-base
19 %endif
20 %{?with_static:BuildRequires:   glibc-static}
21 BuildRequires:  rpmbuild(macros) >= 1.462
22 # is needed for /etc directory existence
23 Requires(pre):  FHS
24 Requires:       setup >= 2.4.6-2
25 Obsoletes:      pdksh
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _bindir                 /bin
29
30 %description
31 mksh is the MirBSD enhanced version of the Public Domain Korn shell
32 (pdksh), a Bourne-compatible shell which is largely similar to the
33 original AT&T Korn shell. It includes bug fixes and feature
34 improvements in order to produce a modern, robust shell good for
35 interactive and especially script use. It has UTF-8 support in the
36 emacs command line editing mode; corresponds to OpenBSD 4.2-current
37 ksh sans GNU bash-like $PS1; the build environment requirements are
38 autoconfigured; throughout code simplification/bugfix/enhancement has
39 been done, and the shell has extended compatibility to other modern
40 shells.
41
42 %description -l pl.UTF-8
43 mksh to pochodząca z MirBSD rozszerzona wersja powłoki Public Domain
44 Korn Shell (pdksh) - kompatybilnej z powłoką Bourne'a, w większości
45 zbliżonej do oryginalnej powłoki Korna z AT&T. Zawiera poprawki błędów
46 i rozszerzenia mające na celu stworzenie współczesnej powłoki o
47 bogatych możliwościach do użytku interaktywnego i (zwłaszcza) w
48 skryptach. Ma obsługę UTF-8 w trybie edycji linii poleceń w stylu
49 emacsa; $PS1 odpowiada temu z ksh obecnym w OpenBSD 4.2-current;
50 środowisko budowania jest automatycznie konfigurowane; dzięki
51 wykonanym uproszczeniom kodu, poprawkom i rozszerzeniom powłoka ma
52 rozszerzoną kompatybilność z innymi współczesnymi powłokami.
53
54 %package static
55 Summary:        Statically linked the MirBSD enhanced version of pdksh
56 Summary(pl.UTF-8):      Skonsolidowana statycznie powłoka mksh
57 Group:          Applications/Shells
58 # requires base for /etc/mkshrc?
59 Requires:       %{name} = %{version}-%{release}
60
61 %description static
62 mksh is the MirBSD enhanced version of the Public Domain Korn shell
63 (pdksh), a Bourne-compatible shell which is largely similar to the
64 original AT&T Korn shell.
65
66 This packege contains statically linked version of mksh.
67
68 %description static -l pl.UTF-8
69 mksh to pochodząca z MirBSD rozszerzona wersja powłoki Public Domain
70 Korn Shell (pdksh) - kompatybilnej z powłoką Bourne'a, w większości
71 zbliżonej do oryginalnej powłoki Korna z AT&T.
72
73 W tym pakiecie jest mksh skonsolidowany statycznie.
74
75 %prep
76 %setup -qcT
77 gzip -dc %{SOURCE0} | cpio -mid
78 mv mksh/* .; rmdir mksh
79
80 %patch0 -p0
81
82 %build
83 install -d out
84
85 CC="%{__cc}" \
86 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
87 LDFLAGS="%{rpmldflags}" \
88 sh ./Build.sh -Q -r -j
89
90 %{?with_tests:./test.sh -v}
91 mv mksh out/mksh.dynamic
92
93 %if %{with static}
94 CC="%{__cc}" \
95 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
96 LDFLAGS="%{rpmldflags} -static" \
97 sh ./Build.sh -Q -r -j
98
99 %{?with_tests:./test.sh -v}
100 mv mksh out/mksh.static
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
106 install -p out/mksh.dynamic $RPM_BUILD_ROOT%{_bindir}/mksh
107 %{?with_static:install -p out/mksh.static $RPM_BUILD_ROOT%{_bindir}/mksh.static}
108
109 cp -a mksh.1 $RPM_BUILD_ROOT%{_mandir}/man1/mksh.1
110 echo ".so mksh.1" > $RPM_BUILD_ROOT%{_mandir}/man1/sh.1
111
112 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mkshrc
113 ln -sf mksh $RPM_BUILD_ROOT%{_bindir}/sh
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %post   -p %add_etc_shells -p /bin/sh /bin/mksh
119 %preun  -p %remove_etc_shells -p /bin/sh /bin/mksh
120
121 %post static -p %add_etc_shells -p /bin/mksh.static
122 %preun static -p %remove_etc_shells -p /bin/mksh.static
123
124 %files
125 %defattr(644,root,root,755)
126 %doc dot.mkshrc
127 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/mkshrc
128 %attr(755,root,root) %{_bindir}/mksh
129 %attr(755,root,root) %{_bindir}/sh
130 %{_mandir}/man1/mksh.1*
131 %{_mandir}/man1/sh.1*
132
133 %if %{with static}
134 %files static
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_bindir}/mksh.static
137 %endif
This page took 0.083462 seconds and 4 git commands to generate.