Subject: OpenSSH and OpenSSL: a solution?
To: None <tech-pkg@netbsd.org>
From: Johnny C. Lam <lamj@stat.cmu.edu>
List: tech-pkg
Date: 07/21/2000 02:13:19
I've got an upgrade of OpenSSH to 2.1.1p4.  Along the way, I've
devised this to check for a usable installed version of OpenSSL and
placed it in the openssl package Makefile.  This works correctly on my
1.5B system compiled from sources dated 20000718.  Any comments?

# Check for a usable installed version of OpenSSL.  Version must be greater
# than 0.9.5a.  If a usable version isn't present, then use the pkgsrc
# OpenSSL package.
#
.if exists(/usr/include/openssl/rsa.h)
OPENSSLV_H=		/usr/include/openssl/opensslv.h
OPENSSL_VERSION!=	awk '/.*OPENSSL_VERSION_NUMBER.*/ { print $$3 }' \
				${OPENSSLV_H}
OPENSSL_VERSION_095a=	0x0090581fL
.if (${OPENSSL_VERSION} != ${OPENSSL_VERSION_095a})
DEPENDS+=		openssl>=0.9.5:../../security/openssl
SSLBASE=		${LOCALBASE}
.else
SSLBASE=		/usr
.endif
.else
DEPENDS+=		openssl>=0.9.5:../../security/openssl
SSLBASE=		${LOCALBASE}
.endif