3 %bcond_without static # don't build static
4 %bcond_with dietlibc # link with dietlibc, implies without static
5 %bcond_with uClibc # link with uclibc
12 Summary: Small bourne shell from Berkeley
13 Summary(de.UTF-8): Kleine Bourne-Shell von Berkeley
14 Summary(es.UTF-8): Pequeña shell bourne de Berkeley
15 Summary(fr.UTF-8): Shell Bourne réduit de Berkeley
16 Summary(pl.UTF-8): Mały shell bourne'a
17 Summary(pt_BR.UTF-8): Pequena shell bourne de Berkeley
18 Summary(ru.UTF-8): Облегченная версия Bourne shell (sh)
19 Summary(tr.UTF-8): Ufak bir bourne kabuğu
20 Summary(uk.UTF-8): Полегшена версія Bourne shell (sh)
21 Summary(zh_CN.UTF-8): [系统]Berkeley的微型Bourne Shell
22 Summary(zh_TW.UTF-8): [
\e-A系
\e$)B統]Berkeley的
\e-A微
\e$)B型Bourne Shell
27 Group: Applications/Shells
28 Source0: %{name}-%{version}.tar.gz
29 # Source0-md5: 1c59f5b62a081cb0cb3b053c01d79529
30 Patch0: %{name}-builtin.patch
31 Patch1: %{name}-echo.patch
32 Patch2: %{name}-getcwd.patch
33 Patch3: %{name}-getopt.patch
34 Patch4: %{name}-glob.patch
35 Patch5: %{name}-jobs.patch
36 Patch6: %{name}-kill.patch
37 Patch7: %{name}-makefile.patch
38 Patch8: %{name}-manpage.patch
39 Patch9: %{name}-hetio.patch
40 Patch10: %{name}-memout.patch
41 Patch11: %{name}-misc.patch
42 Patch12: %{name}-redir.patch
43 Patch13: %{name}-setmode.patch
44 Patch14: %{name}-syntax.patch
45 Patch15: %{name}-test.patch
46 Patch16: %{name}-times.patch
47 Patch17: %{name}-debian.patch
48 Patch18: %{name}-ppid.patch
49 Patch19: %{name}-freebsd.patch
50 Patch20: %{name}-sighup.patch
51 Patch21: %{name}-dietlibc.patch
53 %{?with_dietlibc:BuildRequires: dietlibc-devel}
56 %{!?with_uClibc:BuildRequires: glibc-static}
57 %{?with_uClibc:BuildRequires: uClibc-static > 2:0.9.27-1}
59 %{?with_uClibc:BuildRequires: uClibc-devel > 2:0.9.27-1}
60 Requires(post,preun,verify): grep
61 Requires(preun): fileutils
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Conflicts: mkinitrd <= 1.7
68 ash is a bourne shell clone from Berkeley. It supports all of the
69 standard Bourne shell commands and has the advantage of supporting
70 them while remaining considerably smaller than bash.
72 %description -l de.UTF-8
73 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
74 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
75 weniger Platz beansprucht als bash.
77 %description -l es.UTF-8
78 Ash es un clon del shell bourne de Berkeley. Soporta todos los
79 comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
80 con un tamaño considerablemente menor del que bash.
82 %description -l fr.UTF-8
83 ash est un clone Berkeley du shell Bourne. Il gère toutes les
84 commandes standard du shell Bourne et a l'avantage de les gérer tout
85 en restant considérablement plus petit que bash.
87 %description -l pl.UTF-8
88 Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
89 komendy shella Bourne'a i jest mniejszy niż bash.
91 %description -l pt_BR.UTF-8
92 ash é um clone do shell bourne de Berkeley. Ele suporta todos os
93 comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
94 tamanho consideravelmente menor do que bash.
96 %description -l ru.UTF-8
97 Шелл - это базовая системная программа, которая интерпретирует команды
98 пользователя, вводимые с клавиатуры или при помощи мыши. Ash - это
99 клон Bourne shell (sh) из Беркли. Ash поддерживает все стандартные
100 команды шелла sh, будучи значительно меньше чем sh. В ash отсутствуют
101 некоторые возможности Bourne shell (например, история команд), но он
102 требует значительно меньше памяти.
104 %description -l tr.UTF-8
105 ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
106 komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
109 %description -l uk.UTF-8
110 Шел - це базова системна програма, котра інтерпретує команди
111 користувача, які вводяться з клавіатури або за допомогою миші. Ash -
112 це клон Bourne shell (sh) з Берклі. Ash підтримує усі стандартні
113 команди шела sh, будучи значно меншим ніж sh. В ash відсутні деякі
114 можливості Bourne shell (наприклад, історія команд), зате він вимагає
115 значно менше пам'яті.
118 Summary: Small bourne shell from Berkeley
119 Summary(de.UTF-8): Kleine Bourne-Shell von Berkeley
120 Summary(fr.UTF-8): Shell Bourne réduit de Berkeley
121 Summary(pl.UTF-8): Mały shell bourne'a
122 Summary(tr.UTF-8): Ufak bir bourne kabuğu
123 Group: Applications/Shells
124 Requires(post,preun,verify): grep
125 Requires(preun): fileutils
126 Conflicts: mkinitrd <= 1.7
129 ash is a bourne shell clone from Berkeley. It supports all of the
130 standard Bourne shell commands and has the advantage of supporting
131 them while remaining considerably smaller than bash.
133 %description static -l de.UTF-8
134 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
135 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
136 weniger Platz beansprucht als bash.
138 %description static -l fr.UTF-8
139 ash est un clone Berkeley du shell Bourne. Il gère toutes les
140 commandes standard du shell Bourne et a l'avantage de les gérer tout
141 en restant considérablement plus petit que bash.
143 %description static -l pl.UTF-8
144 Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
145 komendy shella Bourne'a i jest mniejszy niż bash.
147 %description static -l tr.UTF-8
148 ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
149 komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
171 # this is mainly for information, maybe add changelog to %doc?
176 %{?_with_dietlibc:%patch21 -p1}
180 %define __cc %{_target_cpu}-pld-linux-gcc
181 %{?with_dietlibc:%define __cc %{_target_cpu}-dietlibc-gcc}
182 %{?with_uClibc:%define __cc %{_target_cpu}-uclibc-gcc}
184 %{?with_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}" CC="%{__cc}"}
185 %{?with_static:mv -f sh ash.static}
186 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
192 install sh $RPM_BUILD_ROOT%{_bindir}/ash
193 %{?with_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
194 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
195 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
196 ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
199 rm -rf $RPM_BUILD_ROOT
203 if [ ! -f /etc/shells ]; then
204 echo "%{_bindir}/ash" > /etc/shells
205 echo "%{_bindir}/bsh" >> /etc/shells
207 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
208 echo "%{_bindir}/ash" >> /etc/shells
210 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
211 echo "%{_bindir}/bsh" >> /etc/shells
216 if [ "$1" = 0 ]; then
218 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
219 mv -f /etc/shells.new /etc/shells
224 if [ ! -f /etc/shells ]; then
225 echo "%{_bindir}/ash.static" >> /etc/shells
227 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
228 echo "%{_bindir}/ash.static" >> /etc/shells
233 if [ "$1" = 0 ]; then
235 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
236 mv -f /etc/shells.new /etc/shells
240 for n in ash bsh ; do
241 echo -n "Looking for $n in /etc/shells... "
242 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
244 echo "${n} missing from /etc/shells" >&2
251 echo -n "Looking for ash.static in /etc/shells... "
252 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
254 echo "ash.static missing from /etc/shells" >&2
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_bindir}/ash
262 %attr(755,root,root) %{_bindir}/bsh
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/ash.static