build system cleanup. move shared include files into $(TOPDIR)/include, move lzma...
[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)/include/package.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 TITLE:=Utility for converting SSH keys
29 DEFAULT:=m if ALL
30 DESCRIPTION:=Utility for converting SSH keys
31 endef
32
33 define Build/Configure
34 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
35 $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(PKG_BUILD_DIR)/options.h
36 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --program-prefix="" \
44 --program-suffix="" \
45 --prefix=/usr \
46 --exec-prefix=/usr \
47 --bindir=/usr/bin \
48 --datadir=/usr/share \
49 --includedir=/usr/include \
50 --infodir=/usr/share/info \
51 --libdir=/usr/lib \
52 --libexecdir=/usr/lib \
53 --localstatedir=/var \
54 --mandir=/usr/share/man \
55 --sbindir=/usr/sbin \
56 --sysconfdir=/etc \
57 $(DISABLE_LARGEFILE) \
58 $(DISABLE_NLS) \
59 --with-shared \
60 --disable-pam \
61 --enable-openpty \
62 --enable-syslog \
63 --disable-shadow \
64 --disable-lastlog \
65 --disable-utmp \
66 --disable-utmpx \
67 --disable-wtmp \
68 --disable-wtmpx \
69 --disable-loginfunc \
70 --disable-pututline \
71 --disable-pututxline \
72 --disable-zlib \
73 );
74 endef
75
76 define Build/Compile
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 LD=$(TARGET_CC) \
79 PROGRAMS="dropbear dbclient dropbearkey scp" \
80 MULTI=1 SCPPROGRESS=1
81 $(MAKE) -C $(PKG_BUILD_DIR) \
82 LD=$(TARGET_CC) \
83 PROGRAMS="dropbearconvert"
84 endef
85
86 define Package/dropbear/install
87 install -d -m0755 $(1)/usr/sbin
88 install -m0755 $(PKG_BUILD_DIR)/dropbearmulti \
89 $(1)/usr/sbin/dropbear
90 install -d -m0755 $(1)/usr/bin
91 ln -sf ../sbin/dropbear $(1)/usr/bin/scp
92 ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
93 ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
94 ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
95 install -d -m0755 $(1)/etc/init.d
96 install -m0755 ./files/dropbear.init $(1)/etc/init.d/S50dropbear
97 endef
98
99 define Package/dropbearconvert/install
100 install -d -m0755 $(1)/usr/bin
101 install -m0755 $(PKG_BUILD_DIR)/dropbearconvert \
102 $(1)/usr/bin/dropbearconvert
103 endef
104
105 $(eval $(call BuildPackage,dropbear))
106 $(eval $(call BuildPackage,dropbearconvert))
This page took 0.047742 seconds and 5 git commands to generate.