| 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:= 2025.87
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 6744879d0fd110601fe008fa98cb16ad
|
|---|
| 13 | PKG_INIT:= 50
|
|---|
| 14 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|---|
| 15 | PKG_SOURCE_URL:= http://matt.ucc.asn.au/dropbear/releases/
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 | $(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 21 |
|
|---|
| 22 | $(WRKBUILD)/.configured:
|
|---|
| 23 | (cd $(WRKBUILD); rm -rf config.cache; \
|
|---|
| 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-pam \
|
|---|
| 46 | --enable-openpty \
|
|---|
| 47 | --enable-syslog \
|
|---|
| 48 | --disable-shadow \
|
|---|
| 49 | --disable-lastlog \
|
|---|
| 50 | --disable-utmp \
|
|---|
| 51 | --disable-utmpx \
|
|---|
| 52 | --disable-wtmp \
|
|---|
| 53 | --disable-wtmpx \
|
|---|
| 54 | --disable-loginfunc \
|
|---|
| 55 | --disable-pututline \
|
|---|
| 56 | --disable-pututxline \
|
|---|
| 57 | --disable-zlib \
|
|---|
| 58 | );
|
|---|
| 59 | touch $@
|
|---|
| 60 |
|
|---|
| 61 | $(WRKBUILD)/.built:
|
|---|
| 62 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 63 | LD="$(TARGET_CC)" \
|
|---|
| 64 | PROGRAMS="dropbear dbclient dropbearkey scp" \
|
|---|
| 65 | MULTI=1 SCPPROGRESS=1
|
|---|
| 66 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 67 | LD="$(TARGET_CC)" \
|
|---|
| 68 | PROGRAMS="dropbearconvert"
|
|---|
| 69 | touch $@
|
|---|
| 70 |
|
|---|
| 71 | $(IPKG_DBCONVERT):
|
|---|
| 72 | $(INSTALL_DIR) $(IDIR_DBCONVERT)/usr/bin
|
|---|
| 73 | $(INSTALL_BIN) $(WRKBUILD)/dropbearconvert \
|
|---|
| 74 | $(IDIR_DBCONVERT)/usr/bin/dropbearconvert
|
|---|
| 75 | $(RSTRIP) $(IDIR_DBCONVERT)
|
|---|
| 76 | $(IPKG_BUILD) $(IDIR_DBCONVERT) $(PACKAGE_DIR)
|
|---|
| 77 |
|
|---|
| 78 | # evaluate startup options according to menuconfig selection
|
|---|
| 79 | DROPBEAR-OPTS-y = -g
|
|---|
| 80 | DROPBEAR-OPTS-$(FWRT_RUNTIME_SSH_DISABLE_NOTHING) =
|
|---|
| 81 | DROPBEAR-OPTS-$(FWRT_RUNTIME_SSH_DISABLE_PASSWORD_FOR_ROOT) = -g
|
|---|
| 82 | DROPBEAR-OPTS-$(FWRT_RUNTIME_SSH_DISABLE_PASSWORD) = -s
|
|---|
| 83 | DROPBEAR-OPTS-$(FWRT_RUNTIME_SSH_DISABLE_ROOT) = -w
|
|---|
| 84 | DROPBEAR-OPTS-$(FWRT_RUNTIME_SSH_DISABLE_ROOT_AND_PASSWORD) = -w -s
|
|---|
| 85 |
|
|---|
| 86 | $(IPKG_DROPBEAR):
|
|---|
| 87 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/etc/init.d
|
|---|
| 88 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/bin
|
|---|
| 89 | $(INSTALL_DIR) $(IDIR_DROPBEAR)/usr/sbin
|
|---|
| 90 | $(INSTALL_BIN) $(WRKBUILD)/dropbearmulti \
|
|---|
| 91 | $(IDIR_DROPBEAR)/usr/sbin/dropbear
|
|---|
| 92 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/scp
|
|---|
| 93 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/ssh
|
|---|
| 94 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dbclient
|
|---|
| 95 | ln -sf ../sbin/dropbear $(IDIR_DROPBEAR)/usr/bin/dropbearkey
|
|---|
| 96 | $(INSTALL_BIN) ./files/dropbear.init \
|
|---|
| 97 | $(IDIR_DROPBEAR)/etc/init.d/S$(PKG_INIT)dropbear
|
|---|
| 98 | $(SED) "s/@OPTIONS@/$(DROPBEAR-OPTS-y)/" $(IDIR_DROPBEAR)/CONTROL/postinst
|
|---|
| 99 | $(RSTRIP) $(IDIR_DROPBEAR)
|
|---|
| 100 | $(IPKG_BUILD) $(IDIR_DROPBEAR) $(PACKAGE_DIR)
|
|---|