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 %if %{?BOOT:1}%{!?BOOT:0}
42 BuildRequires: uClibc-devel-BOOT >= 20000521
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Conflicts: mkinitrd <= 1.7
50 ash is a bourne shell clone from Berkeley. It supports all of the
51 standard Bourne shell commands and has the advantage of supporting
52 them while remaining considerably smaller than bash.
55 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
56 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
57 weniger Platz beansprucht als bash.
60 ash est un clone Berkeley du shell Bourne. Il gère toutes les
61 commandes standard du shell Bourne et a l'avantage de les gérer tout
62 en restant considérablement plus petit que bash.
65 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
66 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
69 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
70 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
74 Summary: Small bourne shell from Berkeley
75 Summary(de): Kleine Bourne-Shell von Berkeley
76 Summary(fr): Shell Bourne réduit de Berkeley
77 Summary(pl): Ma³y shell bourne'a
78 Summary(tr): Ufak bir bourne kabuðu
79 Group: Applications/Shells
80 Group(de): Applikationen/Shells
81 Group(pl): Aplikacje/Pow³oki
84 Conflicts: mkinitrd <= 1.7
87 ash is a bourne shell clone from Berkeley. It supports all of the
88 standard Bourne shell commands and has the advantage of supporting
89 them while remaining considerably smaller than bash.
91 %description static -l de
92 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
93 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
94 weniger Platz beansprucht als bash.
96 %description static -l fr
97 ash est un clone Berkeley du shell Bourne. Il gère toutes les
98 commandes standard du shell Bourne et a l'avantage de les gérer tout
99 en restant considérablement plus petit que bash.
101 %description static -l pl
102 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
103 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
105 %description static -l tr
106 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
107 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
110 %if %{?BOOT:1}%{!?BOOT:0}
112 Summary: Small bourne shell from Berkeley
113 Summary(de): Kleine Bourne-Shell von Berkeley
114 Summary(fr): Shell Bourne réduit de Berkeley
115 Summary(pl): Ma³y shell bourne'a
116 Summary(tr): Ufak bir bourne kabuðu
117 Group: Applications/Shells
118 Group(de): Applikationen/Shells
119 Group(pl): Aplikacje/Pow³oki
122 ash is a bourne shell clone from Berkeley. It supports all of the
123 standard Bourne shell commands and has the advantage of supporting
124 them while remaining considerably smaller than bash.
148 # this is mainly for information, maybe add changelog to %doc?
155 %if %{?BOOT:1}%{!?BOOT:0}
156 # some of this utilities does not compile with uClibc
157 # and it is not necessary
158 %{__make} mksignames mkbuiltins mknodes mksignames mksyntax mktokens
160 OPT_FLAGS="-m386 -I/usr/lib/bootdisk%{_includedir} -Os" \
161 LDFLAGS="-nostdlib %{rpmldflags}" \
162 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
167 # this patch imposes memory buffers - uClibc lacks them
168 patch -p1 <%{PATCH10}
171 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
173 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
176 rm -rf $RPM_BUILD_ROOT
179 %if %{?BOOT:1}%{!?BOOT:0}
180 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
181 install -s ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
182 ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
186 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
187 install sh $RPM_BUILD_ROOT%{_bindir}/ash
188 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
189 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
190 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
191 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
194 if [ ! -f /etc/shells ]; then
195 echo "%{_bindir}/ash" > /etc/shells
196 echo "%{_bindir}/bsh" >> /etc/shells
198 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
199 echo "%{_bindir}/ash" >> /etc/shells
201 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
202 echo "%{_bindir}/bsh" >> /etc/shells
207 if [ ! -f /etc/shells ]; then
208 echo "%{_bindir}/ash.static" >> /etc/shells
210 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
211 echo "%{_bindir}/ash.static" >> /etc/shells
216 if [ "$1" = 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 if [ "$1" = 0 ]; then
223 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
224 mv -f /etc/shells.new /etc/shells
228 for n in ash bsh ; do
229 echo -n "Looking for $n in /etc/shells... "
230 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
232 echo "${n} missing from /etc/shells" >&2
239 echo -n "Looking for ash.static in /etc/shells... "
240 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
242 echo "ash.static missing from /etc/shells" >&2
248 rm -rf $RPM_BUILD_ROOT
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/ash
253 %attr(755,root,root) %{_bindir}/bsh
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_bindir}/ash.static
260 %if %{?BOOT:1}%{!?BOOT:0}
262 %defattr(644,root,root,755)
263 %attr(755,root,root) /usr/lib/bootdisk/bin/*