diff options
author | mandree <mandree@FreeBSD.org> | 2014-02-18 17:03:59 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2014-02-18 17:03:59 +0800 |
commit | 12d5c1a2081c19effdd66051a6707116256bdc05 (patch) | |
tree | 05a34dddd8db8c4a1432098205e9e702bdef4808 | |
parent | fbb19df06ae9a3f9d59e1ebd6e18506808309ffb (diff) | |
download | freebsd-ports-gnome-12d5c1a2081c19effdd66051a6707116256bdc05.tar.gz freebsd-ports-gnome-12d5c1a2081c19effdd66051a6707116256bdc05.tar.zst freebsd-ports-gnome-12d5c1a2081c19effdd66051a6707116256bdc05.zip |
- Repair PKCS11 option [1].
- Use the opportunity to simplify Makefile: leverage some of the
OptionsNG and Staging features, removing our homebrew predecessors.
- QA: Strip .so libraries, fix shebang paths in samples.
Obtained from: <https://forums.freebsd.org/viewtopic.php?f=7&t=44866> [1]
-rw-r--r-- | security/openvpn/Makefile | 91 |
1 files changed, 42 insertions, 49 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile index 7fb3afd747b6..d36534611ffe 100644 --- a/security/openvpn/Makefile +++ b/security/openvpn/Makefile @@ -1,76 +1,72 @@ # Created by: Matthias Andree <mandree@FreeBSD.org> # $FreeBSD$ -PORTNAME= openvpn -DISTVERSION= 2.3.2 -CATEGORIES= security net -MASTER_SITES= http://swupdate.openvpn.net/community/releases/ \ - http://build.openvpn.net/downloads/releases/ +PORTNAME= openvpn +DISTVERSION= 2.3.2 +PORTREVISION= 1 +CATEGORIES= security net +MASTER_SITES= http://swupdate.openvpn.net/community/releases/ \ + http://build.openvpn.net/downloads/releases/ -MAINTAINER= mandree@FreeBSD.org -COMMENT= Secure IP/Ethernet tunnel daemon +MAINTAINER= mandree@FreeBSD.org +COMMENT= Secure IP/Ethernet tunnel daemon -LICENSE= GPLv2 +LICENSE= GPLv2 CONFLICTS_INSTALL= openvpn-2.[!3].* openvpn-[!2].* openvpn-beta-[0-9]* openvpn-devel-[0-9]* -GNU_CONFIGURE= yes -USE_XZ= yes +GNU_CONFIGURE= yes +USE_XZ= yes +USES= shebangfix +SHEBANG_FILES= sample/sample-scripts/verify-cn \ + sample/sample-scripts/auth-pam.pl \ + sample/sample-scripts/ucn.pl + # let OpenVPN's configure script pick up the requisite libraries: -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFINE= PW_SAVE PKCS11 EASYRSA OPTIONS_DEFAULT= EASYRSA OPENSSL OPTIONS_SINGLE= SSL OPTIONS_SINGLE_SSL= OPENSSL POLARSSL -PW_SAVE_DESC= Interactive passwords may be read from a file -PKCS11_DESC= Use security/pkcs11-helper -EASYRSA_DESC= Install security/easy-rsa RSA helper package -POLARSSL_DESC= SSL/TLS support via PolarSSL +PW_SAVE_DESC= Interactive passwords may be read from a file +PKCS11_DESC= Use security/pkcs11-helper +EASYRSA_DESC= Install security/easy-rsa RSA helper package +POLARSSL_DESC= SSL/TLS support via PolarSSL -.include <bsd.port.options.mk> +EASYRSA_RUN_DEPENDS= easy-rsa>=0:${PORTSDIR}/security/easy-rsa -.if ${PORT_OPTIONS:MEASYRSA} -RUN_DEPENDS+= easy-rsa>=0:${PORTSDIR}/security/easy-rsa -.endif +PKCS11_LIB_DEPENDS= libpkcs11-helper.so:${PORTSDIR}/security/pkcs11-helper +PKCS11_CONFIGURE_ENABLE= pkcs11 + +PW_SAVE_CONFIGURE_ENABLE= password-save + +.include <bsd.port.options.mk> .if ${PORT_OPTIONS:MPOLARSSL} -LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl +LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl CONFIGURE_ARGS+= --with-crypto-library=polarssl .else -USE_OPENSSL= yes +USE_OPENSSL= yes CONFIGURE_ARGS+= --with-crypto-library=openssl .endif -.INSTALL_TARGET+= mandir=${MANPREFIX}/man -USE_RC_SUBR= openvpn -USE_LDCONFIG= ${PREFIX}/lib +USE_RC_SUBR= openvpn +USE_LDCONFIG= ${PREFIX}/lib -SUB_FILES= pkg-message +SUB_FILES= pkg-message .include <bsd.port.pre.mk> .ifdef (LOG_OPENVPN) -CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN} +CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN} .endif -LIB_DEPENDS+= liblzo2.so:${PORTSDIR}/archivers/lzo2 +LIB_DEPENDS+= liblzo2.so:${PORTSDIR}/archivers/lzo2 -PORTDOCS= * -PORTEXAMPLES= * - -.if ${PORT_OPTIONS:MPKCS11} -LIB_DEPENDS+= libpkcs11-helper.so:${PORTSDIR}/security/pkcs11-helper -.else -CONFIGURE_ARGS+= --disable-pkcs11 -.endif - -.if ${PORT_OPTIONS:MPW_SAVE} -CONFIGURE_ARGS+= --enable-password-save -.else -CONFIGURE_ARGS+= --disable-password-save -.endif +PORTDOCS= * +PORTEXAMPLES= * pre-configure: .ifdef (LOG_OPENVPN) @@ -92,14 +88,11 @@ post-build: .endif post-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/openvpn/plugins/ ${STAGEDIR}${PREFIX}/sbin \ - ${STAGEDIR}${PREFIX}/include ${STAGEDIR}${PREFIX}/man - #${INSTALL_PROGRAM} ${PREFIX}/sbin/openvpn ${STAGEDIR}${PREFIX}/sbin - #${INSTALL_DATA} ${PREFIX}/lib/openvpn/plugins/* ${STAGEDIR}${PREFIX}/lib/openvpn/plugins/ - #${INSTALL_DATA} ${PREFIX}/include/* ${STAGEDIR}${PREFIX}/include/ - #${INSTALL_MAN} ${PREFIX}/man/man8/* ${STAGEDIR}${MAN8PREFIX}/man/man8/ + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/openvpn/plugins/openvpn-plugin-auth-pam.so + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/openvpn/plugins/openvpn-plugin-down-root.so + ${MKDIR} ${STAGEDIR}${PREFIX}/include .if ${PORT_OPTIONS:MDOCS} - #(cd ${DOCSDIR_REL} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/) + ${MKDIR} ${STAGEDIR}${DOCSDIR}/ .for i in AUTHORS ChangeLog PORTS ${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/ .endfor |