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.

100 lines
2.7 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.8
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/bash
  13. PKG_HASH:=0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be
  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. endef
  38. # Bash detects and enables certain features by runtest simple piece of code
  39. # which is not viable when doing cross compilation and default to no in many
  40. # cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
  41. #
  42. # bash_cv_job_control_missing: Job control is needed for bash to be used as the
  43. # default shell
  44. #
  45. # bash_cv_getcwd_malloc: The replacement by bash does not work well with
  46. # overlayfs. See "bash getcwd errors when running under OverlayFS"
  47. # http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
  48. #
  49. # bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
  50. # not have /dev/fd, it provides /proc/self/fd/ instead
  51. #
  52. # bash_cv_sys_named_pipes: Required for process substituion
  53. CONFIGURE_VARS += \
  54. ac_cv_rl_prefix="$(STAGING_DIR)/usr" \
  55. ac_cv_rl_version="8.0" \
  56. bash_cv_getcwd_malloc=yes \
  57. bash_cv_job_control_missing=present \
  58. bash_cv_dev_fd=whacky \
  59. bash_cv_sys_named_pipes=present \
  60. # The following are some other tests that cannot run when cross-compiling
  61. CONFIGURE_VARS += \
  62. bash_cv_func_sigsetjmp=present \
  63. bash_cv_printf_a_format=yes \
  64. CONFIGURE_ARGS+= \
  65. --with-curses \
  66. --without-bash-malloc \
  67. --bindir=/bin \
  68. --disable-rpath \
  69. --enable-direxpand-default \
  70. --enable-job-control \
  71. --enable-readline
  72. define Package/bash/postinst
  73. #!/bin/sh
  74. grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
  75. echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
  76. echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
  77. }
  78. endef
  79. define Package/bash/install
  80. $(INSTALL_DIR) $(1)/bin
  81. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
  82. $(LN) bash $(1)/bin/rbash
  83. $(CP) ./files/* $(1)/
  84. endef
  85. $(eval $(call BuildPackage,bash))