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: ash-%{version}.tar.gz
16 Patch0: ash-builtin.patch
17 Patch1: ash-echo.patch
18 Patch2: ash-getcwd.patch
19 Patch3: ash-getopt.patch
20 Patch4: ash-glob.patch
21 Patch5: ash-jobs.patch
22 Patch6: ash-kill.patch
23 Patch7: ash-makefile.patch
24 Patch8: ash-manpage.patch
25 Patch9: ash-hetio.patch
26 Patch10: ash-memout.patch
27 Patch11: ash-misc.patch
28 Patch12: ash-redir.patch
29 Patch13: ash-setmode.patch
30 Patch14: ash-syntax.patch
31 Patch15: ash-test.patch
32 Patch16: ash-times.patch
33 Patch17: ash-debian.patch
34 Patch18: ash-ppid.patch
35 Patch19: ash-freebsd.patch
38 BuildRequires: glibc-static
39 %{?BOOT:BuildRequires: uClibc-devel-BOOT}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Conflicts: mkinitrd <= 1.7
46 ash is a bourne shell clone from Berkeley. It supports all of the
47 standard Bourne shell commands and has the advantage of supporting
48 them while remaining considerably smaller than bash.
51 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
52 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
53 weniger Platz beansprucht als bash.
56 ash est un clone Berkeley du shell Bourne. Il gère toutes les
57 commandes standard du shell Bourne et a l'avantage de les gérer tout
58 en restant considérablement plus petit que bash.
61 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
62 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
65 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
66 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
70 Summary: Small bourne shell from Berkeley
71 Summary(de): Kleine Bourne-Shell von Berkeley
72 Summary(fr): Shell Bourne réduit de Berkeley
73 Summary(pl): Ma³y shell bourne'a
74 Summary(tr): Ufak bir bourne kabuðu
75 Group: Applications/Shells
76 Group(de): Applikationen/Shells
77 Group(pl): Aplikacje/Pow³oki
80 Conflicts: mkinitrd <= 1.7
83 ash is a bourne shell clone from Berkeley. It supports all of the
84 standard Bourne shell commands and has the advantage of supporting
85 them while remaining considerably smaller than bash.
87 %description static -l de
88 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
89 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
90 weniger Platz beansprucht als bash.
92 %description static -l fr
93 ash est un clone Berkeley du shell Bourne. Il gère toutes les
94 commandes standard du shell Bourne et a l'avantage de les gérer tout
95 en restant considérablement plus petit que bash.
97 %description static -l pl
98 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
99 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
101 %description static -l tr
102 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
103 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
106 %if %{?BOOT:1}%{!?BOOT:0}
108 Summary: Small bourne shell from Berkeley
109 Summary(de): Kleine Bourne-Shell von Berkeley
110 Summary(fr): Shell Bourne réduit de Berkeley
111 Summary(pl): Ma³y shell bourne'a
112 Summary(tr): Ufak bir bourne kabuðu
113 Group: Applications/Shells
114 Group(de): Applikationen/Shells
115 Group(pl): Aplikacje/Pow³oki
118 ash is a bourne shell clone from Berkeley. It supports all of the
119 standard Bourne shell commands and has the advantage of supporting
120 them while remaining considerably smaller than bash.
126 %setup -q -n ash-%{version}
144 # this is mainly for information, maybe add changelog to %doc?
151 %if %{?BOOT:1}%{!?BOOT:0}
153 OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
154 LDFLAGS="-nostdlib -s" \
155 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
161 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
162 LDFLAGS="-static %{!?debug:-s}"
164 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
165 LDFLAGS="%{!?debug:-s}"
170 rm -rf $RPM_BUILD_ROOT
173 %if %{?BOOT:1}%{!?BOOT:0}
174 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
175 install -s ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
176 ln -s ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
180 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
181 install sh $RPM_BUILD_ROOT%{_bindir}/ash
182 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
183 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
184 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
185 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
188 if [ ! -f /etc/shells ]; then
189 echo "%{_bindir}/ash" > /etc/shells
190 echo "%{_bindir}/bsh" >> /etc/shells
192 if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
193 echo "%{_bindir}/ash" >> /etc/shells
195 if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
196 echo "%{_bindir}/bsh" >> /etc/shells
201 if [ ! -f /etc/shells ]; then
202 echo "%{_bindir}/ash.static" >> /etc/shells
204 if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
205 echo "%{_bindir}/ash.static" >> /etc/shells
210 if [ "$0" = 0 ]; then
211 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
212 mv -f /etc/shells.new /etc/shells
216 if [ "$0" = 0 ]; then
217 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
218 mv -f /etc/shells.new /etc/shells
222 for n in ash bsh ash.static; do
223 echo -n "Looking for $n in /etc/shells... "
224 if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
226 echo "${n} missing from /etc/shells" >&2
233 rm -rf $RPM_BUILD_ROOT
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_bindir}/ash
238 %attr(755,root,root) %{_bindir}/bsh
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/ash.static
245 %if %{?BOOT:1}%{!?BOOT:0}
247 %defattr(644,root,root,755)
248 %attr(755,root,root) /usr/lib/bootdisk/bin/*