dropbear.mk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #############################################################
  2. #
  3. # dropbear
  4. #
  5. #############################################################
  6. DROPBEAR_VERSION = 0.53.1
  7. DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.gz
  8. DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
  9. DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
  10. DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \
  11. PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
  12. ifeq ($(BR2_PREFER_STATIC_LIB),y)
  13. DROPBEAR_MAKE += STATIC=1
  14. endif
  15. define DROPBEAR_FIX_XAUTH
  16. $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h
  17. endef
  18. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH
  19. define DROPBEAR_DISABLE_REVERSE_DNS
  20. $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h
  21. endef
  22. define DROPBEAR_BUILD_SMALL
  23. echo "#define DROPBEAR_SMALL_CODE" >>$(@D)/options.h
  24. echo "#define NO_FAST_EXPTMOD" >>$(@D)/options.h
  25. endef
  26. define DROPBEAR_BUILD_FEATURED
  27. echo "#define DROPBEAR_BLOWFISH" >>$(@D)/options.h
  28. endef
  29. ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y)
  30. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS
  31. endif
  32. ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y)
  33. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_SMALL
  34. DROPBEAR_CONF_OPT += --disable-zlib
  35. else
  36. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_FEATURED
  37. DROPBEAR_DEPENDENCIES += zlib
  38. endif
  39. define DROPBEAR_INSTALL_TARGET_CMDS
  40. $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear
  41. for f in $(DROPBEAR_TARGET_BINS); do \
  42. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \
  43. done
  44. if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \
  45. $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \
  46. fi
  47. endef
  48. define DROPBEAR_UNINSTALL_TARGET_CMDS
  49. rm -f $(TARGET_DIR)/usr/sbin/dropbear
  50. rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS))
  51. rm -f $(TARGET_DIR)/etc/init.d/S50dropbear
  52. endef
  53. $(eval $(call AUTOTARGETS,package,dropbear))