summaryrefslogtreecommitdiff
path: root/package/dropbear/Makefile
blob: 63b3e54e768d11ceeb1e7909e63935183e89c7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/rules.mk

PKG_NAME:=		dropbear
PKG_VERSION:=		0.52
PKG_RELEASE:=		1
PKG_MD5SUM:=		1c69ec674481d7745452f68f2ea5597e
MASTER_SITES:=		http://matt.ucc.asn.au/dropbear/releases/ \
			http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/

include $(TOPDIR)/mk/package.mk

$(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

CONFIGURE_STYLE=	gnu
CONFIGURE_ARGS+=	--disable-pam \
			--enable-openpty \
			--enable-syslog \
			--disable-shadow \
			--disable-lastlog \
			--disable-utmp \
			--disable-utmpx \
			--disable-wtmp \
			--disable-wtmpx \
			--disable-loginfunc \
			--disable-pututline \
			--disable-pututxline \
			--disable-zlib

pre-configure:
	$(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(WRKBUILD)/options.h
	$(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(WRKBUILD)/options.h

do-build:
	cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
	    PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 SCPPROGRESS=1
	cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} \
	    PROGRAMS=dropbearconvert

# evaluate startup options according to menuconfig selection
DROPBEAR-OPTS-y							= -g
DROPBEAR-OPTS-$(ADK_RUNTIME_SSH_DISABLE_NOTHING)		=
DROPBEAR-OPTS-$(ADK_RUNTIME_SSH_DISABLE_PASSWORD_FOR_ROOT)	= -g
DROPBEAR-OPTS-$(ADK_RUNTIME_SSH_DISABLE_PASSWORD)		= -s
DROPBEAR-OPTS-$(ADK_RUNTIME_SSH_DISABLE_ROOT)			= -w
DROPBEAR-OPTS-$(ADK_RUNTIME_SSH_DISABLE_ROOT_AND_PASSWORD)	= -w -s

do-install:
	# main package
	$(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/init.d
	$(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
	$(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
	$(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
		$(IDIR_DROPBEAR)/usr/sbin/dropbear
	ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
	ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
	ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
	ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
	$(INSTALL_DATA) ./files/dropbear.init \
		$(IDIR_DROPBEAR)/etc/init.d/dropbear
	$(SED) "s/@OPTIONS@/$(DROPBEAR-OPTS-y)/g" $(IDIR_DROPBEAR)/CONTROL/postinst
	# subpackage dropbearconvert
	$(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
	$(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
		$(IDIR_DBCONVERT)/usr/bin/dropbearconvert

include ${TOPDIR}/mk/pkg-bottom.mk