1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00
build/pkg/openssh/build
David Oberhollenzer b1bdce20a9 Add automatic update chacking script
Crunch project websites and try to find the latest version for each
package without having to do the work manually.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-08 15:01:23 +02:00

45 lines
No EOL
1.1 KiB
Text

VERSION="7.7p1"
SRCDIR="openssh-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable"
SHA256SUM="d73be7e684e99efcd024be15a30bffcbe41b012b2f7b3c9084aed621775e6b8f"
DEPENDS="openssl zlib"
prepare() {
apply_patches
}
build() {
$1/configure --prefix="" --host="$TARGET" --sbindir=/bin \
--libexecdir=/lib/libexec \
--with-pie --without-pam --without-stackprotect \
--without-selinux --disable-strip \
--with-sandbox=seccomp_filter \
--with-privsep-path=/var/lib/sshd
make -j $NUMJOBS
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
make DESTDIR="$DEPLOY" install
mkdir -p "$DEPLOY/var/lib/sshd"
chmod 700 "$DEPLOY/var/lib/sshd"
rm -r "$DEPLOY/share"
strip_files ${DEPLOY}/bin/* ${DEPLOY}/libexec/*
install -v -m755 "$SOURCE/contrib/ssh-copy-id" "$DEPLOY/bin"
}
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"
}