| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= dropbear
|
|---|
| 10 | PKG_VERSION:= 0.48.1
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= ca8e53a766faec831882831364568421
|
|---|
| 13 | PKG_INIT:= 50
|
|---|
| 14 |
|
|---|
| 15 | PKG_SOURCE_URL:= http://matt.ucc.asn.au/dropbear/releases/
|
|---|
| 16 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 17 |
|
|---|
| 18 | include $(TOPDIR)/mk/package.mk
|
|---|
| 19 |
|
|---|
| 20 | $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 21 | $(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 22 |
|
|---|
| 23 | $(WRKBUILD)/.configured:
|
|---|
| 24 | $(SED) 's,^/\* #define PKG_MULTI.*,#define PKG_MULTI,g' $(WRKBUILD)/options.h
|
|---|
| 25 | $(SED) 's,^#define DO_HOST_LOOKUP,/* & */,g' $(WRKBUILD)/options.h
|
|---|
| 26 | (cd $(WRKBUILD); rm -rf config.cache; \
|
|---|
| 27 | autoconf; \
|
|---|
| 28 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 29 | CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
|
|---|
| 30 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 31 | ./configure \
|
|---|
| 32 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 33 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 34 | --build=$(GNU_HOST_NAME) \
|
|---|
| 35 | --program-prefix="" \
|
|---|
| 36 | --program-suffix="" \
|
|---|
| 37 | --prefix=/usr \
|
|---|
| 38 | --exec-prefix=/usr \
|
|---|
| 39 | --bindir=/usr/bin \
|
|---|
| 40 | --datadir=/usr/share \
|
|---|
| 41 | --includedir=/usr/include \
|
|---|
| 42 | --infodir=/usr/share/info \
|
|---|
| 43 | --libdir=/usr/lib \
|
|---|
| 44 | --libexecdir=/usr/lib \
|
|---|
| 45 | --localstatedir=/var \
|
|---|
| 46 | --mandir=/usr/share/man \
|
|---|
| 47 | --sbindir=/usr/sbin \
|
|---|
| 48 | --sysconfdir=/etc \
|
|---|
| 49 | --disable-nls \
|
|---|
| 50 | --with-shared \
|
|---|
| 51 | --disable-pam \
|
|---|
| 52 | --enable-openpty \
|
|---|
| 53 | --enable-syslog \
|
|---|
| 54 | --disable-shadow \
|
|---|
| 55 | --disable-lastlog \
|
|---|
| 56 | --disable-utmp \
|
|---|
| 57 | --disable-utmpx \
|
|---|
| 58 | --disable-wtmp \
|
|---|
| 59 | --disable-wtmpx \
|
|---|
| 60 | --disable-loginfunc \
|
|---|
| 61 | --disable-pututline \
|
|---|
| 62 | --disable-pututxline \
|
|---|
| 63 | --disable-zlib \
|
|---|
| 64 | );
|
|---|
| 65 | touch $@
|
|---|
| 66 |
|
|---|
| 67 | $(WRKBUILD)/.built:
|
|---|
| 68 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 69 | LD=$(TARGET_CC) \
|
|---|
| 70 | PROGRAMS="dropbear dbclient dropbearkey scp" \
|
|---|
| 71 | MULTI=1 SCPPROGRESS=1
|
|---|
| 72 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 73 | LD=$(TARGET_CC) \
|
|---|
| 74 | PROGRAMS="dropbearconvert"
|
|---|
| 75 | touch $@
|
|---|
| 76 |
|
|---|
| 77 | $(IPKG_DBCONVERT):
|
|---|
| 78 | $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
|
|---|
| 79 | $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
|
|---|
| 80 | $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
|
|---|
| 81 | $(RSTRIP) $(IDIR_DBCONVERT)
|
|---|
| 82 | $(IPKG_BUILD) $(IDIR_DBCONVERT) $(PACKAGE_DIR)
|
|---|
| 83 |
|
|---|
| 84 | $(IPKG_DROPBEAR):
|
|---|
| 85 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/init.d
|
|---|
| 86 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
|
|---|
| 87 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
|
|---|
| 88 | $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
|
|---|
| 89 | $(IDIR_DROPBEAR)/usr/sbin/dropbear
|
|---|
| 90 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
|
|---|
| 91 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
|
|---|
| 92 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
|
|---|
| 93 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
|
|---|
| 94 | $(INSTALL_BIN) ./files/dropbear.init \
|
|---|
| 95 | $(IDIR_DROPBEAR)/etc/init.d/S$(PKG_INIT)dropbear
|
|---|
| 96 | $(RSTRIP) $(IDIR_DROPBEAR)
|
|---|
| 97 | $(IPKG_BUILD) $(IDIR_DROPBEAR) $(PACKAGE_DIR)
|
|---|