termux-packages/packages/dropbear/build.sh
Leonid Pliushch c352216c63 packages: standardize values of several control variables for build.sh
Variables

 TERMUX_PKG_PLATFORM_INDEPENDENT
 TERMUX_DEBUG
 TERMUX_PKG_HAS_DEBUG
 TERMUX_PKG_ESSENTIAL
 TERMUX_SUBPKG_ESSENTIAL
 TERMUX_PKG_NO_STATICSPLIT
 TERMUX_PKG_BUILD_IN_SRC
 TERMUX_PKG_FORCE_CMAKE
 TERMUX_PKG_HOSTBUILD

should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.

build-package.sh should make decision based on variable's value but not on
whether it is set or empty.

%ci:no-build
2019-08-12 18:49:13 +03:00

38 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://matt.ucc.asn.au/dropbear/dropbear.html
TERMUX_PKG_DESCRIPTION="Small SSH server and client"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=2019.78
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=525965971272270995364a0eb01f35180d793182e63dd0b0c3eb0292291644a4
TERMUX_PKG_SRCURL=https://matt.ucc.asn.au/dropbear/releases/dropbear-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="termux-auth, zlib"
TERMUX_PKG_CONFLICTS="openssh"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-syslog --disable-utmp --disable-utmpx --disable-wtmp --disable-static"
# Avoid linking to libcrypt for server password authentication:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_lib_crypt_crypt=no"
# build a multi-call binary & enable progress info in 'scp'
TERMUX_PKG_EXTRA_MAKE_ARGS="MULTI=1 SCPPROGRESS=1"
termux_step_pre_configure() {
export LIBS="-ltermux-auth"
}
termux_step_post_make_install() {
ln -sf "dropbearmulti" "${TERMUX_PREFIX}/bin/ssh"
}
termux_step_create_debscripts() {
{
echo "#!$TERMUX_PREFIX/bin/sh"
echo "mkdir -p $TERMUX_PREFIX/etc/dropbear"
echo "for a in rsa dss ecdsa; do"
echo " KEYFILE=$TERMUX_PREFIX/etc/dropbear/dropbear_\${a}_host_key"
echo " test ! -f \$KEYFILE && dropbearkey -t \$a -f \$KEYFILE"
echo "done"
echo "exit 0"
} > postinst
chmod 0755 postinst
}