Fix building util-linux under xscale
[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 $(TARGET_CONFIGURE_OPTS) \
85 LD="$(TARGET_CC)" \
86 PROGRAMS="dropbear dbclient dropbearkey scp" \
87 MULTI=1 SCPPROGRESS=1
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 $(TARGET_CONFIGURE_OPTS) \
90 LD="$(TARGET_CC)" \
91 PROGRAMS="dropbearconvert"
92 endef
93
94 define Package/dropbear/install
95 install -d -m0755 $(1)/usr/sbin
96 install -m0755 $(PKG_BUILD_DIR)/dropbearmulti \
97 $(1)/usr/sbin/dropbear
98 install -d -m0755 $(1)/usr/bin
99 ln -sf ../sbin/dropbear $(1)/usr/bin/scp
100 ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
101 ln -sf ../sbin/dropbear $(1)/usr/bin/dbclient
102 ln -sf ../sbin/dropbear $(1)/usr/bin/dropbearkey
103 install -d -m0755 $(1)/etc/init.d
104 install -m0755 ./files/dropbear.init $(1)/etc/init.d/S50dropbear
105 endef
106
107 define Package/dropbearconvert/install
108 install -d -m0755 $(1)/usr/bin
109 install -m0755 $(PKG_BUILD_DIR)/dropbearconvert \
110 $(1)/usr/bin/dropbearconvert
111 endef
112
113 $(eval $(call BuildPackage,dropbear))
114 $(eval $(call BuildPackage,dropbearconvert))
This page took 0.040567 seconds and 5 git commands to generate.