2 # Copyright (C) 2007-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@GNU
/bash
16 PKG_HASH
:=c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8
18 PKG_MAINTAINER
:=Marcel Denia
<naoir@gmx.net
>
19 PKG_LICENSE
:=GPL-3.0
-or-later
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:gnu
:bash
26 include $(INCLUDE_DIR
)/package.mk
32 TITLE
:=The GNU Bourne Again SHell
33 DEPENDS
:=+libncurses
+libreadline
34 URL
:=https
://www.gnu.org
/software
/bash
/
37 define Package
/bash
/description
38 Bash is an sh-compatible command language interpreter that executes
39 commands read from the standard input or from a file. Bash also
40 incorporates useful features from the Korn and C shells
(ksh and csh
).
43 define Package
/bash
/conffiles
46 /etc
/profile.d
/sys_bashrc.sh
49 # Bash detects and enables certain features by runtest simple piece of code
50 # which is not viable when doing cross compilation and default to no in many
51 # cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
53 # bash_cv_job_control_missing: Job control is needed for bash to be used as the
56 # bash_cv_getcwd_malloc: The replacement by bash does not work well with
57 # overlayfs. See "bash getcwd errors when running under OverlayFS"
58 # http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
60 # bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
61 # not have /dev/fd, it provides /proc/self/fd/ instead
63 # bash_cv_sys_named_pipes: Required for process substituion
65 ac_cv_rl_prefix
="$(STAGING_DIR)/usr" \
66 ac_cv_rl_version
="8.0" \
67 bash_cv_getcwd_malloc
=yes \
68 bash_cv_job_control_missing
=present \
69 bash_cv_dev_fd
=whacky \
70 bash_cv_sys_named_pipes
=present \
72 # The following are some other tests that cannot run when cross-compiling
74 bash_cv_func_sigsetjmp
=present \
75 bash_cv_printf_a_format
=yes \
79 --without-bash-malloc \
82 --enable-direxpand-default \
83 --enable-job-control \
86 define Package
/bash
/postinst
88 grep
-q bash
"$${IPKG_INSTROOT}/etc/shells" ||
{
89 echo
/bin
/bash
>> "$${IPKG_INSTROOT}/etc/shells"
90 echo
/bin
/rbash
>> "$${IPKG_INSTROOT}/etc/shells"
94 define Package
/bash
/install
95 $(INSTALL_DIR
) $(1)/bin
96 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/bin
/bash
$(1)/bin
/
97 $(LN
) bash
$(1)/bin
/rbash
101 $(eval
$(call BuildPackage
,bash
))