From 586798fba58c4ae634a4563316eed7bb8963548c Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 2 Jan 2001 21:05:50 +0000 Subject: Depending on whether we use the in-tree OpenSSL or pkgsrc OpenSSL, the default certificates directory is /etc/openssl/certs or ${PREFIX}/certs. Pass the correct directory to the c-client library build so that SSL authentication works as expected regardless of which version of NetBSD we use. --- mail/imap-uw/Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile index e07a533cc5d..9042717dbef 100644 --- a/mail/imap-uw/Makefile +++ b/mail/imap-uw/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2000/12/17 18:25:43 jlam Exp $ +# $NetBSD: Makefile,v 1.20 2001/01/02 21:05:50 jlam Exp $ DISTNAME= imap-2000a PKGNAME= imap-uw-2000a @@ -30,7 +30,7 @@ NO_CONFIGURE= # defined USE_SSL= # defined MAKE_ENV+= SSLBASE="${SSLBASE}" -MAKE_ENV+= SSLCERTS="/etc/openssl/certs" +MAKE_ENV+= SSLCERTS="${SSL_CERT_DIR}" ALL_TARGET+= CC="${LIBTOOL} ${CC}" ALL_TARGET+= EXTRACFLAGS="${CFLAGS}" ALL_TARGET+= SPECIALAUTHENTICATORS="ssl" @@ -68,3 +68,17 @@ do-install: done .include "../../mk/bsd.pkg.mk" + +# The in-tree OpenSSL uses /etc/openssl/certs as the default location for +# certificates, while the pkgsrc OpenSSL uses ${PREFIX}/certs. Define +# SSL_CERT_DIR appropriately using a shell expression, and make sure that +# it's only executed once to optimize the build. +# +.if !defined(SSL_CERT_DIR) +SSL_CERT_DIR!= if ${TEST} -d /etc/openssl/certs; then \ + ${ECHO} /etc/openssl/certs; \ + else \ + ${ECHO} ${PREFIX}/certs; \ + fi +MAKEFLAGS+= SSL_CERT_DIR="${SSL_CERT_DIR}" +.endif -- cgit v1.2.3