aboutsummaryrefslogtreecommitdiff
path: root/security/openvpn/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/openvpn/Makefile')
-rw-r--r--security/openvpn/Makefile34
1 files changed, 13 insertions, 21 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile
index aee8d70305db..fc11af52dd1c 100644
--- a/security/openvpn/Makefile
+++ b/security/openvpn/Makefile
@@ -46,27 +46,19 @@ PW_SAVE_CONFIGURE_ENABLE= password-save
X509ALTUSERNAME_CONFIGURE_ENABLE= x509-alt-username
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MPOLARSSL}
-. if ${PORT_OPTIONS:MX509ALTUSERNAME}
-BROKEN= OpenVPN ${DISTVERSION} cannot use --x509-username-field with PolarSSL. Disable X509ALTUSERNAME, or use OpenSSL instead
-. else
-LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl
-CONFIGURE_ARGS+= --with-crypto-library=polarssl
-. endif
-.else
-USE_OPENSSL= yes
-CONFIGURE_ARGS+= --with-crypto-library=openssl
-.endif
+X509ALTUSERNAME_PREVENTS= POLARSSL
+X509ALTUSERNAME_PREVENTS_MSG= OpenVPN ${DISTVERSION} cannot use --x509-username-field with PolarSSL. Disable X509ALTUSERNAME, or use OpenSSL instead
+
+POLARSSL_LIB_DEPENDS= libpolarssl.so:${PORTSDIR}/security/polarssl
+POLARSSL_CONFIGURE_ON= --with-crypto-library=polarssl
+POLARSSL_USE= openssl=yes
+POLARSSL_CONFIGURE_OFF= --with-crypto-library=openssl
USE_RC_SUBR= openvpn
USE_LDCONFIG= ${PREFIX}/lib
SUB_FILES= pkg-message openvpn-client
-.include <bsd.port.pre.mk>
-
.ifdef (LOG_OPENVPN)
CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN}
.endif
@@ -93,9 +85,9 @@ post-configure:
${WRKSRC}/src/plugins/auth-pam/Makefile \
${WRKSRC}/src/plugins/down-root/Makefile
+.if !defined(WITHOUT_CHECK)
post-build:
@# self-tests here
-.if !defined(WITHOUT_CHECK)
@${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO}
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} check
.endif
@@ -108,15 +100,15 @@ post-install:
@${REINPLACE_CMD} 's|resolvconf -p -a|resolvconf -a|' ${STAGEDIR}${PREFIX}/libexec/openvpn-client.up
${INSTALL_SCRIPT} ${WRKDIR}/openvpn-client ${STAGEDIR}${PREFIX}/sbin/openvpn-client
${MKDIR} ${STAGEDIR}${PREFIX}/include
-.if ${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}/
.for i in AUTHORS ChangeLog PORTS
${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
.endfor
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
+
+post-install-EXAMPLES-on:
(cd ${WRKSRC}/sample && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/)
${CHMOD} ${BINMODE} ${STAGEDIR}${EXAMPLESDIR}/sample-scripts/*
-.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>