2005-10-29 09:01:33 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dropbear
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2011-11-10 12:25:27 +01:00
|
|
|
DROPBEAR_VERSION = 2011.54
|
2009-03-11 21:32:39 +01:00
|
|
|
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
|
|
|
|
DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
|
|
|
|
DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \
|
|
|
|
PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2011-05-13 12:04:10 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
DROPBEAR_MAKE += STATIC=1
|
|
|
|
endif
|
|
|
|
|
2010-09-28 09:22:19 +02:00
|
|
|
define DROPBEAR_FIX_XAUTH
|
2010-09-01 22:42:27 +02:00
|
|
|
$(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h
|
|
|
|
endef
|
|
|
|
|
2010-10-06 09:45:12 +02:00
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH
|
2010-09-01 22:42:27 +02:00
|
|
|
|
|
|
|
define DROPBEAR_DISABLE_REVERSE_DNS
|
|
|
|
$(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h
|
|
|
|
endef
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2011-03-04 15:22:26 +01:00
|
|
|
define DROPBEAR_BUILD_SMALL
|
|
|
|
echo "#define DROPBEAR_SMALL_CODE" >>$(@D)/options.h
|
|
|
|
echo "#define NO_FAST_EXPTMOD" >>$(@D)/options.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
define DROPBEAR_BUILD_FEATURED
|
|
|
|
echo "#define DROPBEAR_BLOWFISH" >>$(@D)/options.h
|
|
|
|
endef
|
|
|
|
|
2010-09-06 14:37:22 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y)
|
2010-09-01 22:42:27 +02:00
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS
|
2010-09-06 14:37:22 +02:00
|
|
|
endif
|
2010-09-01 22:42:27 +02:00
|
|
|
|
2011-03-04 15:22:26 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y)
|
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_SMALL
|
2011-05-16 22:41:54 +02:00
|
|
|
DROPBEAR_CONF_OPT += --disable-zlib
|
2011-03-04 15:22:26 +01:00
|
|
|
else
|
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_FEATURED
|
2011-05-16 22:41:54 +02:00
|
|
|
DROPBEAR_DEPENDENCIES += zlib
|
2011-03-04 15:22:26 +01:00
|
|
|
endif
|
|
|
|
|
2011-10-25 14:22:18 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_DROPBEAR_WTMP),y)
|
|
|
|
DROPBEAR_CONF_OPT += --disable-wtmp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y)
|
|
|
|
DROPBEAR_CONF_OPT += --disable-lastlog
|
|
|
|
endif
|
|
|
|
|
2010-09-01 22:42:27 +02:00
|
|
|
define DROPBEAR_INSTALL_TARGET_CMDS
|
|
|
|
$(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear
|
|
|
|
for f in $(DROPBEAR_TARGET_BINS); do \
|
|
|
|
ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \
|
|
|
|
done
|
2009-03-11 21:32:39 +01:00
|
|
|
if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \
|
2009-05-28 14:31:20 +02:00
|
|
|
$(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \
|
2009-03-11 21:32:39 +01:00
|
|
|
fi
|
2010-09-01 22:42:27 +02:00
|
|
|
endef
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2010-09-01 22:42:27 +02:00
|
|
|
define DROPBEAR_UNINSTALL_TARGET_CMDS
|
2009-03-11 21:32:39 +01:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/dropbear
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS))
|
2008-03-27 16:42:42 +01:00
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S50dropbear
|
2010-09-01 22:42:27 +02:00
|
|
|
endef
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2011-09-29 21:57:43 +02:00
|
|
|
$(eval $(call AUTOTARGETS))
|