1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Update to latest snapshot 201421

- Support staging
- Sync more with security/openvpn

PR:		190312
Submitted by:	ecrist@secure-computing.net (maintainer)
This commit is contained in:
Bryan Drewery 2014-06-06 17:12:08 +00:00
parent baa2d05ac3
commit 3889ee4386
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356822
3 changed files with 73 additions and 121 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= openvpn
DISTVERSION= 201326
PORTREVISION= 2
DISTVERSION= 201421
CATEGORIES= security net
MASTER_SITES= ftp://ftp.secure-computing.net/pub/FreeBSD/ports/openvpn-devel/ \
ftp://ftp2.secure-computing.net/pub/FreeBSD/ports/openvpn-devel/
@ -16,110 +15,102 @@ LICENSE= GPLv2
WRKSRC= ${WRKDIR}/${PORTNAME}${PKGNAMESUFFIX}
CONFLICTS_INSTALL= openvpn-[0-9]* openvpn-beta-[0-9]*
GNU_CONFIGURE= yes
USES= libtool pkgconfig shebangfix tar:xz
SHEBANG_FILES= sample/sample-scripts/verify-cn \
sample/sample-scripts/auth-pam.pl \
sample/sample-scripts/ucn.pl
GNU_CONFIGURE= yes
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install mandir=${MANPREFIX}/man
# let OpenVPN's configure script pick up the requisite libraries:
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAN8= openvpn.8
OPTIONS_DEFINE= PW_SAVE PKCS11 EASYRSA LZO SNAPPY
OPTIONS_DEFAULT= EASYRSA OPENSSL
OPTIONS_SINGLE= SSL
OPTIONS_SINGLE_SSL= OPENSSL POLARSSL
PW_SAVE_DESC= Interactive passwords may be read from a file
SNAPPY_DESC= Enable the Snappy compression library
LZO_DESC= Enable the LZO compression library
PKCS11_DESC= Use security/pkcs11-helper
EASYRSA_DESC= Install security/easy-rsa RSA helper package
POLARSSL_DESC= SSL/TLS support via PolarSSL
OPTIONS_DEFINE= PW_SAVE SNAPPY LZO PKCS11 POLARSSL
PW_SAVE_DESC= Interactive passwords may be read from a file
SNAPPY_DESC= Enable the Snappy compression library
LZO_DESC= Enable the LZO compression library
PKCS11_DESC= Use security/pkcs11-helper
POLARSSL_DESC= Build with PolarSSL instead of OpenSSL
OPTIONS_DEFAULT= LZO SNAPPY
EASYRSA_RUN_DEPENDS= easy-rsa>=0:${PORTSDIR}/security/easy-rsa
USE_RC_SUBR= openvpn
USE_LDCONFIG= ${PREFIX}/lib
PKCS11_LIB_DEPENDS= libpkcs11-helper.so:${PORTSDIR}/security/pkcs11-helper
PKCS11_CONFIGURE_ENABLE= pkcs11
SUB_FILES= pkg-message
SUB_LIST+= OSVERSION=${OSVERSION}
PW_SAVE_CONFIGURE_ENABLE= password-save
.if defined(PACKAGE_BUILDING)
WITHOUT_CHECK= yes
.endif
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPOLARSSL}
LIB_DEPENDS+= libpolarssl.so:${PORTSDIR}/security/polarssl
CONFIGURE_ARGS+= --with-crypto-library=polarssl
.else
USE_OPENSSL= yes
CONFIGURE_ARGS+= --with-crypto-library=openssl
.endif
USE_RC_SUBR= openvpn
USE_LDCONFIG= ${PREFIX}/lib
SUB_FILES= pkg-message
.ifdef (LOG_OPENVPN)
CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN}
CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN}
.endif
.if ${PORT_OPTIONS:MLZO}
LIB_DEPENDS+= lzo2:${PORTSDIR}/archivers/lzo2
LIB_DEPENDS+= liblzo2.so:${PORTSDIR}/archivers/lzo2
.else
CONFIGURE_ARGS+= --disable-lzo
CONFIGURE_ARGS+= --disable-lzo
.endif
.if ${PORT_OPTIONS:MSNAPPY}
LIB_DEPENDS+= snappy:${PORTSDIR}/archivers/snappy
LIB_DEPENDS+= snappy:${PORTSDIR}/archivers/snappy
.else
CONFIGURE_ARGS+= --disable-snappy
CONFIGURE_ARGS+= --disable-snappy
.endif
.if ${PORT_OPTIONS:MPOLARSSL}
LIB_DEPENDS+= polarssl:${PORTSDIR}/security/polarssl
CONFIGURE_ARGS+= --with-crypto-library=polarssl
WITHOUT_CHECK= yes
.else
USE_OPENSSL= yes
.endif
PORTDOCS= *
PORTEXAMPLES= *
pre-fetch:
pre-configure:
.ifdef (LOG_OPENVPN)
@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}"
@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}"
.else
@${ECHO} ""
@${ECHO} "You may use the following build options:"
@${ECHO} ""
@${ECHO} " LOG_OPENVPN={Valid syslog facility}"
@${ECHO} " EXAMPLE: make LOG_OPENVPN=LOG_DAEMON"
@${ECHO} ""
@${ECHO} ""
@${ECHO} "You may use the following build options:"
@${ECHO} ""
@${ECHO} " LOG_OPENVPN={Valid syslog facility, default LOG_DAEMON}"
@${ECHO} " EXAMPLE: make LOG_OPENVPN=LOG_LOCAL6"
@${ECHO} ""
.endif
.if ${PORT_OPTIONS:MPW_SAVE}
CONFIGURE_ARGS+= --enable-password-save
.endif
.if ${PORT_OPTIONS:MPKCS11}
LIB_DEPENDS+= pkcs11-helper:${PORTSDIR}/security/pkcs11-helper
.else
CONFIGURE_ARGS+= --disable-pkcs11
.endif
post-patch:
@${FIND} ${WRKSRC} -name \*.orig -delete
@${FIND} ${WRKSRC} -name \*.bak -delete
post-build:
cd ${WRKSRC}/src/plugins/down-root && ${MAKE}
cd ${WRKSRC}/src/plugins/auth-pam && ${CC} ${CPPFLAGS} -I../../../include -DDLOPEN_PAM=0 ${CFLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.c pamdl.c -lc -lpam
@# self-tests here
@# self-tests here
.if !defined(WITHOUT_CHECK)
cd ${WRKSRC} && ${MAKE} check
@${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO}
cd ${WRKSRC} && ${DO_MAKE_BUILD} check
.endif
post-install:
${MKDIR} ${PREFIX}/lib
${LN} -s ${PREFIX}/lib/openvpn/plugins/openvpn-plugin-down-root.so ${PREFIX}/lib/openvpn-down-root.so
${LN} -s ${PREFIX}/lib/openvpn/plugins/openvpn-plugin-auth-pam.so ${PREFIX}/lib/openvpn-auth-pam.so
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \
PORTS README
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/
${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}
${MKDIR} ${STAGEDIR}${DOCSDIR}/
.for i in AUTHORS ChangeLog PORTS
${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
.endfor
.for sample in sample-config-files sample-scripts
(cd ${WRKSRC}/sample/${sample} && ${COPYTREE_SHARE} \* ${DOCSDIR}/${sample})
.endfor
.else
-@${RMDIR} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
.if ${PORT_OPTIONS:MEXAMPLES}
(cd ${WRKSRC}/sample && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/)
${CHMOD} ${BINMODE} ${STAGEDIR}${EXAMPLESDIR}/sample-scripts/*
.endif
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (openvpn-201326.tar.gz) = b957b0a7e6644302cfb0bc6673fdff9e6400922c169e1659eb6d9f95dd17952f
SIZE (openvpn-201326.tar.gz) = 1512215
SHA256 (openvpn-201421.tar.xz) = 08b7382b9614a9555d70948dcd70c5377e01560ed03adba8b9efdff61fd2eb18
SIZE (openvpn-201421.tar.xz) = 801276

View File

@ -1,46 +1,7 @@
lib/openvpn/plugins/openvpn-plugin-auth-pam.so
lib/openvpn/plugins/openvpn-plugin-auth-pam.la
lib/openvpn/plugins/openvpn-plugin-down-root.so
lib/openvpn/plugins/openvpn-plugin-down-root.la
lib/openvpn-auth-pam.so
lib/openvpn-down-root.so
include/openvpn-plugin.h
lib/openvpn/plugins/openvpn-plugin-auth-pam.so
lib/openvpn/plugins/openvpn-plugin-down-root.so
man/man8/openvpn.8.gz
sbin/openvpn
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/PORTS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.auth-pam
%%PORTDOCS%%%%DOCSDIR%%/README.down-root
%%PORTDOCS%%%%DOCSDIR%%/README.IPv6
%%PORTDOCS%%%%DOCSDIR%%/README.polarssl
%%PORTDOCS%%%%DOCSDIR%%/management-notes.txt
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/README
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/client.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/firewall.sh
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/home.up
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/loopback-client
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/loopback-server
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/office.up
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/openvpn-shutdown.sh
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/openvpn-startup.sh
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/server.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/static-home.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/static-office.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/tls-home.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/tls-office.conf
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/xinetd-client-config
%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/xinetd-server-config
%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/auth-pam.pl
%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/bridge-start
%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/bridge-stop
%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/ucn.pl
%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/verify-cn
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/sample-scripts
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/sample-config-files
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
@dirrmtry lib/openvpn/plugins
@dirrmtry lib/openvpn
@dirrm lib/openvpn/plugins
@dirrm lib/openvpn