aboutsummaryrefslogtreecommitdiff
path: root/security/openvpn/Makefile
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-10-20 15:03:44 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-10-20 15:03:44 +0000
commitca0156916b9e0ddae2efd9929ef444a0ffff8f99 (patch)
tree1b0f8169161ab1b332ec3d9806fdfbd3d6a532b7 /security/openvpn/Makefile
parent7e01df97002152fff556f3fe185bcd81ec9351b9 (diff)
downloadports-ca0156916b9e0ddae2efd9929ef444a0ffff8f99.tar.gz
ports-ca0156916b9e0ddae2efd9929ef444a0ffff8f99.zip
Use options helpers.
Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=399858
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>