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 Source0: ftp://ftp.pld.org.pl/people/malekith/%{name}-linux-%{version}.tar.gz
16 Patch0: %{name}-Makefile.patch
19 BuildRequires: glibc-static
20 %{?BOOT:BuildRequires: uClibc-devel-BOOT}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 Conflicts: mkinitrd <= 1.7
27 ash is a bourne shell clone from Berkeley. It supports all of the
28 standard Bourne shell commands and has the advantage of supporting
29 them while remaining considerably smaller than bash.
32 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
33 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
34 weniger Platz beansprucht als bash.
37 ash est un clone Berkeley du shell Bourne. Il gère toutes les
38 commandes standard du shell Bourne et a l'avantage de les gérer tout
39 en restant considérablement plus petit que bash.
42 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
43 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
46 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
47 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
51 Summary: Small bourne shell from Berkeley
52 Summary(de): Kleine Bourne-Shell von Berkeley
53 Summary(fr): Shell Bourne réduit de Berkeley
54 Summary(pl): Ma³y shell bourne'a
55 Summary(tr): Ufak bir bourne kabuðu
56 Group: Applications/Shells
57 Group(de): Applikationen/Shells
58 Group(pl): Aplikacje/Pow³oki
61 Conflicts: mkinitrd <= 1.7
64 ash is a bourne shell clone from Berkeley. It supports all of the
65 standard Bourne shell commands and has the advantage of supporting
66 them while remaining considerably smaller than bash.
68 %description static -l de
69 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
70 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
71 weniger Platz beansprucht als bash.
73 %description static -l fr
74 ash est un clone Berkeley du shell Bourne. Il gère toutes les
75 commandes standard du shell Bourne et a l'avantage de les gérer tout
76 en restant considérablement plus petit que bash.
78 %description static -l pl
79 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
80 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
82 %description static -l tr
83 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
84 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
87 %if %{?BOOT:1}%{!?BOOT:0}
89 Summary: Small bourne shell from Berkeley
90 Summary(de): Kleine Bourne-Shell von Berkeley
91 Summary(fr): Shell Bourne réduit de Berkeley
92 Summary(pl): Ma³y shell bourne'a
93 Summary(tr): Ufak bir bourne kabuðu
94 Group: Applications/Shells
95 Group(de): Applikationen/Shells
96 Group(pl): Aplikacje/Pow³oki
99 ash is a bourne shell clone from Berkeley. It supports all of the
100 standard Bourne shell commands and has the advantage of supporting
101 them while remaining considerably smaller than bash.
107 %setup -q -n ash-linux-%{version}
112 %if %{?BOOT:1}%{!?BOOT:0}
114 OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
115 LDFLAGS="-nostdlib -s" \
116 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
122 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
123 LDFLAGS="-static %{!?debug:-s}"
125 %{__make} OPT_FLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
126 LDFLAGS="%{!?debug:-s}"
131 rm -rf $RPM_BUILD_ROOT
134 %if %{?BOOT:1}%{!?BOOT:0}
135 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
136 install -s ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
137 ln -s ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
141 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
142 install sh $RPM_BUILD_ROOT%{_bindir}/ash
143 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
144 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
145 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
146 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
149 if [ ! -f /etc/shells ]; then
150 echo "%{_bindir}/ash" > /etc/shells
151 echo "%{_bindir}/bsh" >> /etc/shells
153 if ! grep '^%{_bindir}/ash$' /etc/shells > /dev/null; then
154 echo "%{_bindir}/ash" >> /etc/shells
156 if ! grep '^%{_bindir}/bsh$' /etc/shells > /dev/null; then
157 echo "%{_bindir}/bsh" >> /etc/shells
162 if [ ! -f /etc/shells ]; then
163 echo "%{_bindir}/ash.static" >> /etc/shells
165 if ! grep '^%{_bindir}/ash.static$' /etc/shells > /dev/null; then
166 echo "%{_bindir}/ash.static" >> /etc/shells
171 if [ "$0" = 0 ]; then
172 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh | grep -v %{_bindir}/ash.static > /etc/shells.new
173 mv -f /etc/shells.new /etc/shells
177 if [ "$0" = 0 ]; then
178 grep -v %{_bindir}/ash /etc/shells | grep -v %{_bindir}/bsh > /etc/shells.new
179 mv -f /etc/shells.new /etc/shells
183 for n in ash bsh ash.static; do
184 echo -n "Looking for $n in /etc/shells... "
185 if ! grep "^%{_bindir}/${n}\$" /etc/shells > /dev/null; then
187 echo "${n} missing from /etc/shells" >&2
194 rm -rf $RPM_BUILD_ROOT
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_bindir}/ash
199 %attr(755,root,root) %{_bindir}/bsh
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_bindir}/ash.static
206 %if %{?BOOT:1}%{!?BOOT:0}
208 %defattr(644,root,root,755)
209 %attr(755,root,root) /usr/lib/bootdisk/bin/*