1 ################################################################################
5 ################################################################################
7 DROPBEAR_VERSION
= 2015.71
8 DROPBEAR_SITE
= http
://matt.ucc.asn.au
/dropbear
/releases
9 DROPBEAR_SOURCE
= dropbear-
$(DROPBEAR_VERSION
).
tar.bz2
10 DROPBEAR_LICENSE
= MIT
, BSD-2c-like
, BSD-2c
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_MAKE
+= STATIC
=1
29 define DROPBEAR_FIX_XAUTH
30 $(SED
) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D
)/options.h
33 DROPBEAR_POST_EXTRACT_HOOKS
+= DROPBEAR_FIX_XAUTH
35 define DROPBEAR_ENABLE_REVERSE_DNS
36 $(SED
) 's:.*\(#define DO_HOST_LOOKUP\).*:\1:' $(@D
)/options.h
39 define DROPBEAR_BUILD_SMALL
40 $(SED
) 's:.*\(#define NO_FAST_EXPTMOD\).*:\1:' $(@D
)/options.h
43 define DROPBEAR_BUILD_FEATURED
44 $(SED
) 's:^#define DROPBEAR_SMALL_CODE::' $(@D
)/options.h
45 $(SED
) 's:.*\(#define DROPBEAR_BLOWFISH\).*:\1:' $(@D
)/options.h
46 $(SED
) 's:.*\(#define DROPBEAR_TWOFISH128\).*:\1:' $(@D
)/options.h
47 $(SED
) 's:.*\(#define DROPBEAR_TWOFISH256\).*:\1:' $(@D
)/options.h
50 define DROPBEAR_DISABLE_STANDALONE
51 $(SED
) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D
)/options.h
54 define DROPBEAR_INSTALL_INIT_SYSTEMD
55 $(INSTALL
) -D
-m
644 package
/dropbear
/dropbear.service \
56 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/dropbear.service
57 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
58 ln
-fs ..
/..
/..
/..
/usr
/lib
/systemd
/system
/dropbear.service \
59 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/dropbear.service
62 ifeq ($(BR2_USE_MMU
),y
)
63 define DROPBEAR_INSTALL_INIT_SYSV
64 $(INSTALL
) -D
-m
755 package
/dropbear
/S50dropbear \
65 $(TARGET_DIR
)/etc
/init.d
/S50dropbear
68 DROPBEAR_POST_EXTRACT_HOOKS
+= DROPBEAR_DISABLE_STANDALONE
71 ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS
),)
72 DROPBEAR_POST_EXTRACT_HOOKS
+= DROPBEAR_ENABLE_REVERSE_DNS
75 ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL
),y
)
76 DROPBEAR_POST_EXTRACT_HOOKS
+= DROPBEAR_BUILD_SMALL
77 DROPBEAR_CONF_OPTS
+= --disable-zlib
79 DROPBEAR_POST_EXTRACT_HOOKS
+= DROPBEAR_BUILD_FEATURED
80 DROPBEAR_DEPENDENCIES
+= zlib
83 ifneq ($(BR2_PACKAGE_DROPBEAR_WTMP
),y
)
84 DROPBEAR_CONF_OPTS
+= --disable-wtmp
87 ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG
),y
)
88 DROPBEAR_CONF_OPTS
+= --disable-lastlog
91 define DROPBEAR_INSTALL_TARGET_CMDS
92 $(INSTALL
) -m
755 $(@D
)/dropbearmulti
$(TARGET_DIR
)/usr
/sbin
/dropbear
93 for f in
$(DROPBEAR_TARGET_BINS
); do \
94 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/$$f ; \
96 ln
-snf
/var
/run
/dropbear
$(TARGET_DIR
)/etc
/dropbear
99 $(eval
$(autotools-package
))