]> git.pld-linux.org Git - packages/bash.git/blob - bash.spec
1442aae2f248433e6d4a4eb2ab8bedd5b778b571
[packages/bash.git] / bash.spec
1 #
2 # Conditional build:
3 # _without_static - don't build static version
4
5 Summary:        GNU Bourne Again Shell (bash)
6 Summary(fr):    Le shell Bourne Again de GNU
7 Summary(pl):    Pow³oka GNU Bourne Again Shell (bash)
8 Name:           bash
9 Version:        2.05a
10 Release:        3
11 License:        GPL
12 Group:          Applications/Shells
13 Source0:        ftp://prep.ai.mit.edu/pub/gnu/bash/%{name}-%{version}.tar.gz
14 Source1:        %{name}rc
15 Source2:        %{name}-skel-.bash_logout
16 Source3:        %{name}-skel-.bash_profile
17 Source4:        %{name}-skel-.bashrc
18 Source5:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
19 Patch0:         %{name}-paths.patch
20 Patch1:         %{name}-security.patch
21 Patch2:         %{name}-autoconf.patch
22 Patch3:         %{name}-info.patch
23 Patch4:         %{name}-profile.patch
24 Patch5:         %{name}-requires.patch
25 Patch6:         %{name}-compat.patch
26 Patch7:         %{name}-shellfunc.patch
27 Patch8:         %{name}-DESTDIR.patch
28 Patch9:         %{name}-rlimit_locks.patch
29 Patch10:        %{name}-sighup.patch
30 Patch11:        %{name}-tmpfile.patch
31 Patch13:        %{name}-%{version}-service_completion.patch
32
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 BuildRequires:  bison
36 BuildRequires:  glibc-devel >= 2.2
37 BuildRequires:  ncurses-devel >= 5.2
38 BuildRequires:  readline-devel >= 4.2
39 BuildRequires:  texinfo
40 %if %{!?_without_static:1}%{?_without_static:0}
41 # Require static library only for static build
42 BuildRequires:  glibc-static >= 2.2
43 BuildRequires:  ncurses-static >= 5.2
44 BuildRequires:  readline-static >= 4.2
45 %endif
46 Requires(post): grep
47 Requires(preun):        grep
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Obsoletes:      bash-doc
50 Obsoletes:      bash2
51 Obsoletes:      bash2-doc
52 Obsoletes:      etcskel
53
54 %description
55 Bash is a GNU project sh-compatible shell or command language
56 interpreter. Bash (Bourne Again shell) incorporates useful features
57 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
58 be run by bash without modification. Bash offers several improvements
59 over sh, including command line editing, unlimited size command
60 history, job control, shell functions and aliases, indexed arrays of
61 unlimited size and integer arithmetic in any base from two to 64. Bash
62 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
63 Shell and Tools standard. Bash is the default shell for Linux
64 Mandrake. You should install bash because of its popularity and power.
65 You'll probably end up using it.
66
67 %description -l de
68 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
69 GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
70 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
71 sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
72 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
73 Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
74 Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
75 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
76 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
77 und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
78 Mandrake.
79
80 %description -l fr
81 Bash est un shell (interpréteur de commande) du projet GNU, compatible
82 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
83 nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
84 plupart des scripts sh sont exécutables sans modifications. Bash
85 comprend nombre d'améliorations par rapport à sh : édition de la ligne
86 de commande, historique illimité, contrôle des processus
87 d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
88 illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
89 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
90 and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
91 l'installer du fait de sa puissance et de sa popularité. Vous finirez
92 probablement par l'utiliser.
93
94 %description -l pl
95 Bash (Bourne Again SHell) jest projektem GNU pow³oki kompatybilnej z
96 sh oraz interpretera jêzyka poleceñ. Posiada u¿yteczne w³a¶ciwo¶ci
97 pow³ok Korn (ksh) i C (csh). Wiêkszo¶æ skryptów sh mo¿e byæ
98 uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeñ w
99 stusunku do sh, w³±czaj±c edycjê linii poleceñ, nieograniczony rozmiar
100 historii poleceñ, funkcje i aliasy, indeksowane tablice
101 nieograniczonych rozmiarów oraz arytmetykê ca³kowitoliczbow± o
102 dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma byæ zgodny
103 ze standardem IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools.
104
105 %description -l tr
106 Bash standart giriþten ya da bir dosyadan komut okuyup çalýþtýran sh
107 uyumlu bir komut dili yorumlayýcýsýdýr. Ayný zamanda Korn ve C
108 kabuklarýnýn (ksh ve csh) kullanýþlý özelliklerini de kapsar. Bash,
109 IEEE Posix Kabuk ve Araç ayrýntýlarýna (IEEE Working Group 1003.2)
110 uyumlu bir uygulama olarak tasarlanmýþtýr.
111
112 %package static
113 Summary:        Statically linked GNU Bourne Again Shell (bash)
114 Summary(pl):    Statycznie zlinkowany GNU Bourne Again Shell (bash)
115 Group:          Applications/Shells
116 Requires:       %{name}
117 Requires(post): grep
118 Requires(preun):        grep
119
120 %description static
121 Bash is a GNU project sh-compatible shell or command language
122 interpreter. Bash (Bourne Again shell) incorporates useful features
123 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
124 be run by bash without modification. Bash offers several improvements
125 over sh, including command line editing, unlimited size command
126 history, job control, shell functions and aliases, indexed arrays of
127 unlimited size and integer arithmetic in any base from two to 64. Bash
128 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
129 Shell and Tools standard. Bash is the default shell for Linux
130 Mandrake. You should install bash because of its popularity and power.
131 You'll probably end up using it. This package contains statically
132 linked version of bash.
133
134 %description static -l pl
135 Bash jest zaawansowanym shellem, który wykonuje komendy czytane ze
136 standardowego wej¶cia (stdin) lub z pliku. Posiada w³a¶ciwo¶ci pow³ok
137 Korn i C (ksh i csh). Bash ma równie¿ zaimplementowany IEEE Posix
138 Shell oraz jest zgodny ze specyfikacj± - IEEE Working Group 1003.2. W
139 tym pakiecie jest statycznie zlinkowany bash.
140
141 %prep
142 %setup -q -a5
143 %patch0 -p1
144 %patch1 -p1
145 %patch2 -p1
146 %patch3 -p1
147 %patch4 -p1
148 %patch5 -p1
149 %patch6 -p1
150 %patch7 -p1
151 %patch8 -p1
152 %patch9 -p1
153 %patch10 -p1
154 %patch13 -p1
155
156 echo %{version} > _distribution
157 echo %{release} > _patchlevel
158
159 %build
160 autoconf
161 cp -f /usr/share/automake/config.* support/
162 for mode in %{!?_without_static:static} shared; do
163 %configure \
164         --enable-alias \
165         --enable-help-builtin \
166         --enable-history \
167         --enable-job-control \
168         --enable-restricted \
169         --enable-readline \
170         --with-curses \
171         --enable-extended-glob \
172         --enable-dparen-arithmetic \
173         `[ "$mode" = "static" ] && echo "--enable-static-link"` \
174         --with-installed-readline
175
176 %{__make} DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
177
178 [ "$mode" = "static" ] && mv -f bash bash.static || :
179 done
180
181 %install
182 rm -rf $RPM_BUILD_ROOT
183 install -d $RPM_BUILD_ROOT/{bin,etc/skel}
184
185 %{__make} install DESTDIR=$RPM_BUILD_ROOT
186
187 mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
188 %{?_without_static:#}install    bash.static $RPM_BUILD_ROOT/bin
189
190 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
191 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
192
193 for d in es fr it ja ko nl pl ; do
194         install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
195         install man/$d/* $RPM_BUILD_ROOT%{_mandir}/$d/man1
196         echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/$d/man1/rbash.1
197 done
198
199 ln -sf bash $RPM_BUILD_ROOT/bin/rbash
200
201 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
202 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
203 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
204
205 gzip -9nf NEWS README doc/{FAQ,INTRO}
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post
211 if [ ! -f /etc/shells ]; then
212         echo "/bin/bash" > /etc/shells
213         echo "/bin/rbash" >> /etc/shells
214 else
215         if ! grep -q '^/bin/bash$' /etc/shells; then
216                 echo "/bin/bash" >> /etc/shells
217         fi
218         if ! grep -q '^/bin/rbash$' /etc/shells; then
219                 echo "/bin/rbash" >> /etc/shells
220         fi
221 fi
222
223 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
224
225 %post static
226 if [ ! -f /etc/shells ]; then
227         echo "/bin/bash.static" > /etc/shells
228 else
229         if ! grep -q '^/bin/bash.static$' /etc/shells; then
230                 echo "/bin/bash.static" >> /etc/shells
231         fi
232 fi
233
234 %preun
235 if [ "$1" = "0" ]; then
236         grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
237         mv -f /etc/shells.new /etc/shells
238 fi
239
240 %preun static
241 if [ "$1" = "0" ]; then
242         grep -v /bin/bash.static /etc/shells > /etc/shells.new
243         mv -f /etc/shells.new /etc/shells
244 fi
245
246 %postun
247 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
248
249 %files
250 %defattr(644,root,root,755)
251 %doc {NEWS,README}.gz doc/{FAQ,INTRO}.gz
252
253 %config %verify(not md5 size mtime) %{_sysconfdir}/bashrc
254 %config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bash_logout
255 %config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bash_profile
256 %config(noreplace,missingok) %verify(not md5 size mtime) /etc/skel/.bashrc
257
258 %attr(755,root,root) /bin/bash
259 %attr(755,root,root) /bin/rbash
260 %attr(755,root,root) %{_bindir}/bashbug
261
262 %{_infodir}/bash.info.gz
263 %{_mandir}/man1/*
264 %lang(es) %{_mandir}/es/man1/*
265 %lang(fr) %{_mandir}/fr/man1/*
266 %lang(it) %{_mandir}/it/man1/*
267 %lang(ja) %{_mandir}/ja/man1/*
268 %lang(ko) %{_mandir}/ko/man1/*
269 %lang(nl) %{_mandir}/nl/man1/*
270 %lang(pl) %{_mandir}/pl/man1/*
271
272 %{?_without_static:#}%files static
273 %{?_without_static:#}%defattr(644,root,root,755)
274 %{?_without_static:#}%attr(755,root,root) /bin/bash.static
This page took 0.069662 seconds and 3 git commands to generate.