3 # --with dietlibc (link with dietlibc, implies --without static)
6 %{?_with_dietlibc:%define _without_static 1}
8 Summary: Small bourne shell from Berkeley
9 Summary(de): Kleine Bourne-Shell von Berkeley
10 Summary(es): Pequeña shell bourne de Berkeley
11 Summary(fr): Shell Bourne réduit de Berkeley
12 Summary(pl): Ma³y shell bourne'a
13 Summary(pt_BR): Pequena shell bourne de Berkeley
14 Summary(ru): ïÂÌÅÇÞÅÎÎÁÑ ×ÅÒÓÉÑ Bourne shell (sh)
15 Summary(tr): Ufak bir bourne kabuðu
16 Summary(uk): ðÏÌÅÇÛÅÎÁ ×ÅÒÓ¦Ñ Bourne shell (sh)
17 Summary(zh_CN): [ϵͳ]BerkeleyµÄ΢ÐÍBourne Shell
18 Summary(zh_TW): [
\e-A¨t
\e$)B²Î]Berkeleyªº
\e-A·L
\e$)B«¬Bourne Shell
23 Group: Applications/Shells
24 Source0: %{name}-%{version}.tar.gz
25 # Source0-md5: 1c59f5b62a081cb0cb3b053c01d79529
26 Patch0: %{name}-builtin.patch
27 Patch1: %{name}-echo.patch
28 Patch2: %{name}-getcwd.patch
29 Patch3: %{name}-getopt.patch
30 Patch4: %{name}-glob.patch
31 Patch5: %{name}-jobs.patch
32 Patch6: %{name}-kill.patch
33 Patch7: %{name}-makefile.patch
34 Patch8: %{name}-manpage.patch
35 Patch9: %{name}-hetio.patch
36 Patch10: %{name}-memout.patch
37 Patch11: %{name}-misc.patch
38 Patch12: %{name}-redir.patch
39 Patch13: %{name}-setmode.patch
40 Patch14: %{name}-syntax.patch
41 Patch15: %{name}-test.patch
42 Patch16: %{name}-times.patch
43 Patch17: %{name}-debian.patch
44 Patch18: %{name}-ppid.patch
45 Patch19: %{name}-freebsd.patch
46 Patch20: %{name}-sighup.patch
47 Patch21: %{name}-dietlibc.patch
49 %{?_with_dietlibc:BuildRequires: dietlibc-static}
51 %{!?_without_static:BuildRequires: glibc-static}
52 Requires(post,preun,verify): grep
53 Requires(preun): fileutils
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Conflicts: mkinitrd <= 1.7
60 ash is a bourne shell clone from Berkeley. It supports all of the
61 standard Bourne shell commands and has the advantage of supporting
62 them while remaining considerably smaller than bash.
65 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
66 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
67 weniger Platz beansprucht als bash.
70 ash es un clone del shell bourne de Berkeley. Soporta todos los
71 comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
72 con un tamaño considerablemente menor del que bash.
75 ash est un clone Berkeley du shell Bourne. Il gère toutes les
76 commandes standard du shell Bourne et a l'avantage de les gérer tout
77 en restant considérablement plus petit que bash.
80 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
81 komendy shella Bourne'a i jest mniejszy ni¿ bash.
84 ash é um clone do shell bourne de Berkeley. Ele suporta todos os
85 comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
86 tamanho consideravelmente menor do que bash.
89 ûÅÌÌ - ÜÔÏ ÂÁÚÏ×ÁÑ ÓÉÓÔÅÍÎÁÑ ÐÒÏÇÒÁÍÍÁ, ËÏÔÏÒÁÑ ÉÎÔÅÒÐÒÅÔÉÒÕÅÔ ËÏÍÁÎÄÙ
90 ÐÏÌØÚÏ×ÁÔÅÌÑ, ××ÏÄÉÍÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ÉÌÉ ÐÒÉ ÐÏÍÏÝÉ ÍÙÛÉ. Ash - ÜÔÏ
91 ËÌÏÎ Bourne shell (sh) ÉÚ âÅÒËÌÉ. Ash ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÓÅ ÓÔÁÎÄÁÒÔÎÙÅ
92 ËÏÍÁÎÄÙ ÛÅÌÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÞÅÍ sh. ÷ ash ÏÔÓÕÔÓÔ×ÕÀÔ
93 ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Bourne shell (ÎÁÐÒÉÍÅÒ, ÉÓÔÏÒÉÑ ËÏÍÁÎÄ), ÎÏ ÏÎ
94 ÔÒÅÂÕÅÔ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÐÁÍÑÔÉ.
97 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
98 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
102 ûÅÌ - ÃÅ ÂÁÚÏ×Á ÓÉÓÔÅÍÎÁ ÐÒÏÇÒÁÍÁ, ËÏÔÒÁ ¦ÎÔÅÒÐÒÅÔÕ¤ ËÏÍÁÎÄÉ
103 ËÏÒÉÓÔÕ×ÁÞÁ, Ñ˦ ××ÏÄÑÔØÓÑ Ú ËÌÁצÁÔÕÒÉ ÁÂÏ ÚÁ ÄÏÐÏÍÏÇÏÀ ÍÉÛ¦. Ash -
104 ÃÅ ËÌÏÎ Bourne shell (sh) Ú âÅÒË̦. Ash ЦÄÔÒÉÍÕ¤ ÕÓ¦ ÓÔÁÎÄÁÒÔΦ
105 ËÏÍÁÎÄÉ ÛÅÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÎÏ ÍÅÎÛÉÍ Î¦Ö sh. ÷ ash צÄÓÕÔΦ ÄÅÑ˦
106 ÍÏÖÌÉ×ÏÓÔ¦ Bourne shell (ÎÁÐÒÉËÌÁÄ, ¦ÓÔÏÒ¦Ñ ËÏÍÁÎÄ), ÚÁÔŠצΠ×ÉÍÁÇÁ¤
107 ÚÎÁÞÎÏ ÍÅÎÛÅ ÐÁÍ'ÑÔ¦.
110 Summary: Small bourne shell from Berkeley
111 Summary(de): Kleine Bourne-Shell von Berkeley
112 Summary(fr): Shell Bourne réduit de Berkeley
113 Summary(pl): Ma³y shell bourne'a
114 Summary(tr): Ufak bir bourne kabuðu
115 Group: Applications/Shells
116 Requires(post,preun,verify): grep
117 Requires(preun): fileutils
118 Conflicts: mkinitrd <= 1.7
121 ash is a bourne shell clone from Berkeley. It supports all of the
122 standard Bourne shell commands and has the advantage of supporting
123 them while remaining considerably smaller than bash.
125 %description static -l de
126 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
127 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
128 weniger Platz beansprucht als bash.
130 %description static -l fr
131 ash est un clone Berkeley du shell Bourne. Il gère toutes les
132 commandes standard du shell Bourne et a l'avantage de les gérer tout
133 en restant considérablement plus petit que bash.
135 %description static -l pl
136 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
137 komendy shella Bourne'a i jest mniejszy ni¿ bash.
139 %description static -l tr
140 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
141 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
163 # this is mainly for information, maybe add changelog to %doc?
168 %{?_with_dietlibc:%patch21 -p1}
172 %{?_with_dietlibc:%define __cc %{_arch}-dietlibc-gcc}
174 %{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"}
175 %{!?_without_static:mv -f sh ash.static}
176 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
182 install sh $RPM_BUILD_ROOT%{_bindir}/ash
183 %{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
184 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
185 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
186 ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
189 rm -rf $RPM_BUILD_ROOT
193 if [ ! -f /etc/shells ]; then
194 echo "%{_bindir}/ash" > /etc/shells
195 echo "%{_bindir}/bsh" >> /etc/shells
197 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
198 echo "%{_bindir}/ash" >> /etc/shells
200 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
201 echo "%{_bindir}/bsh" >> /etc/shells
206 if [ "$1" = 0 ]; then
208 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
209 mv -f /etc/shells.new /etc/shells
214 if [ ! -f /etc/shells ]; then
215 echo "%{_bindir}/ash.static" >> /etc/shells
217 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
218 echo "%{_bindir}/ash.static" >> /etc/shells
223 if [ "$1" = 0 ]; then
225 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
226 mv -f /etc/shells.new /etc/shells
230 for n in ash bsh ; do
231 echo -n "Looking for $n in /etc/shells... "
232 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
234 echo "${n} missing from /etc/shells" >&2
241 echo -n "Looking for ash.static in /etc/shells... "
242 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
244 echo "ash.static missing from /etc/shells" >&2
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/ash
252 %attr(755,root,root) %{_bindir}/bsh
255 %{!?_without_static:%files static}
256 %{!?_without_static:%defattr(644,root,root,755)}
257 %{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}