]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - bash/bash.nm
perl-XML-SAX-Base: New package.
[people/ms/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
7a5553dc 8release = 11
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
7a5553dc
SS
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
166a6c21 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
9118c7ca 29 filesystem >= 002
802ea3af
MT
30 ncurses-devel
31 readline-devel
daf84637 32 texinfo
802ea3af
MT
33 end
34
35 prepare_cmds
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
40
41 sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/%{thisapp}|" \
42 Makefile.in
43 end
44
45 configure_options += \
802ea3af
MT
46 --without-bash-malloc \
47 --with-installed-readline
48
49 # Test hangs forever
50 #def test
51 # make tests
52 #end
53
54 install_cmds
7a5553dc
SS
55 mkdir -pv %{BUILDROOT}%{sysconfdir}/{profile.d,skel}
56 mkdir -pv %{BUILDROOT}/root
802ea3af
MT
57
58 # Bash startup files
7a5553dc
SS
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
62
802ea3af
MT
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
66
67 # /etc/profile.d
68 cp -vf %{DIR_SOURCE}/profile.d/* %{BUILDROOT}/etc/profile.d
69
9118c7ca 70 ln -svf bash %{BUILDROOT}%{bindir}/sh
802ea3af
MT
71 end
72end
73
74packages
75 package %{name}
cd711c7b
MT
76 groups += Base Build
77
774bad77 78 requires
57b0ba3a 79 coreutils
774bad77
MT
80 /etc/bashrc
81 /etc/profile
82 end
84292e3e 83
9118c7ca
MT
84 provides
85 /bin/bash
86 /bin/sh
87 end
88
89 conflicts
90 filesystem < 002
91 end
92
0e13ce8c 93 script posttransin
84292e3e
MT
94 # Create /etc/shells, if it does not exist.
95 [ -f "/etc/shells" ] || touch /etc/shells
96
c84c1f1a
MT
97 found_sh=0
98 found_bash=0
99 while read line; do
100 if [ "/bin/bash" = "${line}" ]; then
101 found_bash=1
102 elif [ "/bin/sh" = "${line}" ]; then
103 found_sh=1
104 fi
105 done < /etc/shells
106
107 if [ "${found_bash}" = "0" ]; then
84292e3e
MT
108 echo "/bin/bash" >> /etc/shells
109 fi
110
c84c1f1a 111 if [ "${found_sh}" = "0" ]; then
84292e3e
MT
112 echo "/bin/sh" >> /etc/shells
113 fi
114 end
115
116 script postun
117 [ -e "/etc/shells" ] || exit 0
118
119 # Remove /bin/bash and /bin/sh from /etc/shells.
120 while read line; do
c84c1f1a 121 if [ "/bin/bash" = "${line}" ]; then
84292e3e 122 continue
c84c1f1a 123 elif [ "/bin/sh" = "${line}" ]; then
84292e3e
MT
124 continue
125 fi
126
127 echo "${line}"
128 done < /etc/shells > /etc/shells.$$
129
130 mv -f /etc/shells{.$$,}
131 end
802ea3af 132 end
1f9bc2f0
MT
133
134 package %{name}-debuginfo
135 template DEBUGINFO
136 end
802ea3af 137end