/[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 96666 - (show annotations) (download)
Mon May 9 17:37:39 2011 UTC (12 years, 10 months ago) by ahmad
Original Path: cauldron/bash/current/SPECS/bash.spec
File size: 7268 byte(s)
- Patchlevel 10
1 %define i18ndate 20010626
2 %define patchlevel 10
3
4 Name: bash
5 Version: 4.2
6 Release: %mkrel 5
7 Summary: The GNU Bourne Again shell (bash)
8 Group: Shells
9 License: GPLv2+
10 URL: http://www.gnu.org/software/bash/bash.html
11 Source0: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz
12 Source1: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz.sig
13 Source2: ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.bz2
14 Source3: dot-bashrc
15 Source4: dot-bash_profile
16 Source5: dot-bash_logout
17 Source6: alias.sh
18 Source7: bashrc
19 Source8: profile.d-bash
20 Patch1: bash-2.02-security.patch
21 # ensure profile is read (Redhat)
22 Patch3: bash-4.0-profile.patch
23 Patch4: bash-2.05b-readlinefixes.patch
24 Patch6: bash-2.04-compat.patch
25 #https://bugzilla.novell.com/attachment.cgi?id=67684
26 Patch100: bash-3.1-extended_quote.patch
27
28 # Official upstream patches
29 # from ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/
30 Patch11: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-001
31 Patch12: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-002
32 Patch13: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-003
33 Patch14: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-004
34 Patch15: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-005
35 Patch16: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-006
36 Patch17: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-007
37 Patch18: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-008
38 Patch19: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-009
39 Patch20: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-010
40
41 Patch1000: bash-strcoll-bug.diff
42 Patch1003: bash-2.05b-checkwinsize.patch
43 Patch1004: bash-3.2-lzma-copmpletion.patch
44 # (fc) 3.2-12mdv fix format string
45 Patch1006: bash-3.2-format-security.patch
46 BuildRequires: autoconf2.5
47 BuildRequires: bison
48 BuildRequires: groff
49 BuildRequires: libtermcap-devel
50 BuildRequires: texinfo
51 # explicit file provides
52 Provides: /bin/sh
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
58 can be run by bash without modification.
59
60 Bash offers several improvements over sh, including command line
61 editing, unlimited size command history, job control, shell
62 functions and aliases, indexed arrays of unlimited size and
63 integer arithmetic in any base from two to 64. Bash is ultimately
64 intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and
65 Tools standard.
66
67 %package doc
68 Summary: Documentation for the GNU Bourne Again shell (bash)
69 Group: Books/Computer books
70 Requires: %{name} = %{version}-%{release}
71 Obsoletes: bash3-doc < 3.2.48
72 Provides: bash3-doc
73
74 %description doc
75 This package provides documentation for GNU Bourne Again shell (bash).
76
77 %prep
78 %setup -q -a 2
79 mv doc/README .
80
81 %patch1 -p1 -b .security
82 %patch3 -p1 -b .profile
83 # 20060126 warly obsolete exept maybe for the replacement of @ by kH, this will have to be checked
84 #%patch4 -p1 -b .readline
85 %patch6 -p1 -b .compat
86 %patch1000 -p1 -b .strcoll_bugx
87 %patch1003 -p1 -b .checkwinsize
88 %patch1004 -p1 -b .lzma
89 %patch1006 -p1 -b .format-security
90 %patch100 -p0 -b .quote
91
92 %patch11 -p0
93 %patch12 -p0
94 %patch13 -p0
95 %patch14 -p0
96 %patch15 -p0
97 %patch16 -p0
98 %patch17 -p0
99 %patch18 -p0
100
101 echo %{version}.%{patchlevel} > _distribution
102 echo %{release} > _patchlevel
103
104 %build
105
106 export CFLAGS="%{optflags} -Os"
107 export CXXFLAGS=$CFLAGS
108 export DEBUGGER_START_FILE="%{_datadir}/bashdb/bashdb-main.inc"
109
110 %configure2_5x \
111 --enable-command-timing \
112 --disable-rpath \
113 --enable-history \
114 --enable-job-control \
115 --enable-multibyte \
116 --enable-readline \
117 --with-installed-readline \
118 --without-gnu-malloc \
119 --without-bash-malloc \
120 --disable-strict-posix-default \
121 --enable-select \
122 --enable-prompt-string-decoding \
123 --enable-process-substitution \
124 --enable-alias \
125 --enable-bang-history \
126 --enable-coprocesses \
127 --enable-directory-stack \
128 --enable-brace-expansion
129
130 %make
131
132 # all tests must pass
133 %check
134 make check
135
136 %install
137 rm -rf %{buildroot}
138
139 %makeinstall_std
140
141 # beurk
142 rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/ %{buildroot}%{_datadir}/locale/en@quot/
143
144 #Sucks
145 chmod +w doc/texinfo.tex
146 chmod 755 examples/misc/aliasconv.*
147 chmod 755 examples/misc/cshtobash
148 chmod 755 %{buildroot}%{_bindir}/bashbug
149
150 # Take out irritating ^H's from the documentation
151 mkdir tmp_doc
152 for i in `/bin/ls doc/` ; \
153 do cat doc/$i > tmp_doc/$i ; \
154 cat tmp_doc/$i | perl -p -e 's/.//g' > doc/$i ; \
155 rm tmp_doc/$i ; \
156 done
157 rmdir tmp_doc
158
159 mkdir -p %{buildroot}/bin
160 pushd %{buildroot} && mv usr/bin/bash bin/bash && popd
161 pushd %{buildroot}/bin && ln -s bash sh && popd
162 pushd %{buildroot}/bin && ln -sf bash bash3 && popd
163
164 # make builtins.1 and rbash.1 with bash.1 in place (fix mdv#51379)
165 pushd doc
166 mkdir tmp_fix_so
167 cd tmp_fix_so
168 cp ../builtins.1 ../rbash.1 .
169 sed -e '/^.if \\n(zZ=1 .ig zZ/,/^.zZ/d' ../bash.1 > bash.1
170 soelim builtins.1 > ../builtins.1
171 sed -e '/^.if \\n(zY=1 .ig zY/,/^.zY/d' ../bash.1 > bash.1
172 soelim rbash.1 > ../rbash.1
173 popd
174
175 # make manpages for bash builtins as per suggestion in DOC/README
176 cd doc
177 sed -e '
178 /^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
179 /^\.SH NAME/d
180 s/^bash, //
181 s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
182 s/,//g
183 b
184 }
185 d
186 ' builtins.1 > man.pages
187 install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
188
189 install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1
190
191 for i in `cat man.pages` ; do
192 echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
193 done
194
195 # now turn man.pages into a filelist for the man subpackage
196
197 cat man.pages |tr -s ' ' '\n' |sed '
198 1i\
199 %defattr(0644,root,root,0755)
200 s:^:%{_mandir}/man1/:
201 s/$/.1%{_extension}/
202 ' > ../man.pages
203
204 perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages
205
206 mkdir -p %{buildroot}%{_sysconfdir}/skel
207 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
208 install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc
209 install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile
210 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout
211 install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh
212 install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc
213 install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh
214
215 ln -s bash %{buildroot}/bin/rbash
216
217 # These're provided by other packages
218 rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1}
219
220 cd ..
221
222 install -m 644 doc/bash.info %{buildroot}%{_infodir}/
223
224 %find_lang %{name}
225
226 # merges list
227 cat man.pages %{name}.lang > files.list
228
229 %clean
230 rm -rf %{buildroot}
231
232 %files -f files.list
233 %defattr(-,root,root)
234 %doc README
235 %config(noreplace) %{_sysconfdir}/skel/.b*
236 %{_sysconfdir}/profile.d/60alias.sh
237 %{_sysconfdir}/profile.d/95bash-extras.sh
238 %config(noreplace) %{_sysconfdir}/bashrc
239 /bin/rbash
240 /bin/bash
241 /bin/bash3
242 /bin/sh
243 %{_infodir}/bash.info*
244 %{_mandir}/man1/bash.1*
245 %{_mandir}/man1/rbash.1*
246 %{_mandir}/man1/builtins.1*
247 %{_mandir}/man1/bashbug.1*
248 %{_bindir}/bashbug
249
250 %files doc
251 %defattr(-,root,root)
252 %doc COMPAT NEWS NOTES POSIX CHANGES
253 %doc examples
254 %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt

  ViewVC Help
Powered by ViewVC 1.1.30