dropbear.mk 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 = uclibc zlib
  10. DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
  11. DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \
  12. PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
  13. $(eval $(call AUTOTARGETS,package,dropbear))
  14. $(DROPBEAR_HOOK_POST_EXTRACT):
  15. $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(DROPBEAR_DIR)/options.h
  16. touch $@
  17. $(DROPBEAR_TARGET_INSTALL_TARGET):
  18. $(call MESSAGE,"Installing to target")
  19. $(INSTALL) -m 755 $(DROPBEAR_DIR)/dropbearmulti \
  20. $(TARGET_DIR)/usr/sbin/dropbear
  21. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dbclient
  22. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey
  23. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert
  24. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/scp
  25. ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/ssh
  26. if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \
  27. $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d; \
  28. fi
  29. touch $@
  30. $(DROPBEAR_TARGET_UNINSTALL):
  31. $(call MESSAGE,"Uninstalling")
  32. rm -f $(TARGET_DIR)/usr/sbin/dropbear
  33. rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS))
  34. rm -f $(TARGET_DIR)/etc/init.d/S50dropbear
  35. rm -f $(DROPBEAR_TARGET_INSTALL_TARGET) $(DROPBEAR_HOOK_POST_INSTALL)