2002-06-24 18:13:10 +02:00
|
|
|
# New ports collection makefile for: openvpn
|
|
|
|
# Date created: 2002-06-23
|
- Security update to version 2.0.1, fixing four denial of service bugs,
CAN-2005-2531, CAN-2005-2532, CAN-2005-2533, CAN-2005-2534
- Drop old init script and add a modern rcNG script in its place,
requested by Matthias Grimm and Dirk Gouders (although the script below is
one I, Matthias Andree, wrote). It can automatically load tun/tap drivers.
- move pkg-message to files/pkg-message.in, revise it, list it in SUB_FILES
to expand ${PREFIX}.
- print pkg-message after installation from port
- switch to official "make check" as smoke-test, rather than wiring our own.
- prefer LZO2 in most situations, as OpenVPN will pick up LZO2 rather than
LZO1 if both are installed.
PR: ports/85109
Submitted by: maintainer
Approved by: portmgr (krion)
2005-08-19 20:48:34 +02:00
|
|
|
# Whom: Matthias Andree <matthias.andree@gmx.de>
|
2002-06-24 18:13:10 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= openvpn
|
2011-12-28 21:43:49 +01:00
|
|
|
DISTVERSION= 2.2.2
|
2005-11-10 16:05:42 +01:00
|
|
|
CATEGORIES= security net
|
|
|
|
# MASTER_SITES points to hosts in distinct data centers,
|
|
|
|
# so just one MASTER_SITES entry should be OK.
|
2011-05-03 21:24:48 +02:00
|
|
|
MASTER_SITES= http://swupdate.openvpn.net/community/releases/ \
|
|
|
|
${MASTER_SITE_LOCAL:S,$,mandree/,}
|
2002-06-24 18:13:10 +02:00
|
|
|
|
2010-01-07 17:28:56 +01:00
|
|
|
MAINTAINER= mandree@FreeBSD.org
|
2003-02-21 14:28:59 +01:00
|
|
|
COMMENT= Secure IP/Ethernet tunnel daemon
|
2002-06-24 18:13:10 +02:00
|
|
|
|
2011-05-03 21:24:48 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2011-10-04 23:58:09 +02:00
|
|
|
CONFLICTS_INSTALL= openvpn-devel-[0-9]* openvpn-2.0* openvpn-beta-[0-9]*
|
2006-08-20 09:06:37 +02:00
|
|
|
|
2002-06-24 18:13:10 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_OPENSSL= yes
|
2010-11-09 21:25:58 +01:00
|
|
|
USE_XZ= yes
|
2002-06-24 18:13:10 +02:00
|
|
|
CONFIGURE_ARGS= --with-lzo-lib=${LOCALBASE}/lib \
|
2005-04-21 16:04:41 +02:00
|
|
|
--with-lzo-headers=${LOCALBASE}/include
|
2011-08-09 00:38:44 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
INSTALL_TARGET= install
|
|
|
|
.else
|
|
|
|
INSTALL_TARGET= install-exec install-man
|
|
|
|
.endif
|
2002-06-24 18:13:10 +02:00
|
|
|
|
2011-08-09 00:38:44 +02:00
|
|
|
INSTALL_TARGET+= mandir=${MANPREFIX}/man
|
2002-06-24 18:13:10 +02:00
|
|
|
MAN8= openvpn.8
|
|
|
|
|
2010-01-07 17:28:56 +01:00
|
|
|
OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off \
|
|
|
|
PKCS11 "Use security/pkcs11-helper" off
|
2005-07-14 15:15:47 +02:00
|
|
|
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= openvpn
|
2006-07-28 11:56:54 +02:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib
|
- Security update to version 2.0.1, fixing four denial of service bugs,
CAN-2005-2531, CAN-2005-2532, CAN-2005-2533, CAN-2005-2534
- Drop old init script and add a modern rcNG script in its place,
requested by Matthias Grimm and Dirk Gouders (although the script below is
one I, Matthias Andree, wrote). It can automatically load tun/tap drivers.
- move pkg-message to files/pkg-message.in, revise it, list it in SUB_FILES
to expand ${PREFIX}.
- print pkg-message after installation from port
- switch to official "make check" as smoke-test, rather than wiring our own.
- prefer LZO2 in most situations, as OpenVPN will pick up LZO2 rather than
LZO1 if both are installed.
PR: ports/85109
Submitted by: maintainer
Approved by: portmgr (krion)
2005-08-19 20:48:34 +02:00
|
|
|
|
2010-01-07 17:28:56 +01:00
|
|
|
SUB_FILES= pkg-message
|
2006-07-28 11:56:54 +02:00
|
|
|
SUB_LIST+= OSVERSION=${OSVERSION}
|
- Security update to version 2.0.1, fixing four denial of service bugs,
CAN-2005-2531, CAN-2005-2532, CAN-2005-2533, CAN-2005-2534
- Drop old init script and add a modern rcNG script in its place,
requested by Matthias Grimm and Dirk Gouders (although the script below is
one I, Matthias Andree, wrote). It can automatically load tun/tap drivers.
- move pkg-message to files/pkg-message.in, revise it, list it in SUB_FILES
to expand ${PREFIX}.
- print pkg-message after installation from port
- switch to official "make check" as smoke-test, rather than wiring our own.
- prefer LZO2 in most situations, as OpenVPN will pick up LZO2 rather than
LZO1 if both are installed.
PR: ports/85109
Submitted by: maintainer
Approved by: portmgr (krion)
2005-08-19 20:48:34 +02:00
|
|
|
|
2005-07-14 15:15:47 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2009-01-25 09:10:57 +01:00
|
|
|
.ifdef (LOG_OPENVPN)
|
|
|
|
CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN}
|
|
|
|
.endif
|
|
|
|
|
2005-11-02 02:52:51 +01:00
|
|
|
LIB_DEPENDS+= lzo2.2:${PORTSDIR}/archivers/lzo2
|
- Security update to version 2.0.1, fixing four denial of service bugs,
CAN-2005-2531, CAN-2005-2532, CAN-2005-2533, CAN-2005-2534
- Drop old init script and add a modern rcNG script in its place,
requested by Matthias Grimm and Dirk Gouders (although the script below is
one I, Matthias Andree, wrote). It can automatically load tun/tap drivers.
- move pkg-message to files/pkg-message.in, revise it, list it in SUB_FILES
to expand ${PREFIX}.
- print pkg-message after installation from port
- switch to official "make check" as smoke-test, rather than wiring our own.
- prefer LZO2 in most situations, as OpenVPN will pick up LZO2 rather than
LZO1 if both are installed.
PR: ports/85109
Submitted by: maintainer
Approved by: portmgr (krion)
2005-08-19 20:48:34 +02:00
|
|
|
|
2005-07-14 15:15:47 +02:00
|
|
|
.if defined(WITH_PW_SAVE)
|
|
|
|
CONFIGURE_ARGS+= --enable-password-save
|
|
|
|
.endif
|
|
|
|
|
2010-01-07 17:28:56 +01:00
|
|
|
.if defined(WITH_PKCS11)
|
|
|
|
LIB_DEPENDS+= pkcs11-helper.1:${PORTSDIR}/security/pkcs11-helper
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pkcs11
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2010-06-05 16:12:29 +02:00
|
|
|
@${FIND} ${WRKSRC}/easy-rsa/?.0 -type f \
|
|
|
|
-exec ${REINPLACE_CMD} -e 's;#!/bin/bash;#!/bin/sh;' \
|
|
|
|
-e 's,source ./vars,. ./vars,' \{\} +
|
2011-06-20 23:14:23 +02:00
|
|
|
@${FIND} ${WRKSRC}/plugin -name Makefile \
|
|
|
|
-exec ${REINPLACE_CMD} -e 's;gcc;${CC};g' '{}' +
|
|
|
|
@${FIND} ${WRKSRC} \( -name \*.orig -o -name \*.bak \) -delete
|
2010-01-07 17:28:56 +01:00
|
|
|
|
2011-07-07 02:16:57 +02:00
|
|
|
pre-configure:
|
|
|
|
.ifdef (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, default LOG_DAEMON}"
|
|
|
|
@${ECHO} " EXAMPLE: make LOG_OPENVPN=LOG_DAEMON"
|
|
|
|
@${ECHO} ""
|
|
|
|
.endif
|
|
|
|
|
2005-04-21 16:04:41 +02:00
|
|
|
post-build:
|
2011-06-20 23:14:23 +02:00
|
|
|
cd ${WRKSRC}/plugin/down-root && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS}
|
2006-10-02 19:47:32 +02:00
|
|
|
cd ${WRKSRC}/plugin/auth-pam && ${CC} ${CPPFLAGS} -I../.. -DDLOPEN_PAM=0 ${CFLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.c pamdl.c -lc -lpam
|
2006-07-28 11:56:54 +02:00
|
|
|
@# self-tests here
|
|
|
|
.if !defined(WITHOUT_CHECK)
|
2011-01-08 11:07:00 +01:00
|
|
|
@${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO}
|
2011-06-20 23:14:23 +02:00
|
|
|
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} check
|
2006-07-28 11:56:54 +02:00
|
|
|
.endif
|
|
|
|
|
2002-06-24 18:13:10 +02:00
|
|
|
post-install:
|
2006-07-28 11:56:54 +02:00
|
|
|
${MKDIR} ${PREFIX}/lib
|
2010-01-07 17:28:56 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so ${PREFIX}/lib/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/plugin/auth-pam/openvpn-auth-pam.so ${PREFIX}/lib/
|
2002-06-24 18:13:10 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2005-04-21 16:04:41 +02:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2006-09-30 09:48:24 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README ${DOCSDIR}/README.openvpn-down-root
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/plugin/auth-pam/README ${DOCSDIR}/README.openvpn-auth-pam
|
2010-01-07 17:28:56 +01:00
|
|
|
.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \
|
2002-06-24 18:13:10 +02:00
|
|
|
PORTS README
|
2010-01-07 17:28:56 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/
|
2002-06-24 18:13:10 +02:00
|
|
|
.endfor
|
2010-01-07 17:28:56 +01:00
|
|
|
.for dir in easy-rsa easy-rsa/1.0 easy-rsa/2.0 sample-config-files
|
2008-07-18 12:49:40 +02:00
|
|
|
${MKDIR} ${DOCSDIR}/${dir}
|
|
|
|
${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \;
|
|
|
|
.endfor
|
|
|
|
.for dir in sample-scripts
|
|
|
|
${MKDIR} ${DOCSDIR}/${dir}
|
|
|
|
${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_SCRIPT} \{\} ${DOCSDIR}/${dir} \;
|
|
|
|
.endfor
|
2010-01-07 17:28:56 +01:00
|
|
|
.else
|
|
|
|
-@${RMDIR} ${DOCSDIR}
|
2002-06-24 18:13:10 +02:00
|
|
|
.endif
|
- Security update to version 2.0.1, fixing four denial of service bugs,
CAN-2005-2531, CAN-2005-2532, CAN-2005-2533, CAN-2005-2534
- Drop old init script and add a modern rcNG script in its place,
requested by Matthias Grimm and Dirk Gouders (although the script below is
one I, Matthias Andree, wrote). It can automatically load tun/tap drivers.
- move pkg-message to files/pkg-message.in, revise it, list it in SUB_FILES
to expand ${PREFIX}.
- print pkg-message after installation from port
- switch to official "make check" as smoke-test, rather than wiring our own.
- prefer LZO2 in most situations, as OpenVPN will pick up LZO2 rather than
LZO1 if both are installed.
PR: ports/85109
Submitted by: maintainer
Approved by: portmgr (krion)
2005-08-19 20:48:34 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2002-06-24 18:13:10 +02:00
|
|
|
|
2005-07-14 15:15:47 +02:00
|
|
|
.include <bsd.port.post.mk>
|