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 %{rpmldflags}" \
155 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
161 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
163 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
166 rm -rf $RPM_BUILD_ROOT
169 %if %{?BOOT:1}%{!?BOOT:0}
170 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
171 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
172 ln -s ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
176 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
177 install sh $RPM_BUILD_ROOT%{_bindir}/ash
178 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
179 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
180 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
181 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
184 if [ ! -f /etc/shells ]; then
185 echo "%{_bindir}/ash" > /etc/shells
186 echo "%{_bindir}/bsh" >> /etc/shells
188 if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
189 echo "%{_bindir}/ash" >> /etc/shells
191 if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
192 echo "%{_bindir}/bsh" >> /etc/shells
197 if [ ! -f /etc/shells ]; then
198 echo "%{_bindir}/ash.static" >> /etc/shells
200 if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
201 echo "%{_bindir}/ash.static" >> /etc/shells
206 if [ "$0" = 0 ]; then
207 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
208 mv -f /etc/shells.new /etc/shells
212 if [ "$0" = 0 ]; then
213 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
214 mv -f /etc/shells.new /etc/shells
218 for n in ash bsh ash.static; do
219 echo -n "Looking for $n in /etc/shells... "
220 if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
222 echo "${n} missing from /etc/shells" >&2
229 rm -rf $RPM_BUILD_ROOT
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_bindir}/ash
234 %attr(755,root,root) %{_bindir}/bsh
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/ash.static
241 %if %{?BOOT:1}%{!?BOOT:0}
243 %defattr(644,root,root,755)
244 %attr(755,root,root) /usr/lib/bootdisk/bin/*