replace $(IDIR_*) with $(1)
[openwrt.git] / package / dropbear / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=dropbear
6 PKG_VERSION:=0.48.1
7 PKG_RELEASE:=1
8
9 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
12 PKG_MD5SUM:=ca8e53a766faec831882831364568421
13 PKG_CAT:=zcat
14
15 include $(TOPDIR)/package/rules.mk
16
17 define Package/dropbear
18 SECTION:=base
19 CATEGORY:=Base system
20 DEFAULT:=y
21 TITLE:=Small SSH 2 client/server
22 DESCRIPTION:=A small SSH 2 server/client designed for small memory environments.
23 URL:=http://matt.ucc.asn.au/dropbear/
24 endef
25
26 define Package/dropbearconvert
27 $(call Package/dropbear)
28 DEFAULT:=m
29 TITLE:=Utility for converting SSH keys
30 DESCRIPTION:=Utility for converting SSH keys
31 DEPENDS:=zlib
32 endef
33
34 define Build/Configure
35 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
36 $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
37 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
38 autoconf; \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
41 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
42 ./configure \
43 --target=$(GNU_TARGET_NAME) \
44 --host=$(GNU_TARGET_NAME) \
45 --build=$(GNU_HOST_NAME) \
46 --program-prefix="" \
47 --program-suffix="" \
48 --prefix=/usr \
49 --exec-prefix=/usr \
50 --bindir=/usr/bin \
51 --datadir=/usr/share \
52 --includedir=/usr/include \
53 --infodir=/usr/share/info \
54 --libdir=/usr/lib \
55 --libexecdir=/usr/lib \
56 --localstatedir=/var \
57 --mandir=/usr/share/man \
58 --sbindir=/usr/sbin \
59 --sysconfdir=/etc \
60 $(DISABLE_LARGEFILE) \
61 $(DISABLE_NLS) \
62 --with-shared \
63 --disable-pam \
64 --enable-openpty \
65 --enable-syslog \
66 --disable-shadow \
67 --disable-lastlog \
68 --disable-utmp \
69 --disable-utmpx \
70 --disable-wtmp \
71 --disable-wtmpx \
72 --disable-loginfunc \
73 --disable-pututline \
74 --disable-pututxline \
75 --disable-zlib \
76 );
77 endef
78
79 define Buid/Compile
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 LD=$(TARGET_CC) \
82 PROGRAMS="dropbear dbclient dropbearkey scp" \
83 MULTI=1 SCPPROGRESS=1
84 $(MAKE) -C $(PKG_BUILD_DIR) \
85 LD=$(TARGET_CC) \
86 PROGRAMS="dropbearconvert"
87 endef
88
89 define Package/dropbear/install
90 mkdir -p $(1)/usr/bin
91 mkdir -p $(1)/usr/sbin
92 install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \
93 $(1)/usr/sbin/dropbear
94 ln -sf ../sbin/dropbear $(1)/usr/bin/scp
95 ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
96 ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
97 ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
98 mkdir -p $(1)/etc/init.d
99 install -m 755 ./files/S50dropbear $(1)/etc/init.d/
100 endef
101
102 define Package/dropbearconvert/install
103 mkdir -p $(1)/usr/bin
104 install -m 755 $(PKG_BUILD_DIR)/dropbearconvert \
105 $(1)/usr/bin/dropbearconvert
106 endef
107
108 $(eval $(call BuildPackage,dropbear))
109 $(eval $(call BuildPackage,dropbearconvert))
This page took 0.051659 seconds and 5 git commands to generate.