]> git.pld-linux.org Git - packages/ash.git/blame - ash.spec
- converted to UTF-8
[packages/ash.git] / ash.spec
CommitLineData
47366afb
PG
1#
2# Conditional build
24643259 3%bcond_without static # don't build static
34db5700 4%bcond_with dietlibc # link with dietlibc, implies without static
24643259 5%bcond_with uClibc # link with uclibc
059491f0 6# Branch: HEAD
086f4131 7
24643259 8%if %{with dietlibc}
9%undefine with_static
10%endif
086f4131 11
a52a61ad 12Summary: Small bourne shell from Berkeley
d1a1d19b
JR
13Summary(de.UTF-8): Kleine Bourne-Shell von Berkeley
14Summary(es.UTF-8): Pequeña shell bourne de Berkeley
15Summary(fr.UTF-8): Shell Bourne réduit de Berkeley
16Summary(pl.UTF-8): Mały shell bourne'a
17Summary(pt_BR.UTF-8): Pequena shell bourne de Berkeley
18Summary(ru.UTF-8): Облегченная версия Bourne shell (sh)
19Summary(tr.UTF-8): Ufak bir bourne kabuğu
20Summary(uk.UTF-8): Полегшена версія Bourne shell (sh)
21Summary(zh_CN.UTF-8): [系统]Berkeley的微型Bourne Shell
22Summary(zh_TW.UTF-8): [\e-A系\e$)B統]Berkeley的\e-A微\e$)B型Bourne Shell
a52a61ad 23Name: ash
a53b80aa 24Version: 0.4.0
80376774 25Release: 10
a52a61ad 26License: BSD
2334b4c1 27Group: Applications/Shells
5e6d396d 28Source0: %{name}-%{version}.tar.gz
54ddd2aa 29# Source0-md5: 1c59f5b62a081cb0cb3b053c01d79529
d427b829
JB
30Patch0: %{name}-builtin.patch
31Patch1: %{name}-echo.patch
32Patch2: %{name}-getcwd.patch
33Patch3: %{name}-getopt.patch
34Patch4: %{name}-glob.patch
35Patch5: %{name}-jobs.patch
36Patch6: %{name}-kill.patch
37Patch7: %{name}-makefile.patch
38Patch8: %{name}-manpage.patch
39Patch9: %{name}-hetio.patch
40Patch10: %{name}-memout.patch
41Patch11: %{name}-misc.patch
42Patch12: %{name}-redir.patch
43Patch13: %{name}-setmode.patch
44Patch14: %{name}-syntax.patch
45Patch15: %{name}-test.patch
46Patch16: %{name}-times.patch
47Patch17: %{name}-debian.patch
48Patch18: %{name}-ppid.patch
49Patch19: %{name}-freebsd.patch
f9a2efa2 50Patch20: %{name}-sighup.patch
5c7bf789 51Patch21: %{name}-dietlibc.patch
d427b829 52BuildRequires: byacc
24643259 53%{?with_dietlibc:BuildRequires: dietlibc-devel}
907c49e7 54BuildRequires: flex
24643259 55%if %{with static}
15f735d1 56%{!?with_uClibc:BuildRequires: glibc-static}
24643259 57%{?with_uClibc:BuildRequires: uClibc-static > 2:0.9.27-1}
58%endif
59%{?with_uClibc:BuildRequires: uClibc-devel > 2:0.9.27-1}
907c49e7
JB
60Requires(post,preun,verify): grep
61Requires(preun): fileutils
fb96503e 62BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
a52a61ad 63Conflicts: mkinitrd <= 1.7
2584bade 64
25190792 65%define _bindir /bin
fe66e27d 66
2584bade 67%description
a52a61ad 68ash is a bourne shell clone from Berkeley. It supports all of the
69standard Bourne shell commands and has the advantage of supporting
70them while remaining considerably smaller than bash.
2584bade 71
d1a1d19b 72%description -l de.UTF-8
a52a61ad 73ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
d1a1d19b 74Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
a52a61ad 75weniger Platz beansprucht als bash.
2584bade 76
d1a1d19b 77%description -l es.UTF-8
d7c36caf 78Ash es un clon del shell bourne de Berkeley. Soporta todos los
d1a1d19b
JR
79comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
80con un tamaño considerablemente menor del que bash.
e8d158e7 81
d1a1d19b
JR
82%description -l fr.UTF-8
83ash est un clone Berkeley du shell Bourne. Il gère toutes les
84commandes standard du shell Bourne et a l'avantage de les gérer tout
85en restant considérablement plus petit que bash.
2584bade 86
d1a1d19b
JR
87%description -l pl.UTF-8
88Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
89komendy shella Bourne'a i jest mniejszy niż bash.
2584bade 90
d1a1d19b
JR
91%description -l pt_BR.UTF-8
92ash é um clone do shell bourne de Berkeley. Ele suporta todos os
93comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
e8d158e7 94tamanho consideravelmente menor do que bash.
95
d1a1d19b
JR
96%description -l ru.UTF-8
97Шелл - это базовая системная программа, которая интерпретирует команды
98пользователя, вводимые с клавиатуры или при помощи мыши. Ash - это
99клон Bourne shell (sh) из Беркли. Ash поддерживает все стандартные
100команды шелла sh, будучи значительно меньше чем sh. В ash отсутствуют
101некоторые возможности Bourne shell (например, история команд), но он
102требует значительно меньше памяти.
103
104%description -l tr.UTF-8
105ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
106komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
107avantajına sahiptir.
108
109%description -l uk.UTF-8
110Шел - це базова системна програма, котра інтерпретує команди
111користувача, які вводяться з клавіатури або за допомогою миші. Ash -
112це клон Bourne shell (sh) з Берклі. Ash підтримує усі стандартні
113команди шела sh, будучи значно меншим ніж sh. В ash відсутні деякі
114можливості Bourne shell (наприклад, історія команд), зате він вимагає
115значно менше пам'яті.
2b758f2f 116
6a376262 117%package static
a52a61ad 118Summary: Small bourne shell from Berkeley
d1a1d19b
JR
119Summary(de.UTF-8): Kleine Bourne-Shell von Berkeley
120Summary(fr.UTF-8): Shell Bourne réduit de Berkeley
121Summary(pl.UTF-8): Mały shell bourne'a
122Summary(tr.UTF-8): Ufak bir bourne kabuğu
2334b4c1 123Group: Applications/Shells
907c49e7
JB
124Requires(post,preun,verify): grep
125Requires(preun): fileutils
a52a61ad 126Conflicts: mkinitrd <= 1.7
6a376262 127
128%description static
a52a61ad 129ash is a bourne shell clone from Berkeley. It supports all of the
130standard Bourne shell commands and has the advantage of supporting
131them while remaining considerably smaller than bash.
6a376262 132
d1a1d19b 133%description static -l de.UTF-8
a52a61ad 134ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
d1a1d19b 135Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
a52a61ad 136weniger Platz beansprucht als bash.
6a376262 137
d1a1d19b
JR
138%description static -l fr.UTF-8
139ash est un clone Berkeley du shell Bourne. Il gère toutes les
140commandes standard du shell Bourne et a l'avantage de les gérer tout
141en restant considérablement plus petit que bash.
6a376262 142
d1a1d19b
JR
143%description static -l pl.UTF-8
144Ash jest klonem shella Bourne'a z Berkeley. Obsługuje standardowe
145komendy shella Bourne'a i jest mniejszy niż bash.
6a376262 146
d1a1d19b
JR
147%description static -l tr.UTF-8
148ash, Berkeley'in bir bourne kabuğu kopyasıdır. Standart bourne kabuğu
149komutlarının tümünü destekler ve bash kabuğundan daha küçük olma
150avantajına sahiptir.
6a376262 151
2584bade 152%prep
d427b829 153%setup -q
a53b80aa
MM
154%patch0 -p1
155%patch1 -p1
156%patch2 -p1
157%patch3 -p1
158%patch4 -p1
159%patch5 -p1
160%patch6 -p1
161%patch7 -p1
162%patch8 -p1
163%patch9 -p1
83559fb9 164%patch10 -p1
a53b80aa
MM
165%patch11 -p1
166%patch12 -p1
167%patch13 -p1
168%patch14 -p1
169%patch15 -p1
170%patch16 -p1
171# this is mainly for information, maybe add changelog to %doc?
172%patch17 -p1
173%patch18 -p1
174%patch19 -p1
f9a2efa2 175%patch20 -p1
086f4131 176%{?_with_dietlibc:%patch21 -p1}
2584bade 177
178%build
5c1699eb 179
24643259 180%define __cc %{_target_cpu}-pld-linux-gcc
181%{?with_dietlibc:%define __cc %{_target_cpu}-dietlibc-gcc}
182%{?with_uClibc:%define __cc %{_target_cpu}-uclibc-gcc}
086f4131 183
24643259 184%{?with_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}" CC="%{__cc}"}
185%{?with_static:mv -f sh ash.static}
a97f8bec 186%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
5c1699eb 187
2584bade 188%install
189rm -rf $RPM_BUILD_ROOT
dedfb4b9 190install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
df2126b2 191
fe66e27d 192install sh $RPM_BUILD_ROOT%{_bindir}/ash
24643259 193%{?with_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
4da54553 194install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
195echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
dedfb4b9 196ln -sf ash $RPM_BUILD_ROOT%{_bindir}/bsh
dab08540 197
907c49e7
JB
198%clean
199rm -rf $RPM_BUILD_ROOT
200
2584bade 201%post
907c49e7 202umask 022
19afc58d 203if [ ! -f /etc/shells ]; then
966b3451
TP
204 echo "%{_bindir}/ash" > /etc/shells
205 echo "%{_bindir}/bsh" >> /etc/shells
19afc58d 206else
966b3451
TP
207 if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
208 echo "%{_bindir}/ash" >> /etc/shells
209 fi
210 if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
211 echo "%{_bindir}/bsh" >> /etc/shells
212 fi
6a376262 213fi
214
907c49e7
JB
215%preun
216if [ "$1" = 0 ]; then
217 umask 022
218 grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
219 mv -f /etc/shells.new /etc/shells
220fi
221
6a376262 222%post static
907c49e7 223umask 022
6a376262 224if [ ! -f /etc/shells ]; then
966b3451 225 echo "%{_bindir}/ash.static" >> /etc/shells
6a376262 226else
966b3451
TP
227 if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
228 echo "%{_bindir}/ash.static" >> /etc/shells
229 fi
19afc58d 230fi
2584bade 231
6a376262 232%preun static
4f133cd4 233if [ "$1" = 0 ]; then
907c49e7 234 umask 022
966b3451
TP
235 grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
236 mv -f /etc/shells.new /etc/shells
6a376262 237fi
238
2584bade 239%verifyscript
d427b829 240for n in ash bsh ; do
966b3451
TP
241 echo -n "Looking for $n in /etc/shells... "
242 if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
243 echo "missing"
244 echo "${n} missing from /etc/shells" >&2
245 else
246 echo "found"
247 fi
2584bade 248done
249
d427b829
JB
250%verifyscript static
251echo -n "Looking for ash.static in /etc/shells... "
252if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
253 echo "missing"
254 echo "ash.static missing from /etc/shells" >&2
255else
256 echo "found"
257fi
258
2584bade 259%files
e4a82c98 260%defattr(644,root,root,755)
fe66e27d
SZ
261%attr(755,root,root) %{_bindir}/ash
262%attr(755,root,root) %{_bindir}/bsh
4da54553 263%{_mandir}/man1/*
6a376262 264
24643259 265%if %{with static}
266%files static
267%defattr(644,root,root,755)
268%attr(755,root,root) %{_bindir}/ash.static
269%endif
This page took 0.291076 seconds and 4 git commands to generate.