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