1 ################################################################################
5 ################################################################################
7 DROPBEAR_VERSION = 2018.76
8 DROPBEAR_SITE = https://matt.ucc.asn.au/dropbear/releases
9 DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2
10 DROPBEAR_LICENSE = MIT, BSD-2-Clause-like, BSD-2-Clause
11 DROPBEAR_LICENSE_FILES = LICENSE
12 DROPBEAR_TARGET_BINS = dropbearkey dropbearconvert scp
13 DROPBEAR_PROGRAMS = dropbear $(DROPBEAR_TARGET_BINS)
15 ifeq ($(BR2_PACKAGE_DROPBEAR_CLIENT),y)
16 # Build dbclient, and create a convenience symlink named ssh
17 DROPBEAR_PROGRAMS += dbclient
18 DROPBEAR_TARGET_BINS += dbclient ssh
22 $(MAKE) MULTI=1 SCPPROGRESS=1 \
23 PROGRAMS="$(DROPBEAR_PROGRAMS)"
25 ifeq ($(BR2_STATIC_LIBS),y)
26 DROPBEAR_CONF_OPTS += --enable-static
29 # Ensure that dropbear doesn't use crypt() when it's not available
30 define DROPBEAR_SVR_PASSWORD_AUTH
31 echo '#if !HAVE_CRYPT' >> $(@D)/localoptions.h
32 echo '#define DROPBEAR_SVR_PASSWORD_AUTH 0' >> $(@D)/localoptions.h
33 echo '#endif' >> $(@D)/localoptions.h
35 DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_SVR_PASSWORD_AUTH
37 define DROPBEAR_ENABLE_REVERSE_DNS
38 echo '#define DO_HOST_LOOKUP 1' >> $(@D)/localoptions.h
41 define DROPBEAR_BUILD_FEATURED
42 echo '#define DROPBEAR_SMALL_CODE 0' >> $(@D)/localoptions.h
43 echo '#define DROPBEAR_BLOWFISH 1' >> $(@D)/localoptions.h
44 echo '#define DROPBEAR_TWOFISH128 1' >> $(@D)/localoptions.h
45 echo '#define DROPBEAR_TWOFISH256 1' >> $(@D)/localoptions.h
48 define DROPBEAR_DISABLE_STANDALONE
49 echo '#define NON_INETD_MODE 0' >> $(@D)/localoptions.h
52 define DROPBEAR_INSTALL_INIT_SYSTEMD
53 $(INSTALL) -D -m 644 package/dropbear/dropbear.service \
54 $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service
55 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
56 ln -fs ../../../../usr/lib/systemd/system/dropbear.service \
57 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service
60 ifeq ($(BR2_USE_MMU),y)
61 define DROPBEAR_INSTALL_INIT_SYSV
62 $(INSTALL) -D -m 755 package/dropbear/S50dropbear \
63 $(TARGET_DIR)/etc/init.d/S50dropbear
66 DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
69 ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),)
70 DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ENABLE_REVERSE_DNS
73 ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y)
74 DROPBEAR_CONF_OPTS += --disable-zlib
76 DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_FEATURED
77 DROPBEAR_DEPENDENCIES += zlib
80 ifneq ($(BR2_PACKAGE_DROPBEAR_WTMP),y)
81 DROPBEAR_CONF_OPTS += --disable-wtmp
84 ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y)
85 DROPBEAR_CONF_OPTS += --disable-lastlog
88 define DROPBEAR_INSTALL_TARGET_CMDS
89 $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear
90 for f in $(DROPBEAR_TARGET_BINS); do \
91 ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \
93 ln -snf /var/run/dropbear $(TARGET_DIR)/etc/dropbear
96 $(eval $(autotools-package))