1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 url = http://www.gnu.org/software/bash/
13 summary = Bash is short for born again shell.
16 Bash is the shell, or command language interpreter, that will appear in \
17 the GNU operating system. Bash is an sh-compatible shell that incorporates \
18 useful features from the Korn shell (ksh) and C shell (csh). It is intended \
19 to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.
22 source_dl = http://ftp.gnu.org/gnu/bash/
34 # Bash uses the RTLD_LAZY option when loading libraries. We want to use
35 # RTLD_NOW (it is defined from <dlfcn.h>:
36 sed -e "s/filename, RTLD_LAZY/filename, RTLD_NOW/" \
37 -i builtins/enable.def
39 sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/%{thisapp}|" \
43 configure_options += \
45 --without-bash-malloc \
46 --with-installed-readline
54 mkdir -pv %{BUILDROOT}/{bin,etc/profile.d,root}
57 cp -vf %{DIR_SOURCE}/dot_bash_logout %{BUILDROOT}/root/.bash_logout
58 cp -vf %{DIR_SOURCE}/dot_bash_profile %{BUILDROOT}/root/.bash_profile
59 cp -vf %{DIR_SOURCE}/dot_bashrc %{BUILDROOT}/root/.bashrc
62 cp -vf %{DIR_SOURCE}/profile.d/* %{BUILDROOT}/etc/profile.d
64 ln -svf bash %{BUILDROOT}/bin/sh
72 prerequires = coreutils
73 requires = /etc/bashrc /etc/profile
76 # Create /etc/shells, if it does not exist.
77 [ -f "/etc/shells" ] || touch /etc/shells
82 if [ "/bin/bash" = "${line}" ]; then
84 elif [ "/bin/sh" = "${line}" ]; then
89 if [ "${found_bash}" = "0" ]; then
90 echo "/bin/bash" >> /etc/shells
93 if [ "${found_sh}" = "0" ]; then
94 echo "/bin/sh" >> /etc/shells
99 [ -e "/etc/shells" ] || exit 0
101 # Remove /bin/bash and /bin/sh from /etc/shells.
103 if [ "/bin/bash" = "${line}" ]; then
105 elif [ "/bin/sh" = "${line}" ]; then
110 done < /etc/shells > /etc/shells.$$
112 mv -f /etc/shells{.$$,}
116 package %{name}-debuginfo