45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
. ./scripts/colors.sh
|
|
. ./scripts/funcs.sh
|
|
. ./scripts/config.sh
|
|
. ./scripts/zlib.sh
|
|
|
|
dropbear() {
|
|
pkgname=dropbear
|
|
pkgver=2025.89
|
|
_archive=DROPBEAR_2025.89.tar.gz
|
|
srcurl=https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2025.89.tar.gz
|
|
print_info "** Building and installing dropbear"
|
|
[ -d $build/dropbear ] && return 0
|
|
mkdir -p $build/dropbear
|
|
cd $build/dropbear
|
|
if [ ! -f $root/downloads/${_archive} ]; then
|
|
print_info "** Downloading $srcurl"
|
|
cd $root/downloads
|
|
wget $srcurl
|
|
check $? "download $srcurl"
|
|
cd -
|
|
fi
|
|
tar -xf $root/downloads/${_archive}
|
|
check $? "Extract dropbear"
|
|
cd dropbear-DROPBEAR_2025.89
|
|
if [ "${ZLIB_ENABLE}" = "n" ]; then
|
|
./configure \
|
|
--prefix=/usr \
|
|
--host=$CROSS_COMPILE \
|
|
--disable-zlib
|
|
else
|
|
./configure \
|
|
--prefix=/usr \
|
|
--host=$CROSS_COMPILE \
|
|
--with-zlib=$build/rootfs/usr/include
|
|
fi
|
|
check $? "Configure dropbear"
|
|
make $makeflags
|
|
check $? "Build dropbear"
|
|
make DESTDIR=$rootfspath install
|
|
check $? "Installing to rootfs dropbear"
|
|
mkdir -pv $build/rootfs/etc/dropbear
|
|
}
|