unbound: update to version 1.17.1
[feed/packages.git] / utils / bash / Makefile
1 #
2 # Copyright (C) 2007-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bash
11 PKG_VERSION:=5.1.16
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/bash
16 PKG_HASH:=5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558
17
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
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/bash
29 SECTION:=utils
30 CATEGORY:=Utilities
31 SUBMENU:=Shells
32 TITLE:=The GNU Bourne Again SHell
33 DEPENDS:=+libncurses +libreadline
34 URL:=http://www.gnu.org/software/bash/
35 endef
36
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).
41 endef
42
43 define Package/bash/conffiles
44 /etc/bash.bashrc
45 /etc/bash.bash_logout
46 /etc/profile.d/sys_bashrc.sh
47 endef
48
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
52 #
53 # bash_cv_job_control_missing: Job control is needed for bash to be used as the
54 # default shell
55 #
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
59 #
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
62 #
63 # bash_cv_sys_named_pipes: Required for process substituion
64 CONFIGURE_VARS += \
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 \
71
72 # The following are some other tests that cannot run when cross-compiling
73 CONFIGURE_VARS += \
74 bash_cv_func_sigsetjmp=present \
75 bash_cv_printf_a_format=yes \
76
77 CONFIGURE_ARGS+= \
78 --with-curses \
79 --without-bash-malloc \
80 --bindir=/bin \
81 --disable-rpath \
82 --enable-direxpand-default \
83 --enable-job-control \
84 --enable-readline
85
86 define Package/bash/postinst
87 #!/bin/sh
88 grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
89 echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
90 echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
91 }
92 endef
93
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
98 $(CP) ./files/* $(1)/
99 endef
100
101 $(eval $(call BuildPackage,bash))