2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-10-29 09:01:33 +02:00
|
|
|
#
|
|
|
|
# dropbear
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2014-10-23 19:09:05 +02:00
|
|
|
DROPBEAR_VERSION = 2014.66
|
2009-03-11 21:32:39 +01:00
|
|
|
DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases
|
2013-03-21 09:02:23 +01:00
|
|
|
DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
|
2009-03-11 21:32:39 +01:00
|
|
|
DROPBEAR_TARGET_BINS = dbclient dropbearkey dropbearconvert scp ssh
|
2014-12-30 08:36:23 +01:00
|
|
|
DROPBEAR_MAKE = \
|
|
|
|
$(MAKE) MULTI=1 SCPPROGRESS=1 \
|
|
|
|
PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2012-11-13 02:05:40 +01:00
|
|
|
DROPBEAR_LICENSE = MIT, BSD-2c-like, BSD-2c
|
|
|
|
DROPBEAR_LICENSE_FILES = LICENSE
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2011-05-13 12:04:10 +02:00
|
|
|
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
|
|
|
|
2013-12-04 14:24:00 +01:00
|
|
|
define DROPBEAR_ENABLE_REVERSE_DNS
|
|
|
|
$(SED) 's:.*\(#define DO_HOST_LOOKUP\).*:\1:' $(@D)/options.h
|
2010-09-01 22:42:27 +02:00
|
|
|
endef
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2011-03-04 15:22:26 +01:00
|
|
|
define DROPBEAR_BUILD_SMALL
|
2013-03-21 09:02:23 +01:00
|
|
|
$(SED) 's:.*\(#define DROPBEAR_SMALL_CODE\).*:\1:' $(@D)/options.h
|
|
|
|
$(SED) 's:.*\(#define NO_FAST_EXPTMOD\).*:\1:' $(@D)/options.h
|
2011-03-04 15:22:26 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DROPBEAR_BUILD_FEATURED
|
2013-03-21 09:02:23 +01:00
|
|
|
$(SED) 's:.*\(#define DROPBEAR_BLOWFISH\).*:\1:' $(@D)/options.h
|
|
|
|
$(SED) 's:.*\(#define DROPBEAR_SHA2_256_HMAC\).*:\1:' $(@D)/options.h
|
|
|
|
$(SED) 's:.*\(#define DROPBEAR_SHA2_512_HMAC\).*:\1:' $(@D)/options.h
|
2011-03-04 15:22:26 +01:00
|
|
|
endef
|
|
|
|
|
2013-05-07 05:45:50 +02:00
|
|
|
define DROPBEAR_DISABLE_STANDALONE
|
|
|
|
$(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h
|
|
|
|
endef
|
|
|
|
|
2013-12-04 14:24:00 +01:00
|
|
|
define DROPBEAR_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/dropbear/dropbear.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/dropbear.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../dropbear.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service
|
|
|
|
endef
|
|
|
|
|
2013-05-07 05:45:50 +02:00
|
|
|
ifeq ($(BR2_USE_MMU),y)
|
|
|
|
define DROPBEAR_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50dropbear
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
|
|
|
|
endif
|
|
|
|
|
2013-12-04 14:24:00 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),)
|
|
|
|
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ENABLE_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
|
2014-09-27 21:32:44 +02:00
|
|
|
DROPBEAR_CONF_OPTS += --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)
|
2014-09-27 21:32:44 +02:00
|
|
|
DROPBEAR_CONF_OPTS += --disable-wtmp
|
2011-10-25 14:22:18 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
DROPBEAR_CONF_OPTS += --disable-lastlog
|
2011-10-25 14:22:18 +02:00
|
|
|
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
|
2014-05-28 09:46:20 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/dropbear
|
2010-09-01 22:42:27 +02:00
|
|
|
endef
|
2005-10-29 09:01:33 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|