You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.5 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=bash
  9. PKG_VERSION:=4.4.18
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/bash
  13. PKG_HASH:=604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23
  14. PKG_LICENSE:=GPL-3.0+
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/bash
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. SUBMENU:=Shells
  23. TITLE:=The GNU Bourne Again SHell
  24. DEPENDS:=+libncurses +libreadline
  25. URL:=http://www.gnu.org/software/bash/
  26. endef
  27. define Package/bash/description
  28. Bash is an sh-compatible command language interpreter that executes
  29. commands read from the standard input or from a file. Bash also
  30. incorporates useful features from the Korn and C shells (ksh and csh).
  31. endef
  32. # Bash detects and enables certain features by runtest simple piece of code
  33. # which is not viable when doing cross compilation and default to no in many
  34. # cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
  35. #
  36. # bash_cv_job_control_missing: Job control is needed for bash to be used as the
  37. # default shell
  38. #
  39. # bash_cv_getcwd_malloc: The replacement by bash does not work well with
  40. # overlayfs. See "bash getcwd errors when running under OverlayFS"
  41. # http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
  42. #
  43. # bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
  44. # not have /dev/fd, it provides /proc/self/fd/ instead
  45. #
  46. # bash_cv_sys_named_pipes: Required for process substituion
  47. CONFIGURE_VARS += \
  48. ac_cv_rl_prefix="$(STAGING_DIR)/usr" \
  49. ac_cv_rl_version="7.0" \
  50. bash_cv_getcwd_malloc=yes \
  51. bash_cv_job_control_missing=present \
  52. bash_cv_dev_fd=whacky \
  53. bash_cv_sys_named_pipes=present \
  54. # The following are some other tests that cannot run when cross-compiling
  55. CONFIGURE_VARS += \
  56. bash_cv_func_sigsetjmp=present \
  57. bash_cv_printf_a_format=yes \
  58. CONFIGURE_ARGS+= \
  59. --with-installed-readline="$(STAGING_DIR)/usr" \
  60. --with-curses \
  61. --without-bash-malloc \
  62. --bindir=/bin \
  63. --disable-rpath \
  64. define Package/bash/postinst
  65. #!/bin/sh
  66. grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
  67. echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
  68. echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
  69. }
  70. endef
  71. define Package/bash/install
  72. $(INSTALL_DIR) $(1)/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
  74. $(LN) bash $(1)/bin/rbash
  75. endef
  76. $(eval $(call BuildPackage,bash))