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(fr): Shell Bourne réduit de Berkeley
11 Summary(pl): Ma³y shell bourne'a
12 Summary(ru): ïÂÌÅÇÞÅÎÎÁÑ ×ÅÒÓÉÑ Bourne shell (sh)
13 Summary(tr): Ufak bir bourne kabuðu
14 Summary(uk): ðÏÌÅÇÛÅÎÁ ×ÅÒÓ¦Ñ Bourne shell (sh)
19 Group: Applications/Shells
20 Source0: %{name}-%{version}.tar.gz
21 Patch0: %{name}-builtin.patch
22 Patch1: %{name}-echo.patch
23 Patch2: %{name}-getcwd.patch
24 Patch3: %{name}-getopt.patch
25 Patch4: %{name}-glob.patch
26 Patch5: %{name}-jobs.patch
27 Patch6: %{name}-kill.patch
28 Patch7: %{name}-makefile.patch
29 Patch8: %{name}-manpage.patch
30 Patch9: %{name}-hetio.patch
31 Patch10: %{name}-memout.patch
32 Patch11: %{name}-misc.patch
33 Patch12: %{name}-redir.patch
34 Patch13: %{name}-setmode.patch
35 Patch14: %{name}-syntax.patch
36 Patch15: %{name}-test.patch
37 Patch16: %{name}-times.patch
38 Patch17: %{name}-debian.patch
39 Patch18: %{name}-ppid.patch
40 Patch19: %{name}-freebsd.patch
41 Patch20: %{name}-sighup.patch
42 Patch21: %{name}-dietlibc.patch
45 %{!?_without_static:BuildRequires: glibc-static}
46 %{?_with_dietlibc:BuildRequires: dietlibc-static}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Conflicts: mkinitrd <= 1.7
55 ash is a bourne shell clone from Berkeley. It supports all of the
56 standard Bourne shell commands and has the advantage of supporting
57 them while remaining considerably smaller than bash.
60 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
61 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
62 weniger Platz beansprucht als bash.
65 ash est un clone Berkeley du shell Bourne. Il gère toutes les
66 commandes standard du shell Bourne et a l'avantage de les gérer tout
67 en restant considérablement plus petit que bash.
70 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
71 komendy shella Bourne'a i jest mniejszy ni¿ bash.
74 ûÅÌÌ - ÜÔÏ ÂÁÚÏ×ÁÑ ÓÉÓÔÅÍÎÁÑ ÐÒÏÇÒÁÍÍÁ, ËÏÔÏÒÁÑ ÉÎÔÅÒÐÒÅÔÉÒÕÅÔ ËÏÍÁÎÄÙ
75 ÐÏÌØÚÏ×ÁÔÅÌÑ, ××ÏÄÉÍÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ÉÌÉ ÐÒÉ ÐÏÍÏÝÉ ÍÙÛÉ. Ash - ÜÔÏ
76 ËÌÏÎ Bourne shell (sh) ÉÚ âÅÒËÌÉ. Ash ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÓÅ ÓÔÁÎÄÁÒÔÎÙÅ
77 ËÏÍÁÎÄÙ ÛÅÌÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÞÅÍ sh. ÷ ash ÏÔÓÕÔÓÔ×ÕÀÔ
78 ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Bourne shell (ÎÁÐÒÉÍÅÒ, ÉÓÔÏÒÉÑ ËÏÍÁÎÄ), ÎÏ ÏÎ
79 ÔÒÅÂÕÅÔ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÐÁÍÑÔÉ.
82 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
83 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
87 ûÅÌ - ÃÅ ÂÁÚÏ×Á ÓÉÓÔÅÍÎÁ ÐÒÏÇÒÁÍÁ, ËÏÔÒÁ ¦ÎÔÅÒÐÒÅÔÕ¤ ËÏÍÁÎÄÉ
88 ËÏÒÉÓÔÕ×ÁÞÁ, Ñ˦ ××ÏÄÑÔØÓÑ Ú ËÌÁצÁÔÕÒÉ ÁÂÏ ÚÁ ÄÏÐÏÍÏÇÏÀ ÍÉÛ¦. Ash -
89 ÃÅ ËÌÏÎ Bourne shell (sh) Ú âÅÒË̦. Ash ЦÄÔÒÉÍÕ¤ ÕÓ¦ ÓÔÁÎÄÁÒÔΦ
90 ËÏÍÁÎÄÉ ÛÅÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÎÏ ÍÅÎÛÉÍ Î¦Ö sh. ÷ ash צÄÓÕÔΦ ÄÅÑ˦
91 ÍÏÖÌÉ×ÏÓÔ¦ Bourne shell (ÎÁÐÒÉËÌÁÄ, ¦ÓÔÏÒ¦Ñ ËÏÍÁÎÄ), ÚÁÔŠצΠ×ÉÍÁÇÁ¤
95 Summary: Small bourne shell from Berkeley
96 Summary(de): Kleine Bourne-Shell von Berkeley
97 Summary(fr): Shell Bourne réduit de Berkeley
98 Summary(pl): Ma³y shell bourne'a
99 Summary(tr): Ufak bir bourne kabuðu
100 Group: Applications/Shells
103 Conflicts: mkinitrd <= 1.7
106 ash is a bourne shell clone from Berkeley. It supports all of the
107 standard Bourne shell commands and has the advantage of supporting
108 them while remaining considerably smaller than bash.
110 %description static -l de
111 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
112 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
113 weniger Platz beansprucht als bash.
115 %description static -l fr
116 ash est un clone Berkeley du shell Bourne. Il gère toutes les
117 commandes standard du shell Bourne et a l'avantage de les gérer tout
118 en restant considérablement plus petit que bash.
120 %description static -l pl
121 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
122 komendy shella Bourne'a i jest mniejszy ni¿ bash.
124 %description static -l tr
125 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
126 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
148 # this is mainly for information, maybe add changelog to %doc?
153 %{?_with_dietlibc:%patch21 -p1}
157 %{?_with_dietlibc:%define __cc %{_arch}-dietlibc-gcc}
159 %{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"}
160 %{!?_without_static:mv -f sh ash.static}
161 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
164 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
167 install sh $RPM_BUILD_ROOT%{_bindir}/ash
168 %{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
169 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
170 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
171 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
174 if [ ! -f /etc/shells ]; then
175 echo "%{_bindir}/ash" > /etc/shells
176 echo "%{_bindir}/bsh" >> /etc/shells
178 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
179 echo "%{_bindir}/ash" >> /etc/shells
181 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
182 echo "%{_bindir}/bsh" >> /etc/shells
187 if [ ! -f /etc/shells ]; then
188 echo "%{_bindir}/ash.static" >> /etc/shells
190 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
191 echo "%{_bindir}/ash.static" >> /etc/shells
196 if [ "$1" = 0 ]; then
197 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
198 mv -f /etc/shells.new /etc/shells
202 if [ "$1" = 0 ]; then
203 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
204 mv -f /etc/shells.new /etc/shells
208 for n in ash bsh ; do
209 echo -n "Looking for $n in /etc/shells... "
210 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
212 echo "${n} missing from /etc/shells" >&2
219 echo -n "Looking for ash.static in /etc/shells... "
220 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
222 echo "ash.static missing from /etc/shells" >&2
228 rm -rf $RPM_BUILD_ROOT
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_bindir}/ash
233 %attr(755,root,root) %{_bindir}/bsh
236 %{!?_without_static:%files static}
237 %{!?_without_static:%defattr(644,root,root,755)}
238 %{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}