1 #############################################################
5 #############################################################
7 DROPBEAR_SOURCE
:=dropbear-
$(DROPBEAR_VERSION
).
tar.gz
8 DROPBEAR_SITE
:=http
://matt.ucc.asn.au
/dropbear
/releases
/
9 DROPBEAR_DIR
:=$(BUILD_DIR
)/dropbear-
$(DROPBEAR_VERSION
)
11 DROPBEAR_BINARY
:=dropbearmulti
12 DROPBEAR_TARGET_BINARY
:=usr
/sbin
/dropbear
14 $(DL_DIR
)/$(DROPBEAR_SOURCE
):
15 $(WGET
) -P
$(DL_DIR
) $(DROPBEAR_SITE
)/$(DROPBEAR_SOURCE
)
17 $(DROPBEAR_DIR
)/.unpacked
: $(DL_DIR
)/$(DROPBEAR_SOURCE
)
18 $(DROPBEAR_CAT
) $(DL_DIR
)/$(DROPBEAR_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
19 toolchain
/patch-kernel.sh
$(DROPBEAR_DIR
) package
/dropbear
/ dropbear\
*.patch
20 $(SED
) 's,^/\* #define DROPBEAR_MULTI.*,#define DROPBEAR_MULTI,g' $(DROPBEAR_DIR
)/options.h
21 $(CONFIG_UPDATE
) $(DROPBEAR_DIR
)
24 $(DROPBEAR_DIR
)/.configured
: $(DROPBEAR_DIR
)/.unpacked
25 (cd
$(DROPBEAR_DIR
); rm -rf config.cache
; \
27 $(TARGET_CONFIGURE_OPTS
) \
28 $(TARGET_CONFIGURE_ARGS
) \
30 --target
=$(GNU_TARGET_NAME
) \
31 --host
=$(GNU_TARGET_NAME
) \
32 --build
=$(GNU_HOST_NAME
) \
35 --localstatedir
=/var \
41 $(DROPBEAR_DIR
)/$(DROPBEAR_BINARY
): $(DROPBEAR_DIR
)/.configured
42 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) LD
=$(TARGET_CC
) \
43 PROGRAMS
="dropbear dbclient dropbearkey dropbearconvert scp" \
44 MULTI
=1 SCPPROGRESS
=1 -C
$(DROPBEAR_DIR
)
46 $(TARGET_DIR
)/$(DROPBEAR_TARGET_BINARY
): $(DROPBEAR_DIR
)/$(DROPBEAR_BINARY
)
47 $(INSTALL
) -d
-m
755 $(TARGET_DIR
)/usr
/sbin
48 $(INSTALL
) -d
-m
755 $(TARGET_DIR
)/usr
/bin
49 $(INSTALL
) -m
755 $(DROPBEAR_DIR
)/$(DROPBEAR_BINARY
) \
50 $(TARGET_DIR
)/$(DROPBEAR_TARGET_BINARY
)
51 $(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/$(DROPBEAR_TARGET_BINARY
)
52 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/scp
53 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/ssh
54 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/dbclient
55 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/dropbearkey
56 ln
-snf ..
/sbin
/dropbear
$(TARGET_DIR
)/usr
/bin
/dropbearconvert
57 mkdir
-p
$(TARGET_DIR
)/etc
/init.d
58 cp
-dpf
$(DROPBEAR_DIR
)/S50dropbear
$(TARGET_DIR
)/etc
/init.d
/
59 chmod a
+x
$(TARGET_DIR
)/etc
/init.d
/S50dropbear
61 dropbear
: uclibc zlib
$(TARGET_DIR
)/$(DROPBEAR_TARGET_BINARY
)
63 dropbear-source
: $(DL_DIR
)/$(DROPBEAR_SOURCE
)
66 $(MAKE
) DESTDIR
=$(TARGET_DIR
) $(TARGET_CONFIGURE_OPTS
) \
67 LD
=$(TARGET_CC
) -C
$(DROPBEAR_DIR
) uninstall
68 -$(MAKE
) -C
$(DROPBEAR_DIR
) clean
71 rm -rf
$(DROPBEAR_DIR
)
73 #############################################################
75 # Toplevel Makefile options
77 #############################################################
78 ifeq ($(BR2_PACKAGE_DROPBEAR
),y
)