/[packages]/updates/infra_2/bash/current/SPECS/bash.spec
ViewVC logotype

Contents of /updates/infra_2/bash/current/SPECS/bash.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 731561 - (show annotations) (download)
Sun Sep 28 23:27:12 2014 UTC (6 years, 9 months ago) by pterjan
File size: 10586 byte(s)
Restore old group for documentation
1 %define i18ndate 20010626
2 %define patchlevel 49
3 %define rel 1
4
5 Name: bash
6 Version: 4.2
7 Release: %mkrel %{patchlevel}.%{rel}
8 Summary: The GNU Bourne Again shell (bash)
9 Group: Shells
10 License: GPLv2+
11 URL: http://www.gnu.org/software/bash/bash.html
12 Source0: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz
13 Source1: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz.sig
14 Source2: ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.bz2
15 Source3: dot-bashrc
16 Source4: dot-bash_profile
17 Source5: dot-bash_logout
18 Source6: alias.sh
19 Source7: bashrc
20 Source8: profile.d-bash
21
22 # Official upstream patches
23 # from ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/
24 Patch01: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-001
25 Patch02: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-002
26 Patch03: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-003
27 Patch04: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-004
28 Patch05: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-005
29 Patch06: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-006
30 Patch07: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-007
31 Patch08: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-008
32 Patch09: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-009
33 Patch10: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-010
34 Patch11: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-011
35 Patch12: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-012
36 Patch13: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-013
37 Patch14: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-014
38 Patch15: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-015
39 Patch16: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-016
40 Patch17: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-017
41 Patch18: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-018
42 Patch19: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-019
43 Patch20: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-020
44 Patch21: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-021
45 Patch22: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-022
46 Patch23: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-023
47 Patch24: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-024
48 Patch25: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-025
49 Patch26: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-026
50 Patch27: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-027
51 Patch28: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-028
52 Patch29: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-029
53 Patch30: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-030
54 Patch31: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-031
55 Patch32: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-032
56 Patch33: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-033
57 Patch34: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-034
58 Patch35: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-035
59 Patch36: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-036
60 Patch37: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-037
61 Patch38: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-038
62 Patch39: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-039
63 Patch40: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-040
64 Patch41: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-041
65 Patch42: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-042
66 Patch43: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-043
67 Patch44: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-044
68 Patch45: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-045
69 Patch46: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-046
70 Patch47: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-047
71 Patch48: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-048
72 Patch49: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-049
73
74 # Mageia/Mandriva patches
75 Patch1001: bash-2.02-security.patch
76 # ensure profile is read (Redhat)
77 Patch1003: bash-4.0-profile.patch
78 Patch1004: bash-2.05b-readlinefixes.patch
79 Patch1006: bash-2.04-compat.patch
80 #https://bugzilla.novell.com/attachment.cgi?id=67684
81 Patch1010: bash-3.1-extended_quote.patch
82 Patch1020: bash-strcoll-bug.diff
83 Patch1023: bash-2.05b-checkwinsize.patch
84 Patch1024: bash-3.2-lzma-copmpletion.patch
85 # (fc) 3.2-12mdv fix format string
86 Patch1026: bash-3.2-format-security.patch
87
88 BuildRequires: autoconf2.5
89 BuildRequires: bison
90 BuildRequires: groff
91 BuildRequires: libtermcap-devel
92 BuildRequires: texinfo
93 # explicit file provides
94 Provides: /bin/sh
95
96 %description
97 Bash is a GNU project sh-compatible shell or command language
98 interpreter. Bash (Bourne Again shell) incorporates useful features
99 from the Korn shell (ksh) and the C shell (csh). Most sh scripts
100 can be run by bash without modification.
101
102 Bash offers several improvements over sh, including command line
103 editing, unlimited size command history, job control, shell
104 functions and aliases, indexed arrays of unlimited size and
105 integer arithmetic in any base from two to 64. Bash is ultimately
106 intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and
107 Tools standard.
108
109 %package doc
110 Summary: Documentation for the GNU Bourne Again shell (bash)
111 Group: Books/Computer books
112 Requires: %{name} = %{version}-%{release}
113 Obsoletes: bash3-doc < 3.2.48
114 Provides: bash3-doc
115
116 %description doc
117 This package provides documentation for GNU Bourne Again shell (bash).
118
119 %prep
120 %setup -q -a 2
121 mv doc/README .
122
123 %patch1 -p0
124 %patch2 -p0
125 %patch3 -p0
126 %patch4 -p0
127 %patch5 -p0
128 %patch6 -p0
129 %patch7 -p0
130 %patch8 -p0
131 %patch9 -p0
132 %patch10 -p0
133 %patch11 -p0
134 %patch12 -p0
135 %patch13 -p0
136 %patch14 -p0
137 %patch15 -p0
138 %patch16 -p0
139 %patch17 -p0
140 %patch18 -p0
141 %patch19 -p0
142 %patch20 -p0
143 %patch21 -p0
144 %patch22 -p0
145 %patch23 -p0
146 %patch24 -p0
147 %patch25 -p0
148 %patch26 -p0
149 %patch27 -p0
150 %patch28 -p0
151 %patch29 -p0
152 %patch30 -p0
153 %patch31 -p0
154 %patch32 -p0
155 %patch33 -p0
156 %patch34 -p0
157 %patch35 -p0
158 %patch36 -p0
159 %patch37 -p0
160 %patch38 -p0
161 %patch39 -p0
162 %patch40 -p0
163 %patch41 -p0
164 %patch42 -p0
165 %patch43 -p0
166 %patch44 -p0
167 %patch45 -p0
168 %patch46 -p0
169 %patch47 -p0
170 %patch48 -p0
171 %patch49 -p0
172
173 %patch1001 -p1 -b .security
174 %patch1003 -p1 -b .profile
175 # 20060126 warly obsolete exept maybe for the replacement of @ by kH, this will have to be checked
176 #%patch1004 -p1 -b .readline
177 %patch1006 -p1 -b .compat
178 %patch1010 -p0 -b .quote
179 %patch1020 -p1 -b .strcoll_bugx
180 %patch1023 -p1 -b .checkwinsize
181 %patch1024 -p1 -b .lzma
182 %patch1026 -p1 -b .format-security
183
184 %build
185
186 export CFLAGS="%{optflags} -Os"
187 export CXXFLAGS=$CFLAGS
188 export DEBUGGER_START_FILE="%{_datadir}/bashdb/bashdb-main.inc"
189
190 %configure2_5x \
191 --enable-command-timing \
192 --disable-rpath \
193 --enable-history \
194 --enable-job-control \
195 --enable-multibyte \
196 --enable-readline \
197 --with-installed-readline \
198 --without-gnu-malloc \
199 --without-bash-malloc \
200 --disable-strict-posix-default \
201 --enable-select \
202 --enable-prompt-string-decoding \
203 --enable-process-substitution \
204 --enable-alias \
205 --enable-bang-history \
206 --enable-coprocesses \
207 --enable-directory-stack \
208 --enable-brace-expansion
209
210 %make
211
212 # all tests must pass
213 %check
214 make check
215
216 %install
217 rm -rf %{buildroot}
218
219 %makeinstall_std
220
221 # beurk
222 rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/ %{buildroot}%{_datadir}/locale/en@quot/
223
224 #Sucks
225 chmod +w doc/texinfo.tex
226 chmod 755 examples/misc/aliasconv.*
227 chmod 755 examples/misc/cshtobash
228 chmod 755 %{buildroot}%{_bindir}/bashbug
229
230 # Take out irritating ^H's from the documentation
231 mkdir tmp_doc
232 for i in `/bin/ls doc/` ; \
233 do cat doc/$i > tmp_doc/$i ; \
234 cat tmp_doc/$i | perl -p -e 's/.//g' > doc/$i ; \
235 rm tmp_doc/$i ; \
236 done
237 rmdir tmp_doc
238
239 mkdir -p %{buildroot}/bin
240 pushd %{buildroot} && mv usr/bin/bash bin/bash && popd
241 pushd %{buildroot}/bin && ln -s bash sh && popd
242 pushd %{buildroot}/bin && ln -sf bash bash3 && popd
243
244 # make builtins.1 and rbash.1 with bash.1 in place (fix mdv#51379)
245 pushd doc
246 mkdir tmp_fix_so
247 cd tmp_fix_so
248 cp ../builtins.1 ../rbash.1 .
249 sed -e '/^.if \\n(zZ=1 .ig zZ/,/^.zZ/d' ../bash.1 > bash.1
250 soelim builtins.1 > ../builtins.1
251 sed -e '/^.if \\n(zY=1 .ig zY/,/^.zY/d' ../bash.1 > bash.1
252 soelim rbash.1 > ../rbash.1
253 popd
254 rm -rf doc/tmp_fix_so
255
256 # make manpages for bash builtins as per suggestion in DOC/README
257 cd doc
258 sed -e '
259 /^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
260 /^\.SH NAME/d
261 s/^bash, //
262 s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
263 s/,//g
264 b
265 }
266 d
267 ' builtins.1 > man.pages
268 install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
269
270 install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1
271
272 for i in `cat man.pages` ; do
273 echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
274 done
275
276 # now turn man.pages into a filelist for the man subpackage
277
278 cat man.pages |tr -s ' ' '\n' |sed '
279 1i\
280 %defattr(0644,root,root,0755)
281 s:^:%{_mandir}/man1/:
282 s/$/.1%{_extension}/
283 ' > ../man.pages
284
285 perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages
286
287 mkdir -p %{buildroot}%{_sysconfdir}/skel
288 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
289 install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc
290 install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile
291 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout
292 install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh
293 install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc
294 install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh
295
296 ln -s bash %{buildroot}/bin/rbash
297
298 # These're provided by other packages
299 rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1}
300
301 cd ..
302
303 install -m 644 doc/bash.info %{buildroot}%{_infodir}/
304
305 %find_lang %{name}
306
307 # merges list
308 cat man.pages %{name}.lang > files.list
309
310 %clean
311 rm -rf %{buildroot}
312
313 %files -f files.list
314 %defattr(-,root,root)
315 %doc README
316 %config(noreplace) %{_sysconfdir}/skel/.b*
317 %{_sysconfdir}/profile.d/60alias.sh
318 %{_sysconfdir}/profile.d/95bash-extras.sh
319 %config(noreplace) %{_sysconfdir}/bashrc
320 /bin/rbash
321 /bin/bash
322 /bin/bash3
323 /bin/sh
324 %{_infodir}/bash.info*
325 %{_mandir}/man1/bash.1*
326 %{_mandir}/man1/rbash.1*
327 %{_mandir}/man1/builtins.1*
328 %{_mandir}/man1/bashbug.1*
329 %{_bindir}/bashbug
330
331 %files doc
332 %defattr(-,root,root)
333 %doc COMPAT NEWS NOTES POSIX CHANGES
334 %doc examples
335 %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt

  ViewVC Help
Powered by ViewVC 1.1.28