4 # if BOOT is defined, build BOOT package too
5 Summary: Small bourne shell from Berkeley
6 Summary(de): Kleine Bourne-Shell von Berkeley
7 Summary(fr): Shell Bourne réduit de Berkeley
8 Summary(pl): Ma³y shell bourne'a
9 Summary(tr): Ufak bir bourne kabuðu
14 Group: Applications/Shells
15 Group(de): Applikationen/Shells
16 Group(pl): Aplikacje/Pow³oki
17 Source: %{name}-%{version}.tar.gz
18 Patch0: %{name}-builtin.patch
19 Patch1: %{name}-echo.patch
20 Patch2: %{name}-getcwd.patch
21 Patch3: %{name}-getopt.patch
22 Patch4: %{name}-glob.patch
23 Patch5: %{name}-jobs.patch
24 Patch6: %{name}-kill.patch
25 Patch7: %{name}-makefile.patch
26 Patch8: %{name}-manpage.patch
27 Patch9: %{name}-hetio.patch
28 Patch10: %{name}-memout.patch
29 Patch11: %{name}-misc.patch
30 Patch12: %{name}-redir.patch
31 Patch13: %{name}-setmode.patch
32 Patch14: %{name}-syntax.patch
33 Patch15: %{name}-test.patch
34 Patch16: %{name}-times.patch
35 Patch17: %{name}-debian.patch
36 Patch18: %{name}-ppid.patch
37 Patch19: %{name}-freebsd.patch
38 Patch20: %{name}-sighup.patch
41 BuildRequires: glibc-static
44 %if %{?BOOT:1}%{!?BOOT:0}
45 BuildRequires: uClibc-devel-BOOT >= 20000521
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Conflicts: mkinitrd <= 1.7
53 ash is a bourne shell clone from Berkeley. It supports all of the
54 standard Bourne shell commands and has the advantage of supporting
55 them while remaining considerably smaller than bash.
58 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
59 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
60 weniger Platz beansprucht als bash.
63 ash est un clone Berkeley du shell Bourne. Il gère toutes les
64 commandes standard du shell Bourne et a l'avantage de les gérer tout
65 en restant considérablement plus petit que bash.
68 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
69 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
72 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
73 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
77 Summary: Small bourne shell from Berkeley
78 Summary(de): Kleine Bourne-Shell von Berkeley
79 Summary(fr): Shell Bourne réduit de Berkeley
80 Summary(pl): Ma³y shell bourne'a
81 Summary(tr): Ufak bir bourne kabuðu
82 Group: Applications/Shells
83 Group(de): Applikationen/Shells
84 Group(pl): Aplikacje/Pow³oki
87 Conflicts: mkinitrd <= 1.7
90 ash is a bourne shell clone from Berkeley. It supports all of the
91 standard Bourne shell commands and has the advantage of supporting
92 them while remaining considerably smaller than bash.
94 %description static -l de
95 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
96 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
97 weniger Platz beansprucht als bash.
99 %description static -l fr
100 ash est un clone Berkeley du shell Bourne. Il gère toutes les
101 commandes standard du shell Bourne et a l'avantage de les gérer tout
102 en restant considérablement plus petit que bash.
104 %description static -l pl
105 Ash jest klonem shell'a Bourne'a z Berkeley. Obs³uguje standardowe
106 komendy shell'a Bourne'a i jest mniejszy ni¿ bash.
108 %description static -l tr
109 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
110 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
113 %if %{?BOOT:1}%{!?BOOT:0}
115 Summary: Small bourne shell from Berkeley
116 Summary(de): Kleine Bourne-Shell von Berkeley
117 Summary(fr): Shell Bourne réduit de Berkeley
118 Summary(pl): Ma³y shell bourne'a
119 Summary(tr): Ufak bir bourne kabuðu
120 Group: Applications/Shells
121 Group(de): Applikationen/Shells
122 Group(pl): Aplikacje/Pow³oki
125 ash is a bourne shell clone from Berkeley. It supports all of the
126 standard Bourne shell commands and has the advantage of supporting
127 them while remaining considerably smaller than bash.
151 # this is mainly for information, maybe add changelog to %doc?
159 %if %{?BOOT:1}%{!?BOOT:0}
160 # some of this utilities does not compile with uClibc
161 # and it is not necessary
162 %{__make} mksignames mkbuiltins mknodes mksignames mksyntax mktokens
164 OPT_FLAGS="-I/usr/lib/bootdisk%{_includedir} -Os" \
165 LDFLAGS="-nostdlib %{rpmldflags}" \
166 LDLIBS="%{_libdir}/bootdisk%{_libdir}/crt0.o %{_libdir}/bootdisk%{_libdir}/libc.a -lgcc"
171 # this patch imposes memory buffers - uClibc lacks them
172 patch -p1 <%{PATCH10}
175 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
177 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
180 rm -rf $RPM_BUILD_ROOT
183 %if %{?BOOT:1}%{!?BOOT:0}
184 install -d $RPM_BUILD_ROOT/usr/lib/bootdisk/bin
185 install ash.BOOT $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/ash
186 ln -sf ash $RPM_BUILD_ROOT/usr/lib/bootdisk/bin/sh
190 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
191 install sh $RPM_BUILD_ROOT%{_bindir}/ash
192 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
193 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
194 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
195 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
198 if [ ! -f /etc/shells ]; then
199 echo "%{_bindir}/ash" > /etc/shells
200 echo "%{_bindir}/bsh" >> /etc/shells
202 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
203 echo "%{_bindir}/ash" >> /etc/shells
205 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
206 echo "%{_bindir}/bsh" >> /etc/shells
211 if [ ! -f /etc/shells ]; then
212 echo "%{_bindir}/ash.static" >> /etc/shells
214 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
215 echo "%{_bindir}/ash.static" >> /etc/shells
220 if [ "$1" = 0 ]; then
221 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
222 mv -f /etc/shells.new /etc/shells
226 if [ "$1" = 0 ]; then
227 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
228 mv -f /etc/shells.new /etc/shells
232 for n in ash bsh ; do
233 echo -n "Looking for $n in /etc/shells... "
234 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
236 echo "${n} missing from /etc/shells" >&2
243 echo -n "Looking for ash.static in /etc/shells... "
244 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
246 echo "ash.static missing from /etc/shells" >&2
252 rm -rf $RPM_BUILD_ROOT
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/ash
257 %attr(755,root,root) %{_bindir}/bsh
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_bindir}/ash.static
264 %if %{?BOOT:1}%{!?BOOT:0}
266 %defattr(644,root,root,755)
267 %attr(755,root,root) /usr/lib/bootdisk/bin/*