]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - bash/bash.nm
bash: Does not need coreutils prior to installation.
[people/arne_f/ipfire-3.x.git] / bash / bash.nm
CommitLineData
166a6c21 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
166a6c21
MT
4###############################################################################
5
802ea3af
MT
6name = bash
7version = 4.2
57b0ba3a 8release = 8
166a6c21 9
cd711c7b 10groups = System/Tools
802ea3af
MT
11url = http://www.gnu.org/software/bash/
12license = GPLv2+
13summary = Bash is short for born again shell.
166a6c21 14
802ea3af 15description
166a6c21
MT
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.
802ea3af
MT
20end
21
22source_dl = http://ftp.gnu.org/gnu/bash/
23
24build
25 requires
26 autoconf
27 automake
28 bison
29 ncurses-devel
30 readline-devel
31 end
32
33 prepare_cmds
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
38
39 sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/%{thisapp}|" \
40 Makefile.in
41 end
42
43 configure_options += \
44 --bindir=/bin \
45 --without-bash-malloc \
46 --with-installed-readline
47
48 # Test hangs forever
49 #def test
50 # make tests
51 #end
52
53 install_cmds
54 mkdir -pv %{BUILDROOT}/{bin,etc/profile.d,root}
55
56 # Bash startup files
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
60
61 # /etc/profile.d
62 cp -vf %{DIR_SOURCE}/profile.d/* %{BUILDROOT}/etc/profile.d
63
64 ln -svf bash %{BUILDROOT}/bin/sh
65 end
66end
67
68packages
69 package %{name}
cd711c7b
MT
70 groups += Base Build
71
774bad77 72 requires
57b0ba3a 73 coreutils
774bad77
MT
74 /etc/bashrc
75 /etc/profile
76 end
84292e3e 77
0e13ce8c 78 script posttransin
84292e3e
MT
79 # Create /etc/shells, if it does not exist.
80 [ -f "/etc/shells" ] || touch /etc/shells
81
c84c1f1a
MT
82 found_sh=0
83 found_bash=0
84 while read line; do
85 if [ "/bin/bash" = "${line}" ]; then
86 found_bash=1
87 elif [ "/bin/sh" = "${line}" ]; then
88 found_sh=1
89 fi
90 done < /etc/shells
91
92 if [ "${found_bash}" = "0" ]; then
84292e3e
MT
93 echo "/bin/bash" >> /etc/shells
94 fi
95
c84c1f1a 96 if [ "${found_sh}" = "0" ]; then
84292e3e
MT
97 echo "/bin/sh" >> /etc/shells
98 fi
99 end
100
101 script postun
102 [ -e "/etc/shells" ] || exit 0
103
104 # Remove /bin/bash and /bin/sh from /etc/shells.
105 while read line; do
c84c1f1a 106 if [ "/bin/bash" = "${line}" ]; then
84292e3e 107 continue
c84c1f1a 108 elif [ "/bin/sh" = "${line}" ]; then
84292e3e
MT
109 continue
110 fi
111
112 echo "${line}"
113 done < /etc/shells > /etc/shells.$$
114
115 mv -f /etc/shells{.$$,}
116 end
802ea3af 117 end
1f9bc2f0
MT
118
119 package %{name}-debuginfo
120 template DEBUGINFO
121 end
802ea3af 122end