1 DESCRIPTION = "The GNU Bourne Again shell"
2 HOMEPAGE = "http://www.gnu.org/software/bash"
12 #PROVIDES by bash-docs
13 PROVIDES += "bash-docs "
14 RPROVIDES_bash-docs += "bash-docs "
18 RPROVIDES_bash += "bash"
19 # the PROVIDES rules is ignore "/bin/bash "
20 PROVIDES += "/bin/bash"
21 RPROVIDES_bash += "/bin/bash"
22 # the PROVIDES rules is ignore "/bin/sh "
24 RPROVIDES_bash += "/bin/sh"
30 DEPENDS += "autoconf-native"
31 DEPENDS += "bison-native"
34 chmod -Rf a+rX,u+w,g-w,o-w ${S}
36 cp ${S}/packaging/bash.manifest .
48 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
49 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
50 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
51 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
54 CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ;
55 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
56 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
57 autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
58 --target=x86_64-tizen-linux \
65 --datadir=/usr/share \
66 --includedir=/usr/include \
68 --libexecdir=/usr/libexec \
69 --localstatedir=/var \
70 --sharedstatedir=/usr/com \
71 --mandir=/usr/share/man \
72 --infodir=/usr/share/info --enable-largefile \
73 --without-bash-malloc \
79 # Recycles pids is neccessary. When bash's last fork's pid was X
80 # and new fork's pid is also X, bash has to wait for this same pid.
81 # Without Recycles pids bash will not wait.
82 make "CPPFLAGS=-D_GNU_SOURCE -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' -DRECYCLES_PIDS `getconf LFS_CFLAGS`"
91 echo export RPM_BUILD_ROOT=${D}
104 rm -f ${D}/usr/share/info/dir
105 find ${D} -regex ".*\.la$" | xargs rm -f --
106 find ${D} -regex ".*\.a$" | xargs rm -f --
108 mkdir -p ${D}/etc/bash_completion.d
110 # make manpages for bash builtins as per suggestion in DOC/README
113 /^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
116 s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
121 ' builtins.1 > man.pages
123 for i in echo pwd test kill; do
124 perl -pi -e "s,$i,,g" man.pages
125 perl -pi -e "s, , ,g" man.pages
128 install -c -m 644 builtins.1 ${D}/usr/share/man/man1/builtins.1
129 install -c -m 644 bash.1 ${D}/usr/share/man/man1/bash.1
131 for i in `cat man.pages` ; do
132 echo .so man1/builtins.1 > ${D}/usr/share/man/man1/$i.1
133 chmod 0644 ${D}/usr/share/man/man1/$i.1
137 # Link bash man page to sh so that man sh works.
138 ln -s bash.1 ${D}/usr/share/man/man1/sh.1
140 # Not for printf, true and false (conflict with coreutils)
141 rm -f ${D}//usr/share/man/man1/printf.1
142 rm -f ${D}//usr/share/man/man1/true.1
143 rm -f ${D}//usr/share/man/man1/false.1
146 ln -sf bash ./usr/bin/sh
147 rm -f ./usr/share/info/dir
149 mkdir -p ${D}/etc/skel
150 install -c -m644 ${S}/packaging/dot.bashrc ${D}/etc/skel/.bashrc
151 install -c -m644 ${S}/packaging/dot.profile ${D}/etc/skel/.bash_profile
152 LONG_BIT=$(getconf LONG_BIT)
153 mv ${D}/usr/bin/bashbug \
154 ${D}/usr/bin/bashbug-"${LONG_BIT}"
156 # Fix missing sh-bangs in example scripts (bug #225609).
158 examples/scripts/krand.bash \
159 examples/scripts/bcsh.sh \
160 examples/scripts/precedence \
161 examples/scripts/shprompt
163 cp "$script" "$script"-orig
164 echo '#!/bin/bash' > "$script"
165 cat "$script"-orig >> "$script"
169 rm -rf ${D}/usr/bin/bashbug-*
177 PACKAGES += "bash-docs"
181 bash-docs_files += "/usr/share/info"
182 bash-docs_files += "/usr/share/man"
185 bash_files += "bash.manifest"
186 bash_files += "/usr/bin/sh"
187 bash_files += "/usr/bin/bash"
188 bash_files += "/etc/skel"
189 bash_files += "/etc/bash_completion.d"
191 FILES_${PN}-docs = "${bash-docs_files}"
192 FILES_${PN} = "${bash_files}"
194 PKG_bash-docs= "bash-docs"
197 require bash-extraconf.inc