/[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 57023 - (show annotations) (download)
Tue Feb 22 20:38:07 2011 UTC (13 years, 1 month ago) by ahmad
Original Path: cauldron/bash/current/SPECS/bash.spec
File size: 6317 byte(s)
- remove a redundant sed command line (spotted by Maarten Vanraes)

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

  ViewVC Help
Powered by ViewVC 1.1.30