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/
36 # Bash uses the RTLD_LAZY option when loading libraries. We want to use
37 # RTLD_NOW (it is defined from <dlfcn.h>:
38 sed -e "s/filename, RTLD_LAZY/filename, RTLD_NOW/" \
39 -i builtins/enable.def
41 sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/%{thisapp}|" \
45 configure_options += \
46 --without-bash-malloc \
47 --with-installed-readline
55 mkdir -pv %{BUILDROOT}%{sysconfdir}/{profile.d,skel}
56 mkdir -pv %{BUILDROOT}/root
59 cp -vf %{DIR_SOURCE}/dot_bash_logout %{BUILDROOT}%{sysconfdir}/skel/.bash_logout
60 cp -vf %{DIR_SOURCE}/dot_bash_profile %{BUILDROOT}%{sysconfdir}/skel/.bash_profile
61 cp -vf %{DIR_SOURCE}/dot_bashrc %{BUILDROOT}%{sysconfdir}/skel/.bashrc
63 cp -vf %{DIR_SOURCE}/dot_bash_logout %{BUILDROOT}/root/.bash_logout
64 cp -vf %{DIR_SOURCE}/dot_bash_profile %{BUILDROOT}/root/.bash_profile
65 cp -vf %{DIR_SOURCE}/dot_bashrc %{BUILDROOT}/root/.bashrc
68 cp -vf %{DIR_SOURCE}/profile.d/* %{BUILDROOT}/etc/profile.d
70 ln -svf bash %{BUILDROOT}%{bindir}/sh
94 # Create /etc/shells, if it does not exist.
95 [ -f "/etc/shells" ] || touch /etc/shells
100 if [ "/bin/bash" = "${line}" ]; then
102 elif [ "/bin/sh" = "${line}" ]; then
107 if [ "${found_bash}" = "0" ]; then
108 echo "/bin/bash" >> /etc/shells
111 if [ "${found_sh}" = "0" ]; then
112 echo "/bin/sh" >> /etc/shells
117 [ -e "/etc/shells" ] || exit 0
119 # Remove /bin/bash and /bin/sh from /etc/shells.
121 if [ "/bin/bash" = "${line}" ]; then
123 elif [ "/bin/sh" = "${line}" ]; then
128 done < /etc/shells > /etc/shells.$$
130 mv -f /etc/shells{.$$,}
134 package %{name}-debuginfo