1 |
%define i18ndate 20010626 |
2 |
|
3 |
Name: bash |
4 |
Version: 4.1 |
5 |
Release: %mkrel 6 |
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 |
Patch10: bash41-001 |
28 |
Patch11: bash41-002 |
29 |
Patch12: bash41-003 |
30 |
Patch13: bash41-004 |
31 |
Patch14: bash41-005 |
32 |
# none |
33 |
Patch1000: bash-strcoll-bug.diff |
34 |
Patch1003: bash-2.05b-checkwinsize.patch |
35 |
Patch1004: bash-3.2-lzma-copmpletion.patch |
36 |
# (fc) 3.2-12mdv speedup bash completion (Fedora) (Fedora bug #475229) |
37 |
Patch1005: bash-3.2-speed-completion.patch |
38 |
# (fc) 3.2-12mdv fix format string |
39 |
Patch1006: bash-3.2-format-security.patch |
40 |
BuildRequires: autoconf2.5 |
41 |
BuildRequires: bison |
42 |
BuildRequires: groff |
43 |
BuildRequires: libtermcap-devel |
44 |
BuildRequires: texinfo |
45 |
Conflicts: etcskel <= 1.63-11mdk |
46 |
Conflicts: fileutils < 4.1-5mdk |
47 |
Conflicts: setup < 2.7.4-1mdv |
48 |
Obsoletes: bash3 < 3.2.48 |
49 |
Provides: bash3 |
50 |
# explicit file provides |
51 |
Provides: /bin/sh |
52 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
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 |
%patch10 -p0 -b .001 |
87 |
%patch11 -p0 -b .002 |
88 |
%patch12 -p0 -b .003 |
89 |
%patch13 -p0 -b .004 |
90 |
%patch14 -p0 -b .005 |
91 |
%patch1000 -p1 -b .strcoll_bugx |
92 |
%patch1003 -p1 -b .checkwinsize |
93 |
%patch1004 -p1 -b .lzma |
94 |
%patch1006 -p1 -b .format-security |
95 |
%patch100 -p0 -b .quote |
96 |
|
97 |
echo %{version} > _distribution |
98 |
echo %{release} > _patchlevel |
99 |
sed -i -e s/mdk// _patchlevel |
100 |
|
101 |
%build |
102 |
#libtoolize --copy --force |
103 |
|
104 |
#export CFLAGS="$RPM_OPT_FLAGS" |
105 |
#export CONFIGURE_TOP=".." |
106 |
export DEBUGGER_START_FILE="%{_datadir}/bashdb/bashdb-main.inc" |
107 |
|
108 |
%configure2_5x \ |
109 |
--disable-command-timing \ |
110 |
--disable-rpath \ |
111 |
--enable-history \ |
112 |
--enable-job-control \ |
113 |
--enable-multibyte \ |
114 |
--enable-readline \ |
115 |
--with-installed-readline \ |
116 |
--with-gnu-malloc \ |
117 |
--without-bash-malloc |
118 |
|
119 |
%make |
120 |
#CFLAGS="$RPM_OPT_FLAGS" |
121 |
# all tests must pass |
122 |
%check |
123 |
make check |
124 |
|
125 |
%install |
126 |
rm -rf %{buildroot} |
127 |
|
128 |
%makeinstall_std |
129 |
|
130 |
# beurk |
131 |
rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/ %{buildroot}%{_datadir}/locale/en@quot/ |
132 |
|
133 |
#Sucks |
134 |
chmod +w doc/texinfo.tex |
135 |
chmod 755 examples/misc/aliasconv.* |
136 |
chmod 755 examples/misc/cshtobash |
137 |
chmod 755 %{buildroot}%{_bindir}/bashbug |
138 |
|
139 |
# Take out irritating ^H's from the documentation |
140 |
mkdir tmp_doc |
141 |
for i in `/bin/ls doc/` ; \ |
142 |
do cat doc/$i > tmp_doc/$i ; \ |
143 |
cat tmp_doc/$i | perl -p -e 's/.//g' > doc/$i ; \ |
144 |
rm tmp_doc/$i ; \ |
145 |
done |
146 |
rmdir tmp_doc |
147 |
|
148 |
mkdir -p %{buildroot}/bin |
149 |
pushd %{buildroot} && mv usr/bin/bash bin/bash && popd |
150 |
pushd %{buildroot}/bin && ln -s bash sh && popd |
151 |
pushd %{buildroot}/bin && ln -sf bash bash3 && popd |
152 |
|
153 |
# make builtins.1 and rbash.1 with bash.1 in place (fix mdv#51379) |
154 |
pushd doc |
155 |
mkdir tmp_fix_so |
156 |
cd tmp_fix_so |
157 |
cp ../builtins.1 ../rbash.1 . |
158 |
sed -e '/^.if \\n(zZ=1 .ig zZ/,/^.zZ/d' ../bash.1 > bash.1 |
159 |
soelim builtins.1 > ../builtins.1 |
160 |
sed -e '/^.if \\n(zY=1 .ig zY/,/^.zY/d' ../bash.1 > bash.1 |
161 |
soelim rbash.1 > ../rbash.1 |
162 |
popd |
163 |
|
164 |
# make manpages for bash builtins as per suggestion in DOC/README |
165 |
cd doc |
166 |
sed -e ' |
167 |
/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{ |
168 |
/^\.SH NAME/d |
169 |
s/^bash, // |
170 |
s/\\- bash built-in commands, see \\fBbash\\fR(1)$// |
171 |
s/,//g |
172 |
b |
173 |
} |
174 |
d |
175 |
' builtins.1 > man.pages |
176 |
install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1 |
177 |
|
178 |
install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1 |
179 |
|
180 |
for i in `cat man.pages` ; do |
181 |
echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1 |
182 |
done |
183 |
|
184 |
# now turn man.pages into a filelist for the man subpackage |
185 |
|
186 |
cat man.pages |tr -s ' ' '\n' |sed ' |
187 |
1i\ |
188 |
%defattr(0644,root,root,0755) |
189 |
s:^:%{_mandir}/man1/: |
190 |
s/$/.1%{_extension}/ |
191 |
' > ../man.pages |
192 |
|
193 |
perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages |
194 |
|
195 |
mkdir -p %{buildroot}%{_sysconfdir}/skel |
196 |
mkdir -p %{buildroot}%{_sysconfdir}/profile.d |
197 |
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc |
198 |
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile |
199 |
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout |
200 |
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh |
201 |
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc |
202 |
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh |
203 |
|
204 |
ln -s bash %{buildroot}/bin/rbash |
205 |
|
206 |
# These're provided by other packages |
207 |
rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1} |
208 |
rm -f %{buildroot}%{_datadir}/locale/ru/LC_MESSAGES/bash.mo |
209 |
cd .. |
210 |
|
211 |
install -m 644 doc/bash.info %{buildroot}%{_infodir}/ |
212 |
|
213 |
%find_lang %{name} |
214 |
|
215 |
# merges list |
216 |
cat man.pages %{name}.lang > files.list |
217 |
|
218 |
%clean |
219 |
rm -rf %{buildroot} |
220 |
|
221 |
%files -f files.list |
222 |
%defattr(-,root,root) |
223 |
%doc README |
224 |
%config(noreplace) %{_sysconfdir}/skel/.b* |
225 |
%{_sysconfdir}/profile.d/60alias.sh |
226 |
%{_sysconfdir}/profile.d/95bash-extras.sh |
227 |
%config(noreplace) %{_sysconfdir}/bashrc |
228 |
/bin/rbash |
229 |
/bin/bash |
230 |
/bin/bash3 |
231 |
/bin/sh |
232 |
%{_infodir}/bash.info* |
233 |
%{_mandir}/man1/bash.1* |
234 |
%{_mandir}/man1/rbash.1* |
235 |
%{_mandir}/man1/builtins.1* |
236 |
%{_mandir}/man1/bashbug.1* |
237 |
%{_bindir}/bashbug |
238 |
|
239 |
%files doc |
240 |
%defattr(-,root,root) |
241 |
%doc COMPAT NEWS NOTES POSIX CHANGES |
242 |
%doc examples |
243 |
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt |
244 |
|
245 |
|