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.

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