convert dropbear to new packaging style
[openwrt.git] / package / dropbear / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=dropbear
6 PKG_VERSION:=0.45
7 PKG_RELEASE:=2
8 PKG_MD5SUM:=2bcc46e4c239aec982bf36a723dd0b0e
9
10 PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15
16 include $(TOPDIR)/package/rules.mk
17
18 $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19
20 $(PKG_BUILD_DIR)/.configured:
21 $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(PKG_BUILD_DIR)/options.h
22 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
23 autoconf; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
26 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --datadir=/usr/share \
37 --includedir=/usr/include \
38 --infodir=/usr/share/info \
39 --libdir=/usr/lib \
40 --libexecdir=/usr/lib \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --sbindir=/usr/sbin \
44 --sysconfdir=/etc \
45 $(DISABLE_LARGEFILE) \
46 $(DISABLE_NLS) \
47 --with-shared \
48 --disable-pam \
49 --enable-openpty \
50 --enable-syslog \
51 --disable-shadow \
52 --disable-lastlog \
53 --disable-utmp \
54 --disable-utmpx \
55 --disable-wtmp \
56 --disable-wtmpx \
57 --disable-loginfunc \
58 --disable-pututline \
59 --disable-pututxline \
60 );
61 touch $(PKG_BUILD_DIR)/.configured
62
63 $(PKG_BUILD_DIR)/.built:
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 LD=$(TARGET_CC) \
66 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
67 MULTI=1 SCPPROGRESS=1
68 touch $@
69
70 $(IPKG_DROPBEAR):
71 mkdir -p $(IDIR_DROPBEAR)/usr/bin
72 mkdir -p $(IDIR_DROPBEAR)/usr/sbin
73 install -m 755 $(PKG_BUILD_DIR)/dropbearmulti \
74 $(IDIR_DROPBEAR)/usr/sbin/dropbear
75 $(STRIP) $(IDIR_DROPBEAR)/usr/sbin/dropbear
76 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
77 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
78 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
79 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
80 ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearconvert
81 mkdir -p $(IDIR_DROPBEAR)/etc/init.d
82 install -m 755 ./files/S50dropbear $(IDIR_DROPBEAR)/etc/init.d/
83 $(IPKG_BUILD) $(IDIR_DROPBEAR) $(PACKAGE_DIR)
This page took 0.046125 seconds and 5 git commands to generate.