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
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@GNU
/bash
16 PKG_HASH
:=0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be
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
:=http
://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
48 # Bash detects and enables certain features by runtest simple piece of code
49 # which is not viable when doing cross compilation and default to no in many
50 # cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
52 # bash_cv_job_control_missing: Job control is needed for bash to be used as the
55 # bash_cv_getcwd_malloc: The replacement by bash does not work well with
56 # overlayfs. See "bash getcwd errors when running under OverlayFS"
57 # http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
59 # bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
60 # not have /dev/fd, it provides /proc/self/fd/ instead
62 # bash_cv_sys_named_pipes: Required for process substituion
64 ac_cv_rl_prefix
="$(STAGING_DIR)/usr" \
65 ac_cv_rl_version
="8.0" \
66 bash_cv_getcwd_malloc
=yes \
67 bash_cv_job_control_missing
=present \
68 bash_cv_dev_fd
=whacky \
69 bash_cv_sys_named_pipes
=present \
71 # The following are some other tests that cannot run when cross-compiling
73 bash_cv_func_sigsetjmp
=present \
74 bash_cv_printf_a_format
=yes \
78 --without-bash-malloc \
81 --enable-direxpand-default \
82 --enable-job-control \
85 define Package
/bash
/postinst
87 grep
-q bash
"$${IPKG_INSTROOT}/etc/shells" ||
{
88 echo
/bin
/bash
>> "$${IPKG_INSTROOT}/etc/shells"
89 echo
/bin
/rbash
>> "$${IPKG_INSTROOT}/etc/shells"
93 define Package
/bash
/install
94 $(INSTALL_DIR
) $(1)/bin
95 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/bin
/bash
$(1)/bin
/
96 $(LN
) bash
$(1)/bin
/rbash
100 $(eval
$(call BuildPackage
,bash
))