]> git.pld-linux.org Git - packages/bash.git/blob - bash.spec
- up to 4.3 (pl.po looks up to date, so disable patch)
[packages/bash.git] / bash.spec
1 # Conditional build:
2 %bcond_without  static          # don't build static version
3 %bcond_with     bash_history    # build with additional history in /var/log/bash_hist ;)
4 %bcond_without  tests   # do not perform "make test"
5
6 %define         ver             4.3
7 %define         patchlevel      0
8 %define         rel             1
9 Summary:        GNU Bourne Again Shell (bash)
10 Summary(fr.UTF-8):      Le shell Bourne Again de GNU
11 Summary(pl.UTF-8):      Powłoka GNU Bourne Again Shell (bash)
12 Name:           bash
13 Version:        %{ver}%{?patchlevel:.%{patchlevel}}
14 Release:        %{rel}%{?with_bash_history:inv}
15 License:        GPL
16 Group:          Applications/Shells
17 Source0:        http://ftp.gnu.org/gnu/bash/%{name}-%{ver}.tar.gz
18 # Source0-md5:  81348932d5da294953e15d4814c74dd1
19 Source1:        %{name}rc
20 Source2:        %{name}-skel-.bash_logout
21 Source3:        %{name}-skel-.bash_profile
22 Source4:        %{name}-skel-.bashrc
23 Source5:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
24 # Source5-md5:  d2aacf89c4a444c5da648da69afdb01a
25 Patch0:         %{name}-paths.patch
26 Patch1:         %{name}-security.patch
27 Patch2:         %{name}-autoconf.patch
28 Patch3:         %{name}-info.patch
29 Patch4:         %{name}-profile.patch
30 Patch5:         %{name}-requires.patch
31 Patch6:         %{name}-compat.patch
32 Patch8:         %{name}-sighup.patch
33 Patch9:         %{name}-backup_history.patch
34 Patch10:        %{name}-act_like_sh.patch
35 Patch11:        %{name}-elinks_cont.patch
36 Patch12:        %{name}-pl.po-update.patch
37 %patchset_source -f http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-%03g 1 %{patchlevel}
38 URL:            http://www.gnu.org/software/bash/
39 BuildRequires:  autoconf
40 BuildRequires:  automake
41 BuildRequires:  bison
42 BuildRequires:  ncurses-devel >= 5.2
43 BuildRequires:  readline-devel >= 6.3
44 BuildRequires:  rpmbuild(macros) >= 1.462
45 BuildRequires:  sed >= 4.0
46 BuildRequires:  texinfo
47 %if %{with static}
48 # Require static library only for static build
49 BuildRequires:  glibc-static >= 2.2
50 BuildRequires:  ncurses-static >= 5.2
51 BuildRequires:  readline-static >= 6.3
52 %endif
53 Requires:       readline >= 6.3
54 Requires:       setup >= 2.4.6-2
55 Obsoletes:      bash-doc
56 Obsoletes:      bash2
57 Obsoletes:      bash2-doc
58 Obsoletes:      etcskel
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %description
62 Bash is a GNU project sh-compatible shell or command language
63 interpreter. Bash (Bourne Again shell) incorporates useful features
64 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
65 be run by bash without modification. Bash offers several improvements
66 over sh, including command line editing, unlimited size command
67 history, job control, shell functions and aliases, indexed arrays of
68 unlimited size and integer arithmetic in any base from two to 64. Bash
69 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
70 Shell and Tools standard. Bash is the default shell for Linux
71 Mandrake. You should install bash because of its popularity and power.
72 You'll probably end up using it.
73
74 %description -l es.UTF-8
75 Bash es un interpretador de comandos compatible con sh, que ejecuta
76 comandos leídos de la entrada padrón o de un archivo. Bash también
77 incorpora características útiles de las shells Korn y C (ksh y csh).
78 Bash ha sido desarrollado para ser una adición compatible con la
79 especificación IEEE Posix para shells y herramientas (IEEE Working
80 Group 1003.2).
81
82 %description -l de.UTF-8
83 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
84 GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
85 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
86 sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
87 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
88 Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
89 Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
90 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
91 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
92 und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
93 Mandrake.
94
95 %description -l fr.UTF-8
96 Bash est un shell (interpréteur de commande) du projet GNU, compatible
97 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
98 nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
99 plupart des scripts sh sont exécutables sans modifications. Bash
100 comprend nombre d'améliorations par rapport à sh : édition de la ligne
101 de commande, historique illimité, contrôle des processus
102 d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
103 illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
104 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
105 and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
106 l'installer du fait de sa puissance et de sa popularité. Vous finirez
107 probablement par l'utiliser.
108
109 %description -l pl.UTF-8
110 Bash (Bourne Again SHell) jest projektem GNU powłoki kompatybilnej z
111 sh oraz interpretera języka poleceń. Posiada użyteczne właściwości
112 powłok Korn (ksh) i C (csh). Większość skryptów sh może być
113 uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeń w
114 stosunku do sh, włączając edycję linii poleceń, nieograniczony rozmiar
115 historii poleceń, funkcje i aliasy, indeksowane tablice
116 nieograniczonych rozmiarów oraz arytmetykę całkowitoliczbową o
117 dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma być zgodny
118 ze standardem IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools.
119
120 %description -l pt_BR.UTF-8
121 Bash é um interpretador de comandos compatível com sh, que executa
122 comandos lidos da entrada padrão ou de um arquivo. Bash também
123 incorpora características úteis das shells Korn e C (ksh e csh). Bash
124 tem sido desenvolvido para ser uma implementação compatível com a
125 especificação IEEE Posix para shells e ferramentas (IEEE Working Group
126 1003.2).
127
128 %description -l ru.UTF-8
129 Bash - это sh-совместимый интерпретатор командного языка (shell),
130 исполняющий команды, поступающие со стандартного ввода или из файла.
131 Bash включает полезные расширения из интерпретаторов Korn и C shell
132 (ksh и csh).
133
134 Bash разрабатывается как реализация, отвечающая IEEE Posix Shell and
135 Tools specification (IEEE Working Group 1003.2).
136
137 %description -l tr.UTF-8
138 Bash standart girişten ya da bir dosyadan komut okuyup çalıştıran sh
139 uyumlu bir komut dili yorumlayıcısıdır. Aynı zamanda Korn ve C
140 kabuklarının (ksh ve csh) kullanışlı özelliklerini de kapsar. Bash,
141 IEEE Posix Kabuk ve Araç ayrıntılarına (IEEE Working Group 1003.2)
142 uyumlu bir uygulama olarak tasarlanmıştır.
143
144 %description -l uk.UTF-8
145 Bash - це sh-сумістний інтерпретатор командної мови (shell),
146 виконуючий команди зі стандартного вводу або з файла. Bash містить
147 користні розширення з інтерпретаторів Korn та C shell (ksh та csh).
148
149 Bash розроблявся як реалізація, що відповідає IEEE Posix Shell and
150 Tools specification (IEEE Working Group 1003.2).
151
152 %package static
153 Summary:        Statically linked GNU Bourne Again Shell (bash)
154 Summary(pl.UTF-8):      Statycznie skonsolidowany GNU Bourne Again Shell (bash)
155 Group:          Applications/Shells
156 Requires:       %{name} = %{version}-%{release}
157
158 %description static
159 Bash is a GNU project sh-compatible shell or command language
160 interpreter. Bash (Bourne Again shell) incorporates useful features
161 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
162 be run by bash without modification. Bash offers several improvements
163 over sh, including command line editing, unlimited size command
164 history, job control, shell functions and aliases, indexed arrays of
165 unlimited size and integer arithmetic in any base from two to 64. Bash
166 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
167 Shell and Tools standard. Bash is the default shell for Linux
168 Mandrake. You should install bash because of its popularity and power.
169 You'll probably end up using it. This package contains statically
170 linked version of bash.
171
172 %description static -l pl.UTF-8
173 Bash jest zaawansowaną powłoką, która wykonuje komendy czytane ze
174 standardowego wejścia (stdin) lub z pliku. Posiada właściwości powłok
175 Korn i C (ksh i csh). Bash jest również zaimplementowany IEEE Posix
176 Shell oraz jest zgodny ze specyfikacją - IEEE Working Group 1003.2. W
177 tym pakiecie jest wersja basha skonsolidowana statycznie.
178
179 %prep
180 %setup -q -n %{name}-%{ver} -a5
181 # official patches
182 %{?patchlevel:%patchset_patch 1 %{patchlevel}}
183 %patch0 -p1
184 %patch1 -p1
185 %patch2 -p1
186 %patch3 -p1
187 %patch4 -p1
188 %patch5 -p1
189 %patch6 -p1
190 %patch8 -p1
191 %{?with_bash_history:%patch9 -p1}
192 %patch10 -p1
193 %patch11 -p1
194 #%patch12 -p1
195
196 %build
197 cp -f /usr/share/automake/config.* support
198 %{__autoconf}
199 for mode in %{?with_static:static} shared; do
200 %configure \
201         --enable-alias \
202         --enable-help-builtin \
203         --enable-history \
204         --enable-job-control \
205         --enable-restricted \
206         --enable-readline \
207         --with-curses \
208         --enable-extended-glob \
209         --enable-dparen-arithmetic \
210         --enable-separate-helpfiles \
211         --without-bash-malloc \
212         $([ "$mode" = "static" ] && echo "--enable-static-link") \
213         --with-installed-readline
214
215 %{__make} \
216         DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
217
218 [ "$mode" = "static" ] && mv -f bash bash.static
219 done
220
221 %{?with_tests:%{__make} tests}
222
223 %install
224 rm -rf $RPM_BUILD_ROOT
225 install -d $RPM_BUILD_ROOT{/bin,/etc/skel,%{_datadir}/%{name}}
226 %{?with_bash_history:install -d $RPM_BUILD_ROOT/var/log/bash_hist}
227
228 %{__make} install \
229         DESTDIR=$RPM_BUILD_ROOT
230
231 mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
232 %{?with_static:install bash.static $RPM_BUILD_ROOT/bin}
233
234 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
235 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
236
237 for d in es fr it ja ko nl pl ; do
238         install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
239         install man/$d/* $RPM_BUILD_ROOT%{_mandir}/$d/man1
240         echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/$d/man1/rbash.1
241 done
242
243 ln -sf bash $RPM_BUILD_ROOT/bin/rbash
244
245 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
246 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
247 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
248 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
249
250 # use our bugtracker, upstream will ignore reports from this anyway
251 rm -f $RPM_BUILD_ROOT%{_bindir}/bashbug
252
253 %find_lang %{name}
254
255 %clean
256 rm -rf $RPM_BUILD_ROOT
257
258 %post   -p <lua>
259 %lua_add_etc_shells /bin/bash /bin/rbash
260 os.execute("/usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1")
261
262 %preun  -p <lua>
263 if arg[2] == 0 then
264         %lua_remove_etc_shells /bin/bash /bin/rbash
265 end
266
267 %postun -p      /sbin/postshell
268 -/usr/sbin/fix-info-dir -c %{_infodir}
269
270 %post static -p <lua>
271 %lua_add_etc_shells /bin/bash.static
272
273 %preun static -p <lua>
274 if arg[2] == 0 then
275         %lua_remove_etc_shells /bin/bash.static
276 end
277
278 %files -f %{name}.lang
279 %defattr(644,root,root,755)
280 %doc CHANGES NEWS README doc/{FAQ,INTRO}
281
282 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bashrc
283 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_logout
284 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_profile
285 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bashrc
286
287 %attr(755,root,root) /bin/bash
288 %attr(755,root,root) /bin/rbash
289
290 %{?with_bash_history:%attr(1733,root,root) %dir /var/log/bash_hist}
291 %{_infodir}/bash.info*
292 %{_mandir}/man1/*
293 %lang(es) %{_mandir}/es/man1/*
294 %lang(fr) %{_mandir}/fr/man1/*
295 %lang(it) %{_mandir}/it/man1/*
296 %lang(ja) %{_mandir}/ja/man1/*
297 %lang(ko) %{_mandir}/ko/man1/*
298 %lang(nl) %{_mandir}/nl/man1/*
299 %lang(pl) %{_mandir}/pl/man1/*
300 %dir %{_datadir}/%{name}
301 %doc %{_datadir}/%{name}/*
302
303 %if %{with static}
304 %files static
305 %defattr(644,root,root,755)
306 %attr(755,root,root) /bin/bash.static
307 %endif
This page took 0.045781 seconds and 3 git commands to generate.