dash.mk 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ################################################################################
  2. #
  3. # dash
  4. #
  5. ################################################################################
  6. DASH_VERSION = 0.5.11.5
  7. DASH_SITE = http://gondor.apana.org.au/~herbert/dash/files
  8. DASH_LICENSE = BSD-3-Clause, GPL-2.0+ (mksignames.c)
  9. DASH_LICENSE_FILES = COPYING
  10. # We're patching configure.ac
  11. DASH_AUTORECONF = YES
  12. # dash does not build in parallel
  13. DASH_MAKE = $(MAKE1)
  14. ifeq ($(BR2_PACKAGE_LIBEDIT),y)
  15. DASH_DEPENDENCIES += libedit host-pkgconf
  16. DASH_CONF_OPTS += --with-libedit
  17. DASH_CONF_ENV += LIBS=`pkg-config --libs libedit`
  18. # Enable line editing, Emacs style
  19. define DASH_INSTALL_PROFILE
  20. mkdir -p $(TARGET_DIR)/etc/profile.d
  21. echo 'set -E' > $(TARGET_DIR)/etc/profile.d/dash.sh
  22. endef
  23. DASH_POST_INSTALL_TARGET_HOOKS += DASH_INSTALL_PROFILE
  24. else
  25. DASH_CONF_OPTS += --without-libedit
  26. endif
  27. ifeq ($(BR2_STATIC_LIBS),)
  28. DASH_CONF_OPTS += --disable-static
  29. endif
  30. define DASH_INSTALL_TARGET_CMDS
  31. $(INSTALL) -m 0755 -D $(@D)/src/dash $(TARGET_DIR)/bin/dash
  32. endef
  33. # Add /bin/dash to /etc/shells otherwise some login tools like dropbear
  34. # can reject the user connection. See man shells.
  35. define DASH_ADD_DASH_TO_SHELLS
  36. grep -qsE '^/bin/dash$$' $(TARGET_DIR)/etc/shells \
  37. || echo "/bin/dash" >> $(TARGET_DIR)/etc/shells
  38. endef
  39. DASH_TARGET_FINALIZE_HOOKS += DASH_ADD_DASH_TO_SHELLS
  40. $(eval $(autotools-package))