42955fd999867312dd04606a9deab1a619e64e5e
[openwrt/svn-archive/archive.git] / package / dropbear / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dropbear
12 PKG_VERSION:=0.48.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
17 PKG_MD5SUM:=ca8e53a766faec831882831364568421
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/dropbear/Default
22 URL:=http://matt.ucc.asn.au/dropbear/
23 endef
24
25 define Package/dropbear
26 $(call Package/dropbear/Default)
27 SECTION:=net
28 CATEGORY:=Base system
29 TITLE:=Small SSH2 client/server
30 DESCRIPTION:=\
31 A small SSH2 server/client designed for small memory environments.
32 endef
33
34 define Package/dropbearconvert
35 $(call Package/dropbear/Default)
36 SECTION:=utils
37 CATEGORY:=Utilities
38 TITLE:=Utility for converting SSH keys
39 endef
40
41 CONFIGURE_ARGS += \
42 --with-shared \
43 --disable-pam \
44 --enable-openpty \
45 --enable-syslog \
46 --disable-shadow \
47 --disable-lastlog \
48 --disable-utmp \
49 --disable-utmpx \
50 --disable-wtmp \
51 --disable-wtmpx \
52 --disable-loginfunc \
53 --disable-pututline \
54 --disable-pututxline \
55 --disable-zlib
56
57 define Build/Configure
58 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
59 $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
60 $(call Build/Configure/Default)
61 endef
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 $(TARGET_CONFIGURE_OPTS) \
66 LD="$(TARGET_CC)" \
67 PROGRAMS="dropbear dbclient dropbearkey scp" \
68 MULTI=1 SCPPROGRESS=1
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 $(TARGET_CONFIGURE_OPTS) \
71 LD="$(TARGET_CC)" \
72 PROGRAMS="dropbearconvert"
73 endef
74
75 define Package/dropbear/install
76 $(INSTALL_DIR) $(1)/usr/sbin
77 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti \
78 $(1)/usr/sbin/dropbear
79 $(INSTALL_DIR) $(1)/usr/bin
80 ln -sf ../sbin/dropbear $(1)/usr/bin/scp
81 ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
82 ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
83 ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
84 $(INSTALL_DIR) $(1)/etc/config
85 $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear
86 $(INSTALL_DIR) $(1)/etc/init.d
87 $(INSTALL_BIN) ./files/dropbear.init $(1)/etc/init.d/dropbear
88 endef
89
90 define Package/dropbearconvert/install
91 $(INSTALL_DIR) $(1)/usr/bin
92 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
93 $(1)/usr/bin/dropbearconvert
94 endef
95
96 $(eval $(call BuildPackage,dropbear))
97 $(eval $(call BuildPackage,dropbearconvert))