2
1

dropbear.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #############################################################
  2. #
  3. # dropbear
  4. #
  5. #############################################################
  6. DROPBEAR_VERSION = 0.52
  7. DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.gz
  8. DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
  9. DROPBEAR_DEPENDENCIES = zlib
  10. DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
  11. # configure misdetects this as no, but the result is not used for
  12. # anything. Unfortunately it breaks the build for other packages also
  13. # checking for struct sockaddr_storage when using a shared config
  14. # cache, so force it to yes
  15. DROPBEAR_CONF_ENV = ac_cv_type_struct_sockaddr_storage=yes
  16. DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \
  17. PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
  18. define DROPBEAR_FIX_XAUTH
  19. $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h
  20. endef
  21. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH
  22. define DROPBEAR_DISABLE_REVERSE_DNS
  23. $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h
  24. endef
  25. ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y)
  26. DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS
  27. endif
  28. define DROPBEAR_INSTALL_TARGET_CMDS
  29. $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear
  30. for f in $(DROPBEAR_TARGET_BINS); do \
  31. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \
  32. done
  33. if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \
  34. $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \
  35. fi
  36. endef
  37. define DROPBEAR_UNINSTALL_TARGET_CMDS
  38. rm -f $(TARGET_DIR)/usr/sbin/dropbear
  39. rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS))
  40. rm -f $(TARGET_DIR)/etc/init.d/S50dropbear
  41. endef
  42. $(eval $(call AUTOTARGETS,package,dropbear))