bluez-tools: Add package bluezetools
[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.8
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/bash
16 PKG_HASH:=0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be
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 endef
47
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
51 #
52 # bash_cv_job_control_missing: Job control is needed for bash to be used as the
53 # default shell
54 #
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
58 #
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
61 #
62 # bash_cv_sys_named_pipes: Required for process substituion
63 CONFIGURE_VARS += \
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 \
70
71 # The following are some other tests that cannot run when cross-compiling
72 CONFIGURE_VARS += \
73 bash_cv_func_sigsetjmp=present \
74 bash_cv_printf_a_format=yes \
75
76 CONFIGURE_ARGS+= \
77 --with-curses \
78 --without-bash-malloc \
79 --bindir=/bin \
80 --disable-rpath \
81 --enable-direxpand-default \
82 --enable-job-control \
83 --enable-readline
84
85 define Package/bash/postinst
86 #!/bin/sh
87 grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
88 echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
89 echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
90 }
91 endef
92
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
97 $(CP) ./files/* $(1)/
98 endef
99
100 $(eval $(call BuildPackage,bash))