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
52 Patch22: %{name}-extern.patch
54 %{?with_dietlibc:BuildRequires: dietlibc-devel}
57 %{!?with_uClibc:BuildRequires: glibc-static}
58 %{?with_uClibc:BuildRequires: uClibc-static > 2:0.9.27-1}
60 %{?with_uClibc:BuildRequires: uClibc-devel > 2:0.9.27-1}
61 Requires(post,preun,verify): grep
62 Requires(preun): fileutils
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 Conflicts: mkinitrd <= 1.7
69 ash is a bourne shell clone from Berkeley. It supports all of the
70 standard Bourne shell commands and has the advantage of supporting
71 them while remaining considerably smaller than bash.
73 %description -l de.UTF-8
74 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
75 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
76 weniger Platz beansprucht als bash.
78 %description -l es.UTF-8
79 Ash es un clon del shell bourne de Berkeley. Soporta todos los
80 comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
81 con un tamaño considerablemente menor del que bash.
83 %description -l fr.UTF-8
84 ash est un clone Berkeley du shell Bourne. Il gère toutes les
85 commandes standard du shell Bourne et a l'avantage de les gérer tout
86 en restant considérablement plus petit que bash.
88 %description -l pl.UTF-8
89 Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
90 komendy shella Bourne'a i jest mniejszy niż bash.
92 %description -l pt_BR.UTF-8
93 ash é um clone do shell bourne de Berkeley. Ele suporta todos os
94 comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
95 tamanho consideravelmente menor do que bash.
97 %description -l ru.UTF-8
98 Шелл - это базовая системная программа, которая интерпретирует команды
99 пользователя, вводимые с клавиатуры или при помощи мыши. Ash - это
100 клон Bourne shell (sh) из Беркли. Ash поддерживает все стандартные
101 команды шелла sh, будучи значительно меньше чем sh. В ash отсутствуют
102 некоторые возможности Bourne shell (например, история команд), но он
103 требует значительно меньше памяти.
105 %description -l tr.UTF-8
106 ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
107 komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
110 %description -l uk.UTF-8
111 Шел - це базова системна програма, котра інтерпретує команди
112 користувача, які вводяться з клавіатури або за допомогою миші. Ash -
113 це клон Bourne shell (sh) з Берклі. Ash підтримує усі стандартні
114 команди шела sh, будучи значно меншим ніж sh. В ash відсутні деякі
115 можливості Bourne shell (наприклад, історія команд), зате він вимагає
116 значно менше пам'яті.
119 Summary: Small bourne shell from Berkeley
120 Summary(de.UTF-8): Kleine Bourne-Shell von Berkeley
121 Summary(fr.UTF-8): Shell Bourne réduit de Berkeley
122 Summary(pl.UTF-8): Mały shell bourne'a
123 Summary(tr.UTF-8): Ufak bir bourne kabuğu
124 Group: Applications/Shells
125 Requires(post,preun,verify): grep
126 Requires(preun): fileutils
127 Conflicts: mkinitrd <= 1.7
130 ash is a bourne shell clone from Berkeley. It supports all of the
131 standard Bourne shell commands and has the advantage of supporting
132 them while remaining considerably smaller than bash.
134 %description static -l de.UTF-8
135 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
136 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
137 weniger Platz beansprucht als bash.
139 %description static -l fr.UTF-8
140 ash est un clone Berkeley du shell Bourne. Il gère toutes les
141 commandes standard du shell Bourne et a l'avantage de les gérer tout
142 en restant considérablement plus petit que bash.
144 %description static -l pl.UTF-8
145 Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
146 komendy shella Bourne'a i jest mniejszy niż bash.
148 %description static -l tr.UTF-8
149 ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
150 komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
172 # this is mainly for information, maybe add changelog to %doc?
177 %{?_with_dietlibc:%patch21 -p1}
187 CC="%{_target_cpu}-uclibc-gcc"\
192 OPT_FLAGS="%{rpmcflags} -Os" \
193 LDFLAGS="-static %{rpmldflags}"
200 OPT_FLAGS="%{rpmcflags}" \
201 LDFLAGS="%{rpmldflags}"
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
207 install sh $RPM_BUILD_ROOT%{_bindir}/ash
208 %{?with_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
209 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
210 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
211 ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
214 rm -rf $RPM_BUILD_ROOT
218 if [ ! -f /etc/shells ]; then
219 echo "%{_bindir}/ash" > /etc/shells
220 echo "%{_bindir}/bsh" >> /etc/shells
222 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
223 echo "%{_bindir}/ash" >> /etc/shells
225 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
226 echo "%{_bindir}/bsh" >> /etc/shells
231 if [ "$1" = 0 ]; then
233 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
234 mv -f /etc/shells.new /etc/shells
239 if [ ! -f /etc/shells ]; then
240 echo "%{_bindir}/ash.static" >> /etc/shells
242 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
243 echo "%{_bindir}/ash.static" >> /etc/shells
248 if [ "$1" = 0 ]; then
250 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
251 mv -f /etc/shells.new /etc/shells
255 for n in ash bsh ; do
256 echo -n "Looking for $n in /etc/shells... "
257 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
259 echo "${n} missing from /etc/shells" >&2
266 echo -n "Looking for ash.static in /etc/shells... "
267 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
269 echo "ash.static missing from /etc/shells" >&2
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_bindir}/ash
277 %attr(755,root,root) %{_bindir}/bsh
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_bindir}/ash.static