2 # if BOOT is defined, build BOOT package too
3 Summary: Small bourne shell from Berkeley
4 Summary(de): Kleine Bourne-Shell von Berkeley
5 Summary(fr): Shell Bourne réduit de Berkeley
6 Summary(pl): Ma³y shell bourne'a
7 Summary(tr): Ufak bir bourne kabuðu
12 Group: Applications/Shells
13 Group(de): Applikationen/Shells
14 Group(pl): Aplikacje/Pow³oki
15 Source: %{name}-%{version}.tar.gz
16 Patch0: %{name}-builtin.patch
17 Patch1: %{name}-echo.patch
18 Patch2: %{name}-getcwd.patch
19 Patch3: %{name}-getopt.patch
20 Patch4: %{name}-glob.patch
21 Patch5: %{name}-jobs.patch
22 Patch6: %{name}-kill.patch
23 Patch7: %{name}-makefile.patch
24 Patch8: %{name}-manpage.patch
25 Patch9: %{name}-hetio.patch
26 Patch10: %{name}-memout.patch
27 Patch11: %{name}-misc.patch
28 Patch12: %{name}-redir.patch
29 Patch13: %{name}-setmode.patch
30 Patch14: %{name}-syntax.patch
31 Patch15: %{name}-test.patch
32 Patch16: %{name}-times.patch
33 Patch17: %{name}-debian.patch
34 Patch18: %{name}-ppid.patch
35 Patch19: %{name}-freebsd.patch
38 BuildRequires: glibc-static
41 %{?BOOT:BuildRequires: uClibc-devel-BOOT}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Conflicts: mkinitrd <= 1.7
48 ash is a bourne shell clone from Berkeley. It supports all of the
49 standard Bourne shell commands and has the advantage of supporting
50 them while remaining considerably smaller than bash.
53 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
54 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
55 weniger Platz beansprucht als bash.
58 ash est un clone Berkeley du shell Bourne. Il gère toutes les
59 commandes standard du shell Bourne et a l'avantage de les gérer tout
60 en restant considérablement plus petit que bash.
63 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
64 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
67 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
68 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
72 Summary: Small bourne shell from Berkeley
73 Summary(de): Kleine Bourne-Shell von Berkeley
74 Summary(fr): Shell Bourne réduit de Berkeley
75 Summary(pl): Ma³y shell bourne'a
76 Summary(tr): Ufak bir bourne kabuðu
77 Group: Applications/Shells
78 Group(de): Applikationen/Shells
79 Group(pl): Aplikacje/Pow³oki
82 Conflicts: mkinitrd <= 1.7
85 ash is a bourne shell clone from Berkeley. It supports all of the
86 standard Bourne shell commands and has the advantage of supporting
87 them while remaining considerably smaller than bash.
89 %description static -l de
90 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
91 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
92 weniger Platz beansprucht als bash.
94 %description static -l fr
95 ash est un clone Berkeley du shell Bourne. Il gère toutes les
96 commandes standard du shell Bourne et a l'avantage de les gérer tout
97 en restant considérablement plus petit que bash.
99 %description static -l pl
100 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
101 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
103 %description static -l tr
104 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
105 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
108 %if %{?BOOT:1}%{!?BOOT:0}
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 Group(de): Applikationen/Shells
117 Group(pl): Aplikacje/Pow³oki
120 ash is a bourne shell clone from Berkeley. It supports all of the
121 standard Bourne shell commands and has the advantage of supporting
122 them while remaining considerably smaller than bash.
146 # this is mainly for information, maybe add changelog to %doc?
153 %if %{?BOOT:1}%{!?BOOT:0}
155 OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
156 LDFLAGS="-nostdlib %{rpmldflags}" \
157 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
163 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
165 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
168 rm -rf $RPM_BUILD_ROOT
171 %if %{?BOOT:1}%{!?BOOT:0}
172 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
173 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
174 ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
178 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
179 install sh $RPM_BUILD_ROOT%{_bindir}/ash
180 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
181 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
182 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
183 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
186 if [ ! -f /etc/shells ]; then
187 echo "%{_bindir}/ash" > /etc/shells
188 echo "%{_bindir}/bsh" >> /etc/shells
190 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
191 echo "%{_bindir}/ash" >> /etc/shells
193 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
194 echo "%{_bindir}/bsh" >> /etc/shells
199 if [ ! -f /etc/shells ]; then
200 echo "%{_bindir}/ash.static" >> /etc/shells
202 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
203 echo "%{_bindir}/ash.static" >> /etc/shells
208 if [ "$0" = 0 ]; then
209 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
210 mv -f /etc/shells.new /etc/shells
214 if [ "$0" = 0 ]; then
215 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
216 mv -f /etc/shells.new /etc/shells
220 for n in ash bsh ; do
221 echo -n "Looking for $n in /etc/shells... "
222 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
224 echo "${n} missing from /etc/shells" >&2
231 echo -n "Looking for ash.static in /etc/shells... "
232 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
234 echo "ash.static missing from /etc/shells" >&2
240 rm -rf $RPM_BUILD_ROOT
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/ash
245 %attr(755,root,root) %{_bindir}/bsh
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/ash.static
252 %if %{?BOOT:1}%{!?BOOT:0}
254 %defattr(644,root,root,755)
255 %attr(755,root,root) /usr/lib/bootdisk/bin/*