2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
17 PKG_MD5SUM:=ca8e53a766faec831882831364568421
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 include $(INCLUDE_DIR)/package.mk
24 define Package/dropbear/Default
25 URL:=http://matt.ucc.asn.au/dropbear/
28 define Package/dropbear
29 $(call Package/dropbear/Default)
32 TITLE:=Small SSH2 client/server
34 A small SSH2 server/client designed for small memory environments.
37 define Package/dropbearconvert
38 $(call Package/dropbear/Default)
41 TITLE:=Utility for converting SSH keys
44 define Build/Configure
45 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
46 $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
47 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
48 $(TARGET_CONFIGURE_OPTS) \
49 CFLAGS="$(TARGET_CFLAGS)" \
51 --target=$(GNU_TARGET_NAME) \
52 --host=$(GNU_TARGET_NAME) \
53 --build=$(GNU_HOST_NAME) \
59 --datadir=/usr/share \
60 --includedir=/usr/include \
61 --infodir=/usr/share/info \
63 --libexecdir=/usr/lib \
64 --localstatedir=/var \
65 --mandir=/usr/share/man \
68 $(DISABLE_LARGEFILE) \
82 --disable-pututxline \
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 $(TARGET_CONFIGURE_OPTS) \
91 PROGRAMS="dropbear dbclient dropbearkey scp" \
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 $(TARGET_CONFIGURE_OPTS) \
96 PROGRAMS="dropbearconvert"
99 define Package/dropbear/install
100 $(INSTALL_DIR) $(1)/usr/sbin
101 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti \
102 $(1)/usr/sbin/dropbear
103 $(INSTALL_DIR) $(1)/usr/bin
104 ln -sf ../sbin/dropbear $(1)/usr/bin/scp
105 ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
106 ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
107 ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
108 $(INSTALL_DIR) $(1)/etc/config
109 $(INSTALL_BIN) ./files/dropbear.config $(1)/etc/config/dropbear
110 $(INSTALL_DIR) $(1)/etc/init.d
111 $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
114 define Package/dropbearconvert/install
115 $(INSTALL_DIR) $(1)/usr/bin
116 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
117 $(1)/usr/bin/dropbearconvert
120 $(eval $(call BuildPackage,dropbear))
121 $(eval $(call BuildPackage,dropbearconvert))