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.

73 lines
1.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. BASE_VERSION:=4.3
  9. PKG_NAME:=bash
  10. PKG_VERSION:=$(BASE_VERSION).42
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@GNU/bash
  14. PKG_MD5SUM:=81348932d5da294953e15d4814c74dd1
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_VERSION)
  16. PKG_LICENSE:=GPL-3.0+
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
  19. PKG_CHECK_FORMAT_SECURITY:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/bash
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=The GNU Bourne Again SHell
  25. DEPENDS:=+libncurses
  26. URL:=http://www.gnu.org/software/bash/
  27. endef
  28. define Package/bash/description
  29. Bash is an sh-compatible command language interpreter that executes
  30. commands read from the standard input or from a file. Bash also
  31. incorporates useful features from the Korn and C shells (ksh and csh).
  32. endef
  33. define Build/Configure
  34. $(call Build/Configure/Default, \
  35. --without-bash-malloc \
  36. --bindir=/bin \
  37. )
  38. endef
  39. define Build/Compile
  40. $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
  41. $(MAKE) -C $(PKG_BUILD_DIR) \
  42. DESTDIR="$(PKG_INSTALL_DIR)" \
  43. SHELL="/bin/bash" \
  44. all install
  45. endef
  46. define Package/bash/postinst
  47. #!/bin/sh
  48. grep bash $${IPKG_INSTROOT}/etc/shells || \
  49. echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
  50. echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
  51. endef
  52. define Package/bash/install
  53. $(INSTALL_DIR) $(1)/bin
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
  55. ln -sf bash $(1)/bin/rbash
  56. endef
  57. $(eval $(call BuildPackage,bash))