1
0

Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. SUBMENU:=Shells
  25. TITLE:=The GNU Bourne Again SHell
  26. DEPENDS:=+libncurses
  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 Build/Configure
  35. $(call Build/Configure/Default, \
  36. --without-bash-malloc \
  37. --bindir=/bin \
  38. )
  39. endef
  40. define Build/Compile
  41. $(MAKE) -C $(PKG_BUILD_DIR)/builtins LDFLAGS_FOR_BUILD= mkbuiltins
  42. $(MAKE) -C $(PKG_BUILD_DIR) \
  43. DESTDIR="$(PKG_INSTALL_DIR)" \
  44. SHELL="/bin/bash" \
  45. all install
  46. endef
  47. define Package/bash/postinst
  48. #!/bin/sh
  49. grep bash $${IPKG_INSTROOT}/etc/shells || \
  50. echo "/bin/bash" >> $${IPKG_INSTROOT}/etc/shells
  51. echo "/bin/rbash" >> $${IPKG_INSTROOT}/etc/shells
  52. endef
  53. define Package/bash/install
  54. $(INSTALL_DIR) $(1)/bin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
  56. ln -sf bash $(1)/bin/rbash
  57. endef
  58. $(eval $(call BuildPackage,bash))