2018-04-05 21:50:31 +02:00
|
|
|
VERSION="7.7p1"
|
2018-02-12 01:27:58 +01:00
|
|
|
SRCDIR="openssh-${VERSION}"
|
|
|
|
TARBALL="${SRCDIR}.tar.gz"
|
|
|
|
URL="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable"
|
2018-04-05 21:50:31 +02:00
|
|
|
SHA256SUM="d73be7e684e99efcd024be15a30bffcbe41b012b2f7b3c9084aed621775e6b8f"
|
2018-02-12 01:27:58 +01:00
|
|
|
DEPENDS="openssl zlib"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
apply_patches
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2018-02-16 23:22:04 +01:00
|
|
|
$1/configure --prefix="" --host="$TARGET" --sbindir=/bin \
|
2018-04-06 01:03:29 +02:00
|
|
|
--libexecdir=/lib/libexec \
|
2018-02-16 23:22:04 +01:00
|
|
|
--with-pie --without-pam --without-stackprotect \
|
|
|
|
--without-selinux --disable-strip \
|
|
|
|
--with-sandbox=seccomp_filter \
|
|
|
|
--with-privsep-path=/var/lib/sshd
|
2018-02-12 01:27:58 +01:00
|
|
|
|
|
|
|
make -j $NUMJOBS
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
2018-02-16 23:22:04 +01:00
|
|
|
local DEPLOY="$2"
|
2018-02-12 01:27:58 +01:00
|
|
|
|
|
|
|
make DESTDIR="$DEPLOY" install
|
2018-06-16 17:46:17 +02:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
|
2018-02-12 01:27:58 +01:00
|
|
|
mkdir -p "$DEPLOY/var/lib/sshd"
|
|
|
|
install -v -m755 "$SOURCE/contrib/ssh-copy-id" "$DEPLOY/bin"
|
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
local version=$(echo $VERSION | sed 's/p/./g')
|
|
|
|
|
|
|
|
curl --silent -L "$URL" | grep -o ">openssh-[0-9.]*p[0-9]*.tar.gz<" | \
|
|
|
|
sed 's/>openssh-//g' | sed 's/.tar.gz<//g' | sed 's/p/./g' | \
|
|
|
|
verson_find_greatest "$version"
|
|
|
|
}
|