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