/[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 249520 - (show annotations) (download)
Tue May 29 21:45:53 2012 UTC (11 years, 10 months ago) by blino
Original Path: cauldron/bash/current/SPECS/bash.spec
File size: 7279 byte(s)
rename patches to match upstream numbers

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

  ViewVC Help
Powered by ViewVC 1.1.30