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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 249518 - (show annotations) (download)
Tue May 29 21:42:31 2012 UTC (11 years, 10 months ago) by blino
Original Path: cauldron/bash/current/SPECS/bash.spec
File size: 7290 byte(s)
fix running install section multiple times
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 rm -rf doc/tmp_fix_so
175
176 # make manpages for bash builtins as per suggestion in DOC/README
177 cd doc
178 sed -e '
179 /^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
180 /^\.SH NAME/d
181 s/^bash, //
182 s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
183 s/,//g
184 b
185 }
186 d
187 ' builtins.1 > man.pages
188 install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
189
190 install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1
191
192 for i in `cat man.pages` ; do
193 echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
194 done
195
196 # now turn man.pages into a filelist for the man subpackage
197
198 cat man.pages |tr -s ' ' '\n' |sed '
199 1i\
200 %defattr(0644,root,root,0755)
201 s:^:%{_mandir}/man1/:
202 s/$/.1%{_extension}/
203 ' > ../man.pages
204
205 perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages
206
207 mkdir -p %{buildroot}%{_sysconfdir}/skel
208 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
209 install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc
210 install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile
211 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout
212 install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh
213 install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc
214 install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh
215
216 ln -s bash %{buildroot}/bin/rbash
217
218 # These're provided by other packages
219 rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1}
220
221 cd ..
222
223 install -m 644 doc/bash.info %{buildroot}%{_infodir}/
224
225 %find_lang %{name}
226
227 # merges list
228 cat man.pages %{name}.lang > files.list
229
230 %clean
231 rm -rf %{buildroot}
232
233 %files -f files.list
234 %defattr(-,root,root)
235 %doc README
236 %config(noreplace) %{_sysconfdir}/skel/.b*
237 %{_sysconfdir}/profile.d/60alias.sh
238 %{_sysconfdir}/profile.d/95bash-extras.sh
239 %config(noreplace) %{_sysconfdir}/bashrc
240 /bin/rbash
241 /bin/bash
242 /bin/bash3
243 /bin/sh
244 %{_infodir}/bash.info*
245 %{_mandir}/man1/bash.1*
246 %{_mandir}/man1/rbash.1*
247 %{_mandir}/man1/builtins.1*
248 %{_mandir}/man1/bashbug.1*
249 %{_bindir}/bashbug
250
251 %files doc
252 %defattr(-,root,root)
253 %doc COMPAT NEWS NOTES POSIX CHANGES
254 %doc examples
255 %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt

  ViewVC Help
Powered by ViewVC 1.1.30