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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30