]> git.pld-linux.org Git - packages/bash.git/blob - bash.spec
- changed [ -x ... ] && to [ ! -x ... ] ||
[packages/bash.git] / bash.spec
1 Summary:        GNU Bourne Again Shell (bash)
2 Summary(de):    GNU Bourne Again Shell (bash)
3 Summary(fr):    Le shell Bourne Again de GNU
4 Summary(pl):    GNU Bourne Again Shell (bash)
5 Summary(tr):    GNU Bourne Again Shell (bash)
6 Name:           bash
7 Version:        2.04
8 Release:        3
9 Group:          Shells
10 Group(pl):      Pow³oki
11 License:        GPL
12 Source0:        ftp://prep.ai.mit.edu/pub/gnu/bash/%{name}-%{version}.tar.gz
13 Source1:        bashrc
14 Source2:        bash-skel-.bash_logout
15 Source3:        bash-skel-.bash_profile
16 Source4:        bash-skel-.bashrc
17 Source5:        bash-skel_pl-.bashrc
18 Patch0:         bash-paths.patch
19 Patch1:         bash-fixes.patch
20 Patch2:         bash-security.patch
21 Patch3:         bash-autoconf.patch
22 Patch4:         bash-info.patch
23 Patch5:         bash-profile.patch
24 BuildRequires:  ncurses-static >= 5.0
25 BuildRequires:  readline-static >= 4.1
26 BuildRequires:  glibc-static
27 PreReq:         grep
28 PreReq:         fileutils
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Obsoletes:      bash2
31 Obsoletes:      bash2-doc
32
33 %description
34 Bash is a GNU project sh-compatible shell or command language
35 interpreter. Bash (Bourne Again shell) incorporates useful features
36 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
37 be run by bash without modification. Bash offers several improvements
38 over sh, including command line editing, unlimited size command
39 history, job control, shell functions and aliases, indexed arrays of
40 unlimited size and integer arithmetic in any base from two to 64. Bash
41 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
42 Shell and Tools standard. Bash is the default shell for Linux
43 Mandrake. You should install bash because of its popularity and power.
44 You'll probably end up using it.
45
46 %description -l de
47 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
48 GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
49 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
50 sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
51 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
52 Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
53 Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
54 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
55 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
56 und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
57 Mandrake.
58
59 %description -l fr
60 Bash est un shell (interpréteur de commande) du projet GNU, compatible
61 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
62 nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
63 plupart des scripts sh sont exécutables sans modifications. Bash
64 comprend nombre d'améliorations par rapport à sh : édition de la ligne
65 de commande, historique illimité, contrôle des processus
66 d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
67 illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
68 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
69 and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
70 l'installer du fait de sa puissance et de sa popularité. Vous finirez
71 probablement par l'utiliser.
72
73 %description -l pl
74 Bash jest zaawansowanym shellem, który wykonuje komendy czytane ze
75 standardowego wej¶cia (stdin) lub z pliku. Posiada w³a¶ciwo¶ci shelli
76 Korn i C (ksh i csh). Bash ma równie¿ zaimplementowany IEEE Posix
77 Shell oraz jest zgodny ze specyfikacj± - IEEE Working Group 1003.2.
78
79 %description -l tr
80 Bash standart giriþten ya da bir dosyadan komut okuyup çalýþtýran sh
81 uyumlu bir komut dili yorumlayýcýsýdýr. Ayný zamanda Korn ve C
82 kabuklarýnýn (ksh ve csh) kullanýþlý özelliklerini de kapsar. Bash,
83 IEEE Posix Kabuk ve Araç ayrýntýlarýna (IEEE Working Group 1003.2)
84 uyumlu bir uygulama olarak tasarlanmýþtýr.
85
86 %package static
87 Summary:        Staticly linked GNU Bourne Again Shell (bash)
88 Summary(pl):    Statycznie zlinkowany GNU Bourne Again Shell (bash)
89 Group:          Shells
90 Group(pl):      Pow³oki
91 Requires:       %{name}
92 PreReq:         grep
93 PreReq:         fileutils
94
95 %description static
96 Bash is a GNU project sh-compatible shell or command language
97 interpreter. Bash (Bourne Again shell) incorporates useful features
98 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
99 be run by bash without modification. Bash offers several improvements
100 over sh, including command line editing, unlimited size command
101 history, job control, shell functions and aliases, indexed arrays of
102 unlimited size and integer arithmetic in any base from two to 64. Bash
103 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
104 Shell and Tools standard. Bash is the default shell for Linux
105 Mandrake. You should install bash because of its popularity and power.
106 You'll probably end up using it. This packege contains staticly linked
107 version of bash.
108
109 %description static -l pl
110 Bash jest zaawansowanym shellem, który wykonuje komendy czytane ze
111 standardowego wej¶cia (stdin) lub z pliku. Posiada w³a¶ciwo¶ci shelli
112 Korn i C (ksh i csh). Bash ma równie¿ zaimplementowany IEEE Posix
113 Shell oraz jest zgodny ze specyfikacj± - IEEE Working Group 1003.2. W
114 tym pakiecie jest statycznie zlinkowany bash.
115
116 %prep
117 %setup  -q
118 %patch0 -p1
119 %patch1 -p1
120 %patch2 -p1
121 %patch3 -p1
122 %patch4 -p1
123 %patch5 -p1
124
125 echo %{version} > _distribution
126 echo %{release} > _patchlevel
127
128 %build
129 LDFLAGS="-s"; export LDFLAGS
130 %configure \
131         --enable-alias \
132         --enable-help-builtin \
133         --enable-history \
134         --enable-job-control \
135         --enable-restricted \
136         --enable-readline \
137         --with-curses \
138         --enable-extended-glob \
139         --enable-dparen-arithmetic \
140         --enable-static-link \
141         --with-installed-readline
142
143 make TERMCAP_LIB="-ltinfo"
144 mv bash bash.static
145 make TERMCAP_LIB="-ltinfo" STATIC_LD=""
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT{%{_mandir},%{_infodir}} \
150         $RPM_BUILD_ROOT/{bin,etc/skel/{C,pl}}
151
152 make install \
153         bindir=$RPM_BUILD_ROOT%{_bindir} \
154         infodir=$RPM_BUILD_ROOT%{_infodir} \
155         mandir=$RPM_BUILD_ROOT%{_mandir} 
156
157 mv $RPM_BUILD_ROOT%{_bindir}/bash       $RPM_BUILD_ROOT/bin
158 install -s bash.static  $RPM_BUILD_ROOT/bin
159
160 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
161 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
162
163 ln -sf bash $RPM_BUILD_ROOT/bin/rbash
164
165 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/C/.bash_logout
166 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/C/.bash_profile
167 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/C/.bashrc
168 install %{SOURCE5} $RPM_BUILD_ROOT/etc/skel/pl/.bashrc
169
170 gzip -9nf $RPM_BUILD_ROOT{%{_infodir}/bash.info,%{_mandir}/man1/*} \
171         NEWS README doc/{FAQ,INTRO}
172
173 %post
174 if [ ! -f /etc/shells ]; then
175         echo "/bin/bash" > /etc/shells
176         echo "/bin/rbash" >> /etc/shells
177 else
178         if ! grep '^/bin/bash$' /etc/shells > /dev/null; then
179                 echo "/bin/bash" >> /etc/shells
180         fi
181         if ! grep '^/bin/rbash$' /etc/shells > /dev/null; then
182                 echo "/bin/rbash" >> /etc/shells
183         fi
184 fi
185
186 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
187
188 %post static
189 if [ ! -f /etc/shells ]; then
190         echo "/bin/bash.static" > /etc/shells
191 else
192         if ! grep '^/bin/bash.static$' /etc/shells > /dev/null; then
193                 echo "/bin/bash.static" >> /etc/shells
194         fi
195 fi
196
197 %preun
198 if [ $1 = 0 ]; then
199         grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
200         mv /etc/shells.new /etc/shells
201 fi
202
203 %preun static
204 if [ $1 = 0 ]; then
205         grep -v /bin/bash.static /etc/shells > /etc/shells.new
206         mv /etc/shells.new /etc/shells
207 fi
208
209 %postun
210 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
211
212 %clean
213 rm -rf $RPM_BUILD_ROOT
214
215 %files
216 %defattr(644,root,root,755)
217 %doc {NEWS,README}.gz doc/{FAQ,INTRO}.gz
218
219 %config %{_sysconfdir}/bashrc
220
221 /etc/skel/C/.bash_logout
222 /etc/skel/C/.bash_profile
223 /etc/skel/C/.bashrc
224 %lang(pl) /etc/skel/pl/.bashrc
225
226 %attr(755,root,root) /bin/bash
227 %attr(755,root,root) /bin/rbash
228 %attr(755,root,root) %{_bindir}/bashbug
229
230 %{_infodir}/bash.info.gz
231 %{_mandir}/man1/*
232
233 %files static
234 %defattr(644,root,root,755)
235 %attr(755,root,root) /bin/bash.static
This page took 0.125592 seconds and 4 git commands to generate.