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
36 Patch20: %{name}-sighup.patch
39 BuildRequires: glibc-static
42 %if %{?BOOT:1}%{!?BOOT:0}
43 BuildRequires: uClibc-devel-BOOT >= 20000521
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Conflicts: mkinitrd <= 1.7
51 ash is a bourne shell clone from Berkeley. It supports all of the
52 standard Bourne shell commands and has the advantage of supporting
53 them while remaining considerably smaller than bash.
56 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
57 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
58 weniger Platz beansprucht als bash.
61 ash est un clone Berkeley du shell Bourne. Il gère toutes les
62 commandes standard du shell Bourne et a l'avantage de les gérer tout
63 en restant considérablement plus petit que bash.
66 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
67 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
70 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
71 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
75 Summary: Small bourne shell from Berkeley
76 Summary(de): Kleine Bourne-Shell von Berkeley
77 Summary(fr): Shell Bourne réduit de Berkeley
78 Summary(pl): Ma³y shell bourne'a
79 Summary(tr): Ufak bir bourne kabuðu
80 Group: Applications/Shells
81 Group(de): Applikationen/Shells
82 Group(pl): Aplikacje/Pow³oki
85 Conflicts: mkinitrd <= 1.7
88 ash is a bourne shell clone from Berkeley. It supports all of the
89 standard Bourne shell commands and has the advantage of supporting
90 them while remaining considerably smaller than bash.
92 %description static -l de
93 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
94 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
95 weniger Platz beansprucht als bash.
97 %description static -l fr
98 ash est un clone Berkeley du shell Bourne. Il gère toutes les
99 commandes standard du shell Bourne et a l'avantage de les gérer tout
100 en restant considérablement plus petit que bash.
102 %description static -l pl
103 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
104 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
106 %description static -l tr
107 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
108 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
111 %if %{?BOOT:1}%{!?BOOT:0}
113 Summary: Small bourne shell from Berkeley
114 Summary(de): Kleine Bourne-Shell von Berkeley
115 Summary(fr): Shell Bourne réduit de Berkeley
116 Summary(pl): Ma³y shell bourne'a
117 Summary(tr): Ufak bir bourne kabuðu
118 Group: Applications/Shells
119 Group(de): Applikationen/Shells
120 Group(pl): Aplikacje/Pow³oki
123 ash is a bourne shell clone from Berkeley. It supports all of the
124 standard Bourne shell commands and has the advantage of supporting
125 them while remaining considerably smaller than bash.
149 # this is mainly for information, maybe add changelog to %doc?
157 %if %{?BOOT:1}%{!?BOOT:0}
158 # some of this utilities does not compile with uClibc
159 # and it is not necessary
160 %{__make} mksignames mkbuiltins mknodes mksignames mksyntax mktokens
162 OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
163 LDFLAGS="-nostdlib %{rpmldflags}" \
164 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
169 # this patch imposes memory buffers - uClibc lacks them
170 patch -p1 <%{PATCH10}
173 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
175 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
178 rm -rf $RPM_BUILD_ROOT
181 %if %{?BOOT:1}%{!?BOOT:0}
182 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
183 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
184 ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
188 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
189 install sh $RPM_BUILD_ROOT%{_bindir}/ash
190 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
191 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
192 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
193 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
196 if [ ! -f /etc/shells ]; then
197 echo "%{_bindir}/ash" > /etc/shells
198 echo "%{_bindir}/bsh" >> /etc/shells
200 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
201 echo "%{_bindir}/ash" >> /etc/shells
203 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
204 echo "%{_bindir}/bsh" >> /etc/shells
209 if [ ! -f /etc/shells ]; then
210 echo "%{_bindir}/ash.static" >> /etc/shells
212 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
213 echo "%{_bindir}/ash.static" >> /etc/shells
218 if [ "$1" = 0 ]; then
219 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
220 mv -f /etc/shells.new /etc/shells
224 if [ "$1" = 0 ]; then
225 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
226 mv -f /etc/shells.new /etc/shells
230 for n in ash bsh ; do
231 echo -n "Looking for $n in /etc/shells... "
232 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
234 echo "${n} missing from /etc/shells" >&2
241 echo -n "Looking for ash.static in /etc/shells... "
242 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
244 echo "ash.static missing from /etc/shells" >&2
250 rm -rf $RPM_BUILD_ROOT
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_bindir}/ash
255 %attr(755,root,root) %{_bindir}/bsh
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/ash.static
262 %if %{?BOOT:1}%{!?BOOT:0}
264 %defattr(644,root,root,755)
265 %attr(755,root,root) /usr/lib/bootdisk/bin/*