2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 http
://matt.ucc.asn.au
/dropbear
/releases
/ \
17 http
://www.mirrors.wiretapped.net
/security
/cryptography
/apps
/ssh
/dropbear
/
18 PKG_MD5SUM
:=c627ffe09570fad7aa94d8eac2b9320c
21 PKG_LICENSE_FILES
:=LICENSE libtomcrypt
/LICENSE libtommath
/LICENSE
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/dropbear
/Default
28 URL
:=http
://matt.ucc.asn.au
/dropbear
/
31 define Package
/dropbear
32 $(call Package
/dropbear
/Default
)
35 TITLE
:=Small SSH2 client
/server
38 define Package
/dropbear
/description
39 A small SSH2 server
/client designed for small memory environments.
42 define Package
/dropbear
/conffiles
43 /etc
/dropbear
/dropbear_rsa_host_key
44 /etc
/dropbear
/dropbear_dss_host_key
48 define Package
/dropbearconvert
49 $(call Package
/dropbear
/Default
)
52 TITLE
:=Utility for converting SSH keys
60 $(if
$(CONFIG_SHADOW_PASSWORDS
),,--disable-shadow
) \
68 --disable-pututxline \
70 --enable-bundled-libtom
72 TARGET_CFLAGS
+= -DARGTYPE
=3 -ffunction-sections
-fdata-sections
73 TARGET_LDFLAGS
+= -Wl
,--gc-sections
75 define Build
/Configure
76 $(SED
) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR
)/options.h
77 $(SED
) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR
)/options.h
78 $(call Build
/Configure
/Default
)
82 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
83 $(TARGET_CONFIGURE_OPTS
) \
85 PROGRAMS
="dropbear dbclient dropbearkey scp" \
87 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
88 $(TARGET_CONFIGURE_OPTS
) \
90 PROGRAMS
="dropbearconvert"
93 define Package
/dropbear
/install
94 $(INSTALL_DIR
) $(1)/usr
/sbin
95 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/dropbearmulti
$(1)/usr
/sbin
/dropbear
96 $(INSTALL_DIR
) $(1)/usr
/bin
97 ln
-sf ..
/sbin
/dropbear
$(1)/usr
/bin
/scp
98 ln
-sf ..
/sbin
/dropbear
$(1)/usr
/bin
/ssh
99 ln
-sf ..
/sbin
/dropbear
$(1)/usr
/bin
/dbclient
100 ln
-sf ..
/sbin
/dropbear
$(1)/usr
/bin
/dropbearkey
101 $(INSTALL_DIR
) $(1)/etc
/config
102 $(INSTALL_DATA
) .
/files
/dropbear.config
$(1)/etc
/config
/dropbear
103 $(INSTALL_DIR
) $(1)/etc
/init.d
104 $(INSTALL_BIN
) .
/files
/dropbear.init
$(1)/etc
/init.d
/dropbear
105 $(INSTALL_DIR
) $(1)/usr
/lib
/opkg
/info
106 $(INSTALL_DIR
) $(1)/etc
/dropbear
107 touch
$(1)/etc
/dropbear
/dropbear_rsa_host_key
108 touch
$(1)/etc
/dropbear
/dropbear_dss_host_key
111 define Package
/dropbearconvert
/install
112 $(INSTALL_DIR
) $(1)/usr
/bin
113 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/dropbearconvert
$(1)/usr
/bin
/dropbearconvert
116 $(eval
$(call BuildPackage
,dropbear
))
117 $(eval
$(call BuildPackage
,dropbearconvert
))