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 c8d01f966a Use pkgtool to resolve and manage dependencies, add sub package support
Been working on this for too long, don't remember the specifics, will add
documentation.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 17:47:02 +01:00

39 lines
No EOL
1 KiB
Text

VERSION="7.9p1"
SRCDIR="openssh-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable"
SHA256SUM="6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad"
DEPENDS="openssl-dev zlib-dev crt-dev"
prepare() {
return
}
build() {
run_configure "$1" --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
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$DEPLOY"
mkdir -p "$DEPLOY/var/lib/sshd"
install -v -m755 "$SOURCE/contrib/ssh-copy-id" "$DEPLOY/bin"
cat_file_override "sshd_config" > "$DEPLOY/etc/sshd_config"
}
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"
}