3 # _without_embed - don't build uClibc version
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 Source: %{name}-%{version}.tar.gz
15 Patch0: %{name}-builtin.patch
16 Patch1: %{name}-echo.patch
17 Patch2: %{name}-getcwd.patch
18 Patch3: %{name}-getopt.patch
19 Patch4: %{name}-glob.patch
20 Patch5: %{name}-jobs.patch
21 Patch6: %{name}-kill.patch
22 Patch7: %{name}-makefile.patch
23 Patch8: %{name}-manpage.patch
24 Patch9: %{name}-hetio.patch
25 Patch10: %{name}-memout.patch
26 Patch11: %{name}-misc.patch
27 Patch12: %{name}-redir.patch
28 Patch13: %{name}-setmode.patch
29 Patch14: %{name}-syntax.patch
30 Patch15: %{name}-test.patch
31 Patch16: %{name}-times.patch
32 Patch17: %{name}-debian.patch
33 Patch18: %{name}-ppid.patch
34 Patch19: %{name}-freebsd.patch
35 Patch20: %{name}-sighup.patch
38 BuildRequires: glibc-static
41 %if %{!?_without_embed:1}%{?_without_embed:0}
42 BuildRequires: uClibc-devel
43 BuildRequires: uClibc-static
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Conflicts: mkinitrd <= 1.7
48 %define embed_path /usr/lib/embed
49 %define embed_cc %{_arch}-uclibc-cc
50 %define embed_cflags %{rpmcflags} -Os
55 ash is a bourne shell clone from Berkeley. It supports all of the
56 standard Bourne shell commands and has the advantage of supporting
57 them while remaining considerably smaller than bash.
60 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
61 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
62 weniger Platz beansprucht als bash.
65 ash est un clone Berkeley du shell Bourne. Il gère toutes les
66 commandes standard du shell Bourne et a l'avantage de les gérer tout
67 en restant considérablement plus petit que bash.
70 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
71 komendy shella Bourne'a i jest mniejszy ni¿ bash.
74 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
75 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
79 Summary: Small bourne shell from Berkeley
80 Summary(de): Kleine Bourne-Shell von Berkeley
81 Summary(fr): Shell Bourne réduit de Berkeley
82 Summary(pl): Ma³y shell bourne'a
83 Summary(tr): Ufak bir bourne kabuðu
84 Group: Applications/Shells
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 shella Bourne'a z Berkeley. Obs³uguje standardowe
106 komendy shella 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
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
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.
125 Version for embedded systems.
127 %description embed -l pl
128 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
129 komendy shella Bourne'a i jest mniejszy ni¿ bash. Wersja dla systemów
151 # this is mainly for information, maybe add changelog to %doc?
159 %if %{!?_without_embed:1}%{?_without_embed: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="%{embed_cflags}" \
166 mv -f sh ash-embed-shared
168 OPT_FLAGS="%{embed_cflags}" \
171 mv -f sh ash-embed-static
176 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"
178 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
181 rm -rf $RPM_BUILD_ROOT
184 %if %{!?_without_embed:1}%{?_without_embed:0}
185 install -d $RPM_BUILD_ROOT/%{embed_path}/{shared,static}
186 install ash-embed-static $RPM_BUILD_ROOT/%{embed_path}/static/ash
187 install ash-embed-shared $RPM_BUILD_ROOT/%{embed_path}/shared/ash
188 ln -sf ash $RPM_BUILD_ROOT/%{embed_path}/shared/sh
189 ln -sf ash $RPM_BUILD_ROOT/%{embed_path}/static/sh
193 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
194 install sh $RPM_BUILD_ROOT%{_bindir}/ash
195 install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static
196 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
197 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
198 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
201 if [ ! -f /etc/shells ]; then
202 echo "%{_bindir}/ash" > /etc/shells
203 echo "%{_bindir}/bsh" >> /etc/shells
205 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
206 echo "%{_bindir}/ash" >> /etc/shells
208 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
209 echo "%{_bindir}/bsh" >> /etc/shells
214 if [ ! -f /etc/shells ]; then
215 echo "%{_bindir}/ash.static" >> /etc/shells
217 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
218 echo "%{_bindir}/ash.static" >> /etc/shells
223 if [ "$1" = 0 ]; then
224 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
225 mv -f /etc/shells.new /etc/shells
229 if [ "$1" = 0 ]; then
230 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
231 mv -f /etc/shells.new /etc/shells
235 for n in ash bsh ; do
236 echo -n "Looking for $n in /etc/shells... "
237 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
239 echo "${n} missing from /etc/shells" >&2
246 echo -n "Looking for ash.static in /etc/shells... "
247 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
249 echo "ash.static missing from /etc/shells" >&2
255 rm -rf $RPM_BUILD_ROOT
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_bindir}/ash
260 %attr(755,root,root) %{_bindir}/bsh
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{_bindir}/ash.static
267 %if %{!?_without_embed:1}%{?_without_embed:0}
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{embed_path}/*/*