]> git.pld-linux.org Git - packages/bash.git/blob - bash.spec
c44e0752832e7cc3e6b6057188f4423c26b1f4ab
[packages/bash.git] / bash.spec
1 #
2 # Conditional build:
3 %bcond_without  static          # don't build static version
4 %bcond_with     bash_history    # build with additional history in /var/log/bash_hist ;)
5 ##
6 Summary:        GNU Bourne Again Shell (bash)
7 Summary(es):    GNU Bourne Again Shell (bash)
8 Summary(fr):    Le shell Bourne Again de GNU
9 Summary(pl):    Pow³oka GNU Bourne Again Shell (bash)
10 Summary(pt_BR): GNU Bourne Again Shell (bash)
11 Summary(ru):    GNU Bourne Again Shell (bash)
12 Summary(uk):    GNU Bourne Again Shell (bash)
13 Name:           bash
14 Version:        3.0
15 Release:        9%{?with_bash_history:inv}
16 License:        GPL
17 Group:          Applications/Shells
18 Source0:        ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz
19 # Source0-md5:  26c4d642e29b3533d8d754995bc277b3
20 Source1:        %{name}rc
21 Source2:        %{name}-skel-.%{name}_logout
22 Source3:        %{name}-skel-.%{name}_profile
23 Source4:        %{name}-skel-.%{name}rc
24 Source5:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
25 # Source5-md5:  d2aacf89c4a444c5da648da69afdb01a
26 Patch0:         %{name}-paths.patch
27 Patch1:         %{name}-security.patch
28 Patch2:         %{name}-autoconf.patch
29 Patch3:         %{name}-info.patch
30 Patch4:         %{name}-profile.patch
31 Patch5:         %{name}-requires.patch
32 Patch6:         %{name}-compat.patch
33 Patch7:         %{name}-rlimit_locks.patch
34 Patch8:         %{name}-sighup.patch
35 Patch9:         %{name}-backup_history.patch
36 Patch10:        %{name}-pmake.patch
37 Patch11:        %{name}-act_like_sh.patch
38 Patch21:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-001
39 Patch22:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-002
40 Patch23:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-003
41 Patch24:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-004
42 Patch25:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-005
43 Patch26:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-006
44 Patch27:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-007
45 Patch28:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-008
46 Patch29:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-009
47 Patch30:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-010
48 Patch31:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-011
49 Patch32:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-012
50 Patch33:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-013
51 Patch34:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-014
52 Patch35:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-015
53 Patch36:        ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/bash30-016
54 Patch37:        %{name}-WCONTINUED.patch
55 URL:            http://www.gnu.org/software/bash/
56 BuildRequires:  autoconf
57 BuildRequires:  automake
58 BuildRequires:  bison
59 BuildRequires:  ncurses-devel >= 5.2
60 BuildRequires:  readline-devel >= 5.0
61 BuildRequires:  texinfo
62 %if %{with static}
63 # Require static library only for static build
64 BuildRequires:  glibc-static >= 2.2
65 BuildRequires:  ncurses-static >= 5.2
66 BuildRequires:  readline-static >= 5.0
67 %endif
68 Requires:       grep
69 Requires(preun):        fileutils
70 Requires:       setup >= 2.4.6-2
71 Requires:       readline >= 5.0
72 Obsoletes:      bash-doc
73 Obsoletes:      bash2
74 Obsoletes:      bash2-doc
75 Obsoletes:      etcskel
76 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77
78 %description
79 Bash is a GNU project sh-compatible shell or command language
80 interpreter. Bash (Bourne Again shell) incorporates useful features
81 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
82 be run by bash without modification. Bash offers several improvements
83 over sh, including command line editing, unlimited size command
84 history, job control, shell functions and aliases, indexed arrays of
85 unlimited size and integer arithmetic in any base from two to 64. Bash
86 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
87 Shell and Tools standard. Bash is the default shell for Linux
88 Mandrake. You should install bash because of its popularity and power.
89 You'll probably end up using it.
90
91 %description -l es
92 Bash es un interpretador de comandos compatible con sh, que ejecuta
93 comandos leídos de la entrada padrón o de un archivo. Bash también
94 incorpora características útiles de las shells Korn y C (ksh y csh).
95 Bash ha sido desarrollado para ser una adición compatible con la
96 especificación IEEE Posix para shells y herramientas (IEEE Working
97 Group 1003.2).
98
99 %description -l de
100 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
101 GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
102 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
103 sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
104 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
105 Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
106 Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
107 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
108 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
109 und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
110 Mandrake.
111
112 %description -l fr
113 Bash est un shell (interpréteur de commande) du projet GNU, compatible
114 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
115 nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
116 plupart des scripts sh sont exécutables sans modifications. Bash
117 comprend nombre d'améliorations par rapport à sh : édition de la ligne
118 de commande, historique illimité, contrôle des processus
119 d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
120 illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
121 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
122 and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
123 l'installer du fait de sa puissance et de sa popularité. Vous finirez
124 probablement par l'utiliser.
125
126 %description -l pl
127 Bash (Bourne Again SHell) jest projektem GNU pow³oki kompatybilnej z
128 sh oraz interpretera jêzyka poleceñ. Posiada u¿yteczne w³a¶ciwo¶ci
129 pow³ok Korn (ksh) i C (csh). Wiêkszo¶æ skryptów sh mo¿e byæ
130 uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeñ w
131 stosunku do sh, w³±czaj±c edycjê linii poleceñ, nieograniczony rozmiar
132 historii poleceñ, funkcje i aliasy, indeksowane tablice
133 nieograniczonych rozmiarów oraz arytmetykê ca³kowitoliczbow± o
134 dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma byæ zgodny
135 ze standardem IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools.
136
137 %description -l pt_BR
138 Bash é um interpretador de comandos compatível com sh, que executa
139 comandos lidos da entrada padrão ou de um arquivo. Bash também
140 incorpora características úteis das shells Korn e C (ksh e csh). Bash
141 tem sido desenvolvido para ser uma implementação compatível com a
142 especificação IEEE Posix para shells e ferramentas (IEEE Working Group
143 1003.2).
144
145 %description -l ru
146 Bash - ÜÔÏ sh-ÓÏ×ÍÅÓÔÉÍÙÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ ËÏÍÁÎÄÎÏÇÏ ÑÚÙËÁ (shell),
147 ÉÓÐÏÌÎÑÀÝÉÊ ËÏÍÁÎÄÙ, ÐÏÓÔÕÐÁÀÝÉÅ ÓÏ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÁ ÉÌÉ ÉÚ ÆÁÊÌÁ.
148 Bash ×ËÌÀÞÁÅÔ ÐÏÌÅÚÎÙÅ ÒÁÓÛÉÒÅÎÉÑ ÉÚ ÉÎÔÅÒÐÒÅÔÁÔÏÒÏ× Korn É C shell
149 (ksh É csh).
150
151 Bash ÒÁÚÒÁÂÁÔÙ×ÁÅÔÓÑ ËÁË ÒÅÁÌÉÚÁÃÉÑ, ÏÔ×ÅÞÁÀÝÁÑ IEEE Posix Shell and
152 Tools specification (IEEE Working Group 1003.2).
153
154 %description -l tr
155 Bash standart giriþten ya da bir dosyadan komut okuyup çalýþtýran sh
156 uyumlu bir komut dili yorumlayýcýsýdýr. Ayný zamanda Korn ve C
157 kabuklarýnýn (ksh ve csh) kullanýþlý özelliklerini de kapsar. Bash,
158 IEEE Posix Kabuk ve Araç ayrýntýlarýna (IEEE Working Group 1003.2)
159 uyumlu bir uygulama olarak tasarlanmýþtýr.
160
161 %description -l uk
162 Bash - ÃÅ sh-ÓÕͦÓÔÎÉÊ ¦ÎÔÅÒÐÒÅÔÁÔÏÒ ËÏÍÁÎÄÎϧ ÍÏ×É (shell),
163 ×ÉËÏÎÕÀÞÉÊ ËÏÍÁÎÄÉ Ú¦ ÓÔÁÎÄÁÒÔÎÏÇÏ ××ÏÄÕ ÁÂÏ Ú ÆÁÊÌÁ. Bash Í¦ÓÔÉÔØ
164 ËÏÒÉÓÔΦ ÒÏÚÛÉÒÅÎÎÑ Ú ¦ÎÔÅÒÐÒÅÔÁÔÏҦנKorn ÔÁ C shell (ksh ÔÁ csh).
165
166 Bash ÒÏÚÒÏÂÌÑ×ÓÑ ÑË ÒÅÁ̦ÚÁæÑ, ÝϠצÄÐÏצÄÁ¤ IEEE Posix Shell and
167 Tools specification (IEEE Working Group 1003.2).
168
169 %package static
170 Summary:        Statically linked GNU Bourne Again Shell (bash)
171 Summary(pl):    Statycznie skonsolidowany GNU Bourne Again Shell (bash)
172 Group:          Applications/Shells
173 Requires(post,preun):   grep
174 Requires(preun):        fileutils
175 Requires:       %{name} = %{version}-%{release}
176
177 %description static
178 Bash is a GNU project sh-compatible shell or command language
179 interpreter. Bash (Bourne Again shell) incorporates useful features
180 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
181 be run by bash without modification. Bash offers several improvements
182 over sh, including command line editing, unlimited size command
183 history, job control, shell functions and aliases, indexed arrays of
184 unlimited size and integer arithmetic in any base from two to 64. Bash
185 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
186 Shell and Tools standard. Bash is the default shell for Linux
187 Mandrake. You should install bash because of its popularity and power.
188 You'll probably end up using it. This package contains statically
189 linked version of bash.
190
191 %description static -l pl
192 Bash jest zaawansowan± pow³ok±, która wykonuje komendy czytane ze
193 standardowego wej¶cia (stdin) lub z pliku. Posiada w³a¶ciwo¶ci pow³ok
194 Korn i C (ksh i csh). Bash jest równie¿ zaimplementowany IEEE Posix
195 Shell oraz jest zgodny ze specyfikacj± - IEEE Working Group 1003.2. W
196 tym pakiecie jest wersja basha skonsolidowana statycznie.
197
198 %prep
199 %setup -q -a5
200 %patch0 -p1
201 %patch1 -p1
202 %patch2 -p1
203 %patch3 -p1
204 %patch4 -p1
205 %patch5 -p1
206 %patch6 -p1
207 %patch7 -p1
208 %patch8 -p1
209 %{?with_bash_history:%patch9 -p1}
210 #%patch10 -p1   -- no longer needed?
211 %patch11 -p1
212 %patch21 -p0
213 %patch22 -p0
214 %patch23 -p0
215 %patch24 -p0
216 %patch25 -p0
217 %patch26 -p0
218 %patch27 -p0
219 %patch28 -p0
220 %patch29 -p0
221 %patch30 -p0
222 %patch31 -p0
223 %patch32 -p0
224 %patch33 -p0
225 %patch34 -p0
226 %patch35 -p0
227 %patch36 -p0
228 %patch37 -p1
229
230 echo %{version} > _distribution
231 echo %{release} > _patchlevel
232
233 %build
234 %{__autoconf}
235 cp -f /usr/share/automake/config.* support
236 for mode in %{?with_static:static} shared; do
237 %configure \
238         --enable-alias \
239         --enable-help-builtin \
240         --enable-history \
241         --enable-job-control \
242         --enable-restricted \
243         --enable-readline \
244         --with-curses \
245         --enable-extended-glob \
246         --enable-dparen-arithmetic \
247         --without-bash-malloc \
248         `[ "$mode" = "static" ] && echo "--enable-static-link"` \
249         --with-installed-readline
250
251 %{__make} \
252         DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
253
254 [ "$mode" = "static" ] && mv -f bash bash.static || :
255 done
256
257 %install
258 rm -rf $RPM_BUILD_ROOT
259 install -d $RPM_BUILD_ROOT/{bin,etc/skel}
260 %{?with_bash_history:install -d $RPM_BUILD_ROOT/var/log/bash_hist}
261
262 %{__make} install \
263         DESTDIR=$RPM_BUILD_ROOT
264
265 mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
266 %{?with_static:install bash.static $RPM_BUILD_ROOT/bin}
267
268 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
269 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
270
271 for d in es fr it ja ko nl pl ; do
272         install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
273         install man/$d/* $RPM_BUILD_ROOT%{_mandir}/$d/man1
274         echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/$d/man1/rbash.1
275 done
276
277 ln -sf bash $RPM_BUILD_ROOT/bin/rbash
278
279 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
280 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
281 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
282
283 %find_lang %{name}
284
285 %clean
286 rm -rf $RPM_BUILD_ROOT
287
288 %post
289 umask 022
290 if [ ! -f /etc/shells ]; then
291         echo "/bin/bash" > /etc/shells
292         echo "/bin/rbash" >> /etc/shells
293 else
294         if ! grep -q '^/bin/bash$' /etc/shells; then
295                 echo "/bin/bash" >> /etc/shells
296         fi
297         if ! grep -q '^/bin/rbash$' /etc/shells; then
298                 echo "/bin/rbash" >> /etc/shells
299         fi
300 fi
301
302 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
303
304 %preun
305 if [ "$1" = "0" ]; then
306         umask 022
307         grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
308         mv -f /etc/shells.new /etc/shells
309 fi
310
311 %post static
312 umask 022
313 if [ ! -f /etc/shells ]; then
314         echo "/bin/bash.static" > /etc/shells
315 else
316         if ! grep -q '^/bin/bash.static$' /etc/shells; then
317                 echo "/bin/bash.static" >> /etc/shells
318         fi
319 fi
320
321 %preun static
322 if [ "$1" = "0" ]; then
323         umask 022
324         grep -v /bin/bash.static /etc/shells > /etc/shells.new
325         mv -f /etc/shells.new /etc/shells
326 fi
327
328 %postun
329 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
330
331 %files -f %{name}.lang
332 %defattr(644,root,root,755)
333 %doc CHANGES NEWS README doc/{FAQ,INTRO}
334
335 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bashrc
336 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_logout
337 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_profile
338 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bashrc
339
340 %attr(755,root,root) /bin/bash
341 %attr(755,root,root) /bin/rbash
342 %attr(755,root,root) %{_bindir}/bashbug
343
344 %{?with_bash_history:%attr(751,root,root) %dir /var/log/bash_hist}
345 %{_infodir}/bash.info*
346 %{_mandir}/man1/*
347 %lang(es) %{_mandir}/es/man1/*
348 %lang(fr) %{_mandir}/fr/man1/*
349 %lang(it) %{_mandir}/it/man1/*
350 %lang(ja) %{_mandir}/ja/man1/*
351 %lang(ko) %{_mandir}/ko/man1/*
352 %lang(nl) %{_mandir}/nl/man1/*
353 %lang(pl) %{_mandir}/pl/man1/*
354
355 %if %{with static}
356 %files static
357 %defattr(644,root,root,755)
358 %attr(755,root,root) /bin/bash.static
359 %endif
This page took 0.102404 seconds and 2 git commands to generate.