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.

93 lines
2.6 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:=5.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/bash
  13. PKG_HASH:=b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
  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="8.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. --enable-direxpand-default \
  65. --enable-job-control \
  66. --enable-readline
  67. define Package/bash/postinst
  68. #!/bin/sh
  69. grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
  70. echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
  71. echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
  72. }
  73. endef
  74. define Package/bash/install
  75. $(INSTALL_DIR) $(1)/bin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
  77. $(LN) bash $(1)/bin/rbash
  78. endef
  79. $(eval $(call BuildPackage,bash))