]> git.pld-linux.org Git - packages/ash.git/blob - ash.spec
- merge translations from TurboLinux and Conectiva.
[packages/ash.git] / ash.spec
1 # conditional build
2 # --without static
3 # --with dietlibc (link with dietlibc, implies --without static)
4 # Branch: HEAD
5
6 %{?_with_dietlibc:%define _without_static 1}
7
8 Summary:        Small bourne shell from Berkeley
9 Summary(de):    Kleine Bourne-Shell von Berkeley
10 Summary(es):    Pequeña shell bourne de Berkeley
11 Summary(fr):    Shell Bourne réduit de Berkeley
12 Summary(pl):    Ma³y shell bourne'a
13 Summary(pt_BR): Pequena shell bourne de Berkeley
14 Summary(ru):    ïÂÌÅÇÞÅÎÎÁÑ ×ÅÒÓÉÑ Bourne shell (sh)
15 Summary(tr):    Ufak bir bourne kabuðu
16 Summary(uk):    ðÏÌÅÇÛÅÎÁ ×ÅÒӦѠBourne shell (sh)
17 Summary(zh_CN): [ϵͳ]BerkeleyµÄ΢ÐÍBourne Shell
18 Summary(zh_TW): [\e-A¨t\e$)B²Î]Berkeleyªº\e-A·L\e$)B«¬Bourne Shell
19 Name:           ash
20 Version:        0.4.0
21 Release:        8
22 License:        BSD
23 Group:          Applications/Shells
24 Source0:        %{name}-%{version}.tar.gz
25 Patch0:         %{name}-builtin.patch
26 Patch1:         %{name}-echo.patch
27 Patch2:         %{name}-getcwd.patch
28 Patch3:         %{name}-getopt.patch
29 Patch4:         %{name}-glob.patch
30 Patch5:         %{name}-jobs.patch
31 Patch6:         %{name}-kill.patch
32 Patch7:         %{name}-makefile.patch
33 Patch8:         %{name}-manpage.patch
34 Patch9:         %{name}-hetio.patch
35 Patch10:        %{name}-memout.patch
36 Patch11:        %{name}-misc.patch
37 Patch12:        %{name}-redir.patch
38 Patch13:        %{name}-setmode.patch
39 Patch14:        %{name}-syntax.patch
40 Patch15:        %{name}-test.patch
41 Patch16:        %{name}-times.patch
42 Patch17:        %{name}-debian.patch
43 Patch18:        %{name}-ppid.patch
44 Patch19:        %{name}-freebsd.patch
45 Patch20:        %{name}-sighup.patch
46 Patch21:        %{name}-dietlibc.patch
47 %{!?_without_static:BuildRequires:      glibc-static}
48 %{?_with_dietlibc:BuildRequires:        dietlibc-static}
49 BuildRequires:  byacc
50 BuildRequires:  flex
51 Requires(post,preun,verify):    grep
52 Requires(preun):        fileutils
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 Conflicts:      mkinitrd <= 1.7
55
56 %define         _bindir         /bin
57
58 %description
59 ash is a bourne shell clone from Berkeley. It supports all of the
60 standard Bourne shell commands and has the advantage of supporting
61 them while remaining considerably smaller than bash.
62
63 %description -l de
64 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
65 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
66 weniger Platz beansprucht als bash.
67
68 %description -l es
69 ash es un clone del shell bourne de Berkeley. Soporta todos los
70 comandos padrón de la Bourne shell y tiene la ventaja de soportarlos
71 con un tamaño considerablemente menor del que bash.
72
73 %description -l fr
74 ash est un clone Berkeley du shell Bourne. Il gère toutes les
75 commandes standard du shell Bourne et a l'avantage de les gérer tout
76 en restant considérablement plus petit que bash.
77
78 %description -l pl
79 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
80 komendy shella Bourne'a i jest mniejszy ni¿ bash.
81
82 %description -l pt_BR
83 ash é um clone do shell bourne de Berkeley. Ele suporta todos os
84 comandos-padrão da Bourne shell e tem a vantagem de suportá-los com um
85 tamanho consideravelmente menor do que bash.
86
87 %description -l ru
88 ûÅÌÌ - ÜÔÏ ÂÁÚÏ×ÁÑ ÓÉÓÔÅÍÎÁÑ ÐÒÏÇÒÁÍÍÁ, ËÏÔÏÒÁÑ ÉÎÔÅÒÐÒÅÔÉÒÕÅÔ ËÏÍÁÎÄÙ
89 ÐÏÌØÚÏ×ÁÔÅÌÑ, ××ÏÄÉÍÙÅ Ó ËÌÁ×ÉÁÔÕÒÙ ÉÌÉ ÐÒÉ ÐÏÍÏÝÉ ÍÙÛÉ. Ash - ÜÔÏ
90 ËÌÏΠBourne shell (sh) ÉÚ âÅÒËÌÉ. Ash ÐÏÄÄÅÒÖÉ×ÁÅÔ ×ÓÅ ÓÔÁÎÄÁÒÔÎÙÅ
91 ËÏÍÁÎÄÙ ÛÅÌÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÞÅÍ sh. ÷ ash ÏÔÓÕÔÓÔ×ÕÀÔ
92 ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Bourne shell (ÎÁÐÒÉÍÅÒ, ÉÓÔÏÒÉÑ ËÏÍÁÎÄ), ÎÏ ÏÎ
93 ÔÒÅÂÕÅÔ ÚÎÁÞÉÔÅÌØÎÏ ÍÅÎØÛÅ ÐÁÍÑÔÉ.
94
95 %description -l tr
96 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
97 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
98 avantajýna sahiptir.
99
100 %description -l uk
101 ûÅÌ - ÃÅ ÂÁÚÏ×Á ÓÉÓÔÅÍÎÁ ÐÒÏÇÒÁÍÁ, ËÏÔÒÁ ¦ÎÔÅÒÐÒÅÔÕ¤ ËÏÍÁÎÄÉ
102 ËÏÒÉÓÔÕ×ÁÞÁ, Ñ˦ ××ÏÄÑÔØÓÑ Ú ËÌÁצÁÔÕÒÉ ÁÂÏ ÚÁ ÄÏÐÏÍÏÇÏÀ ÍÉÛ¦. Ash -
103 ÃÅ ËÌÏΠBourne shell (sh) Ú âÅÒË̦. Ash Ð¦ÄÔÒÉÍÕ¤ ÕÓ¦ ÓÔÁÎÄÁÒÔΦ
104 ËÏÍÁÎÄÉ ÛÅÌÁ sh, ÂÕÄÕÞÉ ÚÎÁÞÎÏ ÍÅÎÛÉ͠Φ֠sh. ÷ ash ×¦ÄÓÕÔΦ ÄÅÑ˦
105 ÍÏÖÌÉ×ÏÓÔ¦ Bourne shell (ÎÁÐÒÉËÌÁÄ, ¦ÓÔÏҦѠËÏÍÁÎÄ), ÚÁÔŠצΠ×ÉÍÁÇÁ¤
106 ÚÎÁÞÎÏ ÍÅÎÛÅ ÐÁÍ'ÑÔ¦.
107
108 %package static
109 Summary:        Small bourne shell from Berkeley
110 Summary(de):    Kleine Bourne-Shell von Berkeley
111 Summary(fr):    Shell Bourne réduit de Berkeley
112 Summary(pl):    Ma³y shell bourne'a
113 Summary(tr):    Ufak bir bourne kabuðu
114 Group:          Applications/Shells
115 Requires(post,preun,verify):    grep
116 Requires(preun):        fileutils
117 Conflicts:      mkinitrd <= 1.7
118
119 %description static
120 ash is a bourne shell clone from Berkeley. It supports all of the
121 standard Bourne shell commands and has the advantage of supporting
122 them while remaining considerably smaller than bash.
123
124 %description static -l de
125 ash ist ein Bourne-Shell-Clone aus Berkeley, der alle
126 Standard-Bourne-Shell- Befehle unterstützt und dennoch erheblich
127 weniger Platz beansprucht als bash.
128
129 %description static -l fr
130 ash est un clone Berkeley du shell Bourne. Il gère toutes les
131 commandes standard du shell Bourne et a l'avantage de les gérer tout
132 en restant considérablement plus petit que bash.
133
134 %description static -l pl
135 Ash jest klonem shella Bourne'a z Berkeley. Obs³uguje standardowe
136 komendy shella Bourne'a i jest mniejszy ni¿ bash.
137
138 %description static -l tr
139 ash, Berkeley'in bir bourne kabuðu kopyasýdýr. Standart bourne kabuðu
140 komutlarýnýn tümünü destekler ve bash kabuðundan daha küçük olma
141 avantajýna sahiptir.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147 %patch2 -p1
148 %patch3 -p1
149 %patch4 -p1
150 %patch5 -p1
151 %patch6 -p1
152 %patch7 -p1
153 %patch8 -p1
154 %patch9 -p1
155 %patch10 -p1
156 %patch11 -p1
157 %patch12 -p1
158 %patch13 -p1
159 %patch14 -p1
160 %patch15 -p1
161 %patch16 -p1
162 # this is mainly for information, maybe add changelog to %doc?
163 %patch17 -p1
164 %patch18 -p1
165 %patch19 -p1
166 %patch20 -p1
167 %{?_with_dietlibc:%patch21 -p1}
168
169 %build
170
171 %{?_with_dietlibc:%define __cc %{_arch}-dietlibc-gcc}
172
173 %{!?_without_static:%{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="-static %{rpmldflags}"}
174 %{!?_without_static:mv -f sh ash.static}
175 %{__make} OPT_FLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" CC="%{__cc}"
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179
180 install -d $RPM_BUILD_ROOT/{%{_bindir},%{_mandir}/man1}
181 install sh $RPM_BUILD_ROOT%{_bindir}/ash
182 %{!?_without_static:install ash.static $RPM_BUILD_ROOT%{_bindir}/ash.static}
183 install sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ash.1
184 echo ".so ash.1" > $RPM_BUILD_ROOT%{_mandir}/man1/bsh.1
185 ln -sf ash $RPM_BUILD_ROOT/%{_bindir}/bsh
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %post
191 umask 022
192 if [ ! -f /etc/shells ]; then
193         echo "%{_bindir}/ash" > /etc/shells
194         echo "%{_bindir}/bsh" >> /etc/shells
195 else
196         if ! grep -q '^%{_bindir}/ash$' /etc/shells ; then
197                 echo "%{_bindir}/ash" >> /etc/shells
198         fi
199         if ! grep -q '^%{_bindir}/bsh$' /etc/shells ; then
200                 echo "%{_bindir}/bsh" >> /etc/shells
201         fi
202 fi
203
204 %preun
205 if [ "$1" = 0 ]; then
206         umask 022
207         grep -v '^%{_bindir}/ash$' /etc/shells | grep -v '^%{_bindir}/bsh$' > /etc/shells.new
208         mv -f /etc/shells.new /etc/shells
209 fi
210
211 %post static
212 umask 022
213 if [ ! -f /etc/shells ]; then
214         echo "%{_bindir}/ash.static" >> /etc/shells
215 else
216         if ! grep -q '^%{_bindir}/ash.static$' /etc/shells ; then
217                 echo "%{_bindir}/ash.static" >> /etc/shells
218         fi
219 fi
220
221 %preun static
222 if [ "$1" = 0 ]; then
223         umask 022
224         grep -v '^%{_bindir}/ash\.static$' /etc/shells > /etc/shells.new
225         mv -f /etc/shells.new /etc/shells
226 fi
227
228 %verifyscript
229 for n in ash bsh ; do
230         echo -n "Looking for $n in /etc/shells... "
231         if ! grep -q "^%{_bindir}/${n}\$" /etc/shells ; then
232                 echo "missing"
233                 echo "${n} missing from /etc/shells" >&2
234         else
235                 echo "found"
236         fi
237 done
238
239 %verifyscript static
240 echo -n "Looking for ash.static in /etc/shells... "
241 if ! grep -q '^%{_bindir}/ash\.static$' /etc/shells ; then
242         echo "missing"
243         echo "ash.static missing from /etc/shells" >&2
244 else
245         echo "found"
246 fi
247
248 %files
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/ash
251 %attr(755,root,root) %{_bindir}/bsh
252 %{_mandir}/man1/*
253
254 %{!?_without_static:%files static}
255 %{!?_without_static:%defattr(644,root,root,755)}
256 %{!?_without_static:%attr(755,root,root) %{_bindir}/ash.static}
This page took 0.109546 seconds and 4 git commands to generate.