5 Summary: The GNU Bourne Again shell
6 Url: http://www.gnu.org/software/bash
8 Source0: ftp://ftp.gnu.org/gnu/bash/%{name}-%{version}.tar.gz
9 BuildRequires: autoconf
15 The GNU Bourne Again shell (Bash) is a shell or command language
16 interpreter that is compatible with the Bourne shell (sh). Bash
17 incorporates useful features from the Korn shell (ksh) and the C shell
18 (csh). Most sh scripts can be run by bash without modification.
25 %configure --enable-largefile \
26 --without-bash-malloc \
32 # Recycles pids is neccessary. When bash's last fork's pid was X
33 # and new fork's pid is also X, bash has to wait for this same pid.
34 # Without Recycles pids bash will not wait.
35 make "CPPFLAGS=-D_GNU_SOURCE -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' -DRECYCLES_PIDS `getconf LFS_CFLAGS`"
42 mkdir -p %{buildroot}/etc
44 #mkdir -p %{buildroot}/%{_bindir}
45 #mv %{buildroot}/bin/* %{buildroot}/%{_bindir}/
47 # make manpages for bash builtins as per suggestion in DOC/README
50 /^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
53 s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
58 ' builtins.1 > man.pages
59 for i in echo pwd test kill; do
60 perl -pi -e "s,$i,,g" man.pages
61 perl -pi -e "s, , ,g" man.pages
64 install -c -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
66 for i in `cat man.pages` ; do
67 echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
68 chmod 0644 %{buildroot}%{_mandir}/man1/$i.1
72 # Link bash man page to sh so that man sh works.
73 ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
75 # Not for printf, true and false (conflict with coreutils)
76 rm -f %{buildroot}/%{_mandir}/man1/printf.1
77 rm -f %{buildroot}/%{_mandir}/man1/true.1
78 rm -f %{buildroot}/%{_mandir}/man1/false.1
81 ln -sf bash ./usr/bin/sh
82 rm -f .%{_infodir}/dir
84 mkdir -p %{buildroot}%{_sysconfdir}/skel
85 #install -c -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/skel/.bashrc
86 #install -c -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/skel/.bash_profile
87 #install -c -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bash_logout
88 LONG_BIT=$(getconf LONG_BIT)
89 mv %{buildroot}%{_bindir}/bashbug \
90 %{buildroot}%{_bindir}/bashbug-"${LONG_BIT}"
92 # Fix missing sh-bangs in example scripts (bug #225609).
94 examples/scripts/krand.bash \
95 examples/scripts/bcsh.sh \
96 examples/scripts/precedence \
97 examples/scripts/shprompt
99 cp "$script" "$script"-orig
100 echo '#!/bin/bash' > "$script"
101 cat "$script"-orig >> "$script"
105 rm -rf %{buildroot}%{_bindir}/bashbug-*
114 f = io.open("/etc/shells", "r");
117 f = io.open("/etc/shells", "w");
133 f = io.open("/etc/shells", "a");
136 f:write("/bin/bash\n")
145 if [ "$1" = 0 ]; then
146 /bin/grep -v '^/bin/bash$' < /etc/shells | \
147 /bin/grep -v '^/bin/sh$' > /etc/shells.new
148 /bin/mv /etc/shells.new /etc/shells