################################################################
# OpenSSH Portable - a secure shell client and server for *nix #
#                                                              #
# http://www.openssh.com/                                      #
################################################################

[buildout]
extends = 
  ../openssl/buildout.cfg
  ../patch/buildout.cfg
  ../zlib/buildout.cfg

parts =
  openssh

[openssh]
recipe = slapos.recipe.cmmi
shared = true
md5sum = 8ce5f390958baeeab635aafd0ef41453
location = @@LOCATION@@
url = https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.8p1.tar.gz
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
  ${:_profile_base_location_}/no_create_privsep_path.patch#6ab983d16c9b4caf111c737dcad6ec9b
environment = 
  CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include
  LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
configure-options = 
  --prefix=${:location}
  --exec-prefix=${:location}
  --with-privsep-path=${:location}/var/empty

[openssh-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:ssh} -a -x ${:keygen}
ssh = ${openssh:location}/bin/ssh
keygen = ${openssh:location}/bin/ssh-keygen
