1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-20 12:36:14 +02:00
build/pkg/openssh/build
David Oberhollenzer fa4eff263b Cleanup: implement defaults for package functions
This commit adds an "emptypackage" template that implements defaults
for all package functions and is included before every package.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-16 15:16:58 +02:00

34 lines
984 B
Plaintext

VERSION="8.2p1"
SRCDIR="openssh-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable"
SHA256SUM="43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671"
DEPENDS="openssl-dev zlib-dev toolchain"
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"
make DESTDIR="$PKGDEPLOYDIR" install
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
cp "$SOURCE/contrib/ssh-copy-id" "$PKGDEPLOYDIR/bin"
cat_file_override "sshd_config" > "$PKGDEPLOYDIR/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"
}