]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - bash/bash.nm
bash: Fix creation of man pages.
[people/amarx/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
daf84637 8release = 10
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
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
9118c7ca 55 mkdir -pv %{BUILDROOT}/{etc/profile.d,root}
802ea3af
MT
56
57 # Bash startup files
58 cp -vf %{DIR_SOURCE}/dot_bash_logout %{BUILDROOT}/root/.bash_logout
59 cp -vf %{DIR_SOURCE}/dot_bash_profile %{BUILDROOT}/root/.bash_profile
60 cp -vf %{DIR_SOURCE}/dot_bashrc %{BUILDROOT}/root/.bashrc
61
62 # /etc/profile.d
63 cp -vf %{DIR_SOURCE}/profile.d/* %{BUILDROOT}/etc/profile.d
64
9118c7ca 65 ln -svf bash %{BUILDROOT}%{bindir}/sh
802ea3af
MT
66 end
67end
68
69packages
70 package %{name}
cd711c7b
MT
71 groups += Base Build
72
774bad77 73 requires
57b0ba3a 74 coreutils
774bad77
MT
75 /etc/bashrc
76 /etc/profile
77 end
84292e3e 78
9118c7ca
MT
79 provides
80 /bin/bash
81 /bin/sh
82 end
83
84 conflicts
85 filesystem < 002
86 end
87
0e13ce8c 88 script posttransin
84292e3e
MT
89 # Create /etc/shells, if it does not exist.
90 [ -f "/etc/shells" ] || touch /etc/shells
91
c84c1f1a
MT
92 found_sh=0
93 found_bash=0
94 while read line; do
95 if [ "/bin/bash" = "${line}" ]; then
96 found_bash=1
97 elif [ "/bin/sh" = "${line}" ]; then
98 found_sh=1
99 fi
100 done < /etc/shells
101
102 if [ "${found_bash}" = "0" ]; then
84292e3e
MT
103 echo "/bin/bash" >> /etc/shells
104 fi
105
c84c1f1a 106 if [ "${found_sh}" = "0" ]; then
84292e3e
MT
107 echo "/bin/sh" >> /etc/shells
108 fi
109 end
110
111 script postun
112 [ -e "/etc/shells" ] || exit 0
113
114 # Remove /bin/bash and /bin/sh from /etc/shells.
115 while read line; do
c84c1f1a 116 if [ "/bin/bash" = "${line}" ]; then
84292e3e 117 continue
c84c1f1a 118 elif [ "/bin/sh" = "${line}" ]; then
84292e3e
MT
119 continue
120 fi
121
122 echo "${line}"
123 done < /etc/shells > /etc/shells.$$
124
125 mv -f /etc/shells{.$$,}
126 end
802ea3af 127 end
1f9bc2f0
MT
128
129 package %{name}-debuginfo
130 template DEBUGINFO
131 end
802ea3af 132end