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