Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Aug 2010 10:14:37 -0500 (CDT)
From:      Eric F Crist <ecrist@secure-computing.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Josh Paetzel <jpaetzel@FreeBSD.org>
Subject:   ports/149620: [NEW PORT] security/openvpn-beta: New beta port for OpenVPN
Message-ID:  <20100813151437.439996D437@cartman.secure-computing.net>
Resent-Message-ID: <201008131520.o7DFK12S012500@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         149620
>Category:       ports
>Synopsis:       [NEW PORT] security/openvpn-beta: New beta port for OpenVPN
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 13 15:20:00 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eric F Crist
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
Secure Computing Networks
>Environment:
System: FreeBSD cartman.secure-computing.net 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Mon Apr 12 12:46:23 CDT 2010 root@cartman.secure-computing.net:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	This is a new port for OpenVPN beta releases, starting with 2.2-beta1.
>How-To-Repeat:
>Fix:

--- ovpnb.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	openvpn-beta
#	openvpn-beta/files
#	openvpn-beta/files/openvpn.sh.in
#	openvpn-beta/files/pkg-message.in
#	openvpn-beta/files/pkg-req.in
#	openvpn-beta/files/openvpn.sh.in.orig
#	openvpn-beta/pkg-descr
#	openvpn-beta/pkg-plist
#	openvpn-beta/Makefile
#	openvpn-beta/distinfo
#
echo c - openvpn-beta
mkdir -p openvpn-beta > /dev/null 2>&1
echo c - openvpn-beta/files
mkdir -p openvpn-beta/files > /dev/null 2>&1
echo x - openvpn-beta/files/openvpn.sh.in
sed 's/^X//' >openvpn-beta/files/openvpn.sh.in << '0528398a58fab2719f7d036dada1f2b5'
X#!/bin/sh
X#
X# openvpn.sh - load tun/tap driver and start OpenVPN daemon
X#
X# (C) Copyright 2005 - 2008 by Matthias Andree
X# based on suggestions by Matthias Grimm and Dirk Gouders
X# with multi-instance contribution from Denis Shaposhnikov, Gleb Kozyrev
X# and Vasil Dimov
X#
X# $FreeBSD: ports/security/openvpn-devel/files/openvpn.sh.in,v 1.11 2010/03/27 00:14:45 dougb Exp $
X# 
X# This program is free software; you can redistribute it and/or modify it under
X# the terms of the GNU General Public License as published by the Free Software
X# Foundation; either version 2 of the License, or (at your option) any later
X# version.
X#
X# This program is distributed in the hope that it will be useful, but WITHOUT
X# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
X# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
X# details.
X#
X# You should have received a copy of the GNU General Public License along with
X# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
X# Street, Fifth Floor, Boston, MA 02110-1301, USA.
X
X# PROVIDE: openvpn
X# REQUIRE: DAEMON
X# KEYWORD: shutdown
X
X# -----------------------------------------------------------------------------
X#
X# This script supports running multiple instances of openvpn.
X# To run additional instance link this script to something like
X# % ln -s openvpn openvpn_foo
X# and define additional openvpn_foo_* variables in one of
X# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo
X#
X# Below NAME should be substituted with the name of this script. By default
X# it is openvpn, so read as openvpn_enable. If you linked the script to
X# openvpn_foo, then read as openvpn_foo_enable etc.
X#
X# The following variables are supported (defaults are shown).
X# You can place them in any of
X# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
X#
X# NAME_enable="NO"	# set to YES to enable openvpn
X# NAME_if=""		# driver(s) to load, set to "tun", "tap" or "tun tap"
X#
X# # optional:
X# NAME_flags=""				# additional command line arguments
X# NAME_configfile="%%PREFIX%%/etc/openvpn/NAME.conf"	# --config file
X# NAME_dir="%%PREFIX%%/etc/openvpn"	# --cd directory
X#
X# You also need to set NAME_configfile and NAME_dir, if the configuration
X# file and directory where keys and certificates reside differ from the above
X# settings.
X#
X# Note that we deliberately refrain from unloading drivers.
X#
X# For further documentation, please see openvpn(8).
X#
X
X. /etc/rc.subr
X
Xcase "$0" in
X/etc/rc*)
X	# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
X	# so get the name of the script from $_file
X	name=$(basename "$_file" .sh)
X	;;
X*)
X	name=$(basename "$0" .sh)
X	;;
Xesac
X
Xrcvar=$(set_rcvar)
X
Xopenvpn_precmd()
X{
X	for i in $interfaces ; do
X		# FreeBSD <= 5.4 does not know kldstat's -m option
X		# FreeBSD >= 6.0 does not add debug.* sysctl information
X		# in the default build - we check both to keep things simple
X		if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
X			&& ! kldstat -m if_${i} >/dev/null 2>&1 ; then
X			if ! kldload if_${i} ; then
X				warn "Could not load $i module."
X				return 1
X			fi
X		fi
X	done
X	return 0
X}
X
Xstop_postcmd()
X{
X	rm -f "$pidfile" || warn "Could not remove $pidfile."
X}
X
Xsoftrestart()
X{
X    sig_reload=USR1 run_rc_command reload
X    exit $?
X}
X
X# reload: support SIGHUP to reparse configuration file
X# softrestart: support SIGUSR1 to reconnect without privileges
Xextra_commands="reload softrestart"
Xsoftrestart_cmd="softrestart"
X
X# pidfile
Xpidfile="/var/run/${name}.pid"
X
X# command and arguments
Xcommand="%%PREFIX%%/sbin/openvpn"
X
X# run this first
Xstart_precmd="openvpn_precmd"
X# and this last
Xstop_postcmd="stop_postcmd"
X
Xload_rc_config ${name}
X
Xeval ": \${${name}_enable:=\"NO\"}"
Xeval ": \${${name}_flags:=\"\"}"
Xeval ": \${${name}_if:=\"\"}"
Xeval ": \${${name}_configfile:=\"%%PREFIX%%/etc/openvpn/${name}.conf\"}"
Xeval ": \${${name}_dir:=\"%%PREFIX%%/etc/openvpn\"}"
X
Xconfigfile="$(eval echo \${${name}_configfile})"
Xdir="$(eval echo \${${name}_dir})"
Xinterfaces="$(eval echo \${${name}_if})"
X
Xrequired_files=${configfile}
Xcommand_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile}"
X
Xrun_rc_command "$1"
0528398a58fab2719f7d036dada1f2b5
echo x - openvpn-beta/files/pkg-message.in
sed 's/^X//' >openvpn-beta/files/pkg-message.in << 'e9618a9a8b4d9f98dda860c533135dfb'
X### ------------------------------------------------------------------------
X###  Edit /etc/rc.conf[.local] to start OpenVPN automatically at system
X###  startup. See %%PREFIX%%/etc/rc.d/openvpn for details.
X### ------------------------------------------------------------------------
X###  For compatibility notes when interoperating with older OpenVPN
X###  versions, please, see <http://openvpn.net/relnotes.html>;
X### ------------------------------------------------------------------------
X###  NOTE THIS IS AN UNSTABLE BETA VERSION UNDER DEVELOPMENT!
X###  It may or may not be suitable for production. Use at your own risk.
X### ------------------------------------------------------------------------
e9618a9a8b4d9f98dda860c533135dfb
echo x - openvpn-beta/files/pkg-req.in
sed 's/^X//' >openvpn-beta/files/pkg-req.in << '29eebc756dcd92d2edb06a2e8383d748'
Xset -e
X
Xrcvers() {
X	# determine if we have "old" or "new" (rcorder integration) scheme
X	# for %%PREFIX%%/etc/rc.d/* files
X	if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then
X		echo 2
X	else
X		echo 1
X	fi
X}
X
Xif [ "$2" = INSTALL ] ; then
X	# check if the base system is new enough for us,
X	# which should only matter for package installs.
X	buildrc=$(rcvers %%OSVERSION%%)
X	execrc=$(rcvers $(sysctl -n kern.osreldate) )
X	if test $buildrc -gt $execrc ; then
X		cat <<EOF
X
XError:   this package, $1, was compiled for a newer FreeBSD
X======   version that uses different boot scripts.
X         Therefore, the rc.d script WILL NOT WORK.
X         Please update your ports tree and install security/openvpn-devel 
X         from there.
X
XEOF
X		exit 1
X	fi
Xfi
29eebc756dcd92d2edb06a2e8383d748
echo x - openvpn-beta/files/openvpn.sh.in.orig
sed 's/^X//' >openvpn-beta/files/openvpn.sh.in.orig << '1696c2b5f2217321827920fe058a82b8'
X#!/bin/sh
X#
X# openvpn.sh - load tun/tap driver and start OpenVPN daemon
X#
X# (C) Copyright 2005 - 2008 by Matthias Andree
X# based on suggestions by Matthias Grimm and Dirk Gouders
X# with multi-instance contribution from Denis Shaposhnikov, Gleb Kozyrev
X# and Vasil Dimov
X#
X# $FreeBSD: ports/security/openvpn-devel/files/openvpn.sh.in,v 1.11 2010/03/27 00:14:45 dougb Exp $
X# 
X# This program is free software; you can redistribute it and/or modify it under
X# the terms of the GNU General Public License as published by the Free Software
X# Foundation; either version 2 of the License, or (at your option) any later
X# version.
X#
X# This program is distributed in the hope that it will be useful, but WITHOUT
X# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
X# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
X# details.
X#
X# You should have received a copy of the GNU General Public License along with
X# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
X# Street, Fifth Floor, Boston, MA 02110-1301, USA.
X
X# PROVIDE: openvpn
X# REQUIRE: DAEMON
X# KEYWORD: shutdown
X
X# -----------------------------------------------------------------------------
X#
X# This script supports running multiple instances of openvpn.
X# To run additional instance link this script to something like
X# % ln -s openvpn openvpn_foo
X# and define additional openvpn_foo_* variables in one of
X# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo
X#
X# Below NAME should be substituted with the name of this script. By default
X# it is openvpn, so read as openvpn_enable. If you linked the script to
X# openvpn_foo, then read as openvpn_foo_enable etc.
X#
X# The following variables are supported (defaults are shown).
X# You can place them in any of
X# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
X#
X# NAME_enable="NO"	# set to YES to enable openvpn
X# NAME_if=""		# driver(s) to load, set to "tun", "tap" or "tun tap"
X#
X# # optional:
X# NAME_flags=""				# additional command line arguments
X# NAME_configfile="%%PREFIX%%/etc/openvpn/NAME.conf"	# --config file
X# NAME_dir="%%PREFIX%%/etc/openvpn"	# --cd directory
X#
X# You also need to set NAME_configfile and NAME_dir, if the configuration
X# file and directory where keys and certificates reside differ from the above
X# settings.
X#
X# Note that we deliberately refrain from unloading drivers.
X#
X# For further documentation, please see openvpn(8).
X#
X
X. /etc/rc.subr
X
Xcase "$0" in
X/etc/rc*)
X	# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
X	# so get the name of the script from $_file
X	name=$(basename "$_file" .sh)
X	;;
X*)
X	name=$(basename "$0" .sh)
X	;;
Xesac
X
Xrcvar=$(set_rcvar)
X
Xopenvpn_precmd()
X{
X	for i in $interfaces ; do
X		# FreeBSD <= 5.4 does not know kldstat's -m option
X		# FreeBSD >= 6.0 does not add debug.* sysctl information
X		# in the default build - we check both to keep things simple
X		if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
X			&& ! kldstat -m if_${i} >/dev/null 2>&1 ; then
X			if ! kldload if_${i} ; then
X				warn "Could not load $i module."
X				return 1
X			fi
X		fi
X	done
X	return 0
X}
X
Xstop_postcmd()
X{
X	rm -f "$pidfile" || warn "Could not remove $pidfile."
X}
X
X# support SIGHUP to reparse configuration file
Xextra_commands="reload"
X
X# pidfile
Xpidfile="/var/run/${name}.pid"
X
X# command and arguments
Xcommand="%%PREFIX%%/sbin/openvpn"
X
X# run this first
Xstart_precmd="openvpn_precmd"
X# and this last
Xstop_postcmd="stop_postcmd"
X
Xload_rc_config ${name}
X
Xeval ": \${${name}_enable:=\"NO\"}"
Xeval ": \${${name}_flags:=\"\"}"
Xeval ": \${${name}_if:=\"\"}"
Xeval ": \${${name}_configfile:=\"%%PREFIX%%/etc/openvpn/${name}.conf\"}"
Xeval ": \${${name}_dir:=\"%%PREFIX%%/etc/openvpn\"}"
X
Xconfigfile="$(eval echo \${${name}_configfile})"
Xdir="$(eval echo \${${name}_dir})"
Xinterfaces="$(eval echo \${${name}_if})"
X
Xrequired_files=${configfile}
Xcommand_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile}"
X
Xrun_rc_command "$1"
1696c2b5f2217321827920fe058a82b8
echo x - openvpn-beta/pkg-descr
sed 's/^X//' >openvpn-beta/pkg-descr << '60b7cef8bf11720ab4f2c92bfcdde3a0'
XThis is a BETA build for OpenVPN.  This means that this port may not function
Xproperly in a production environment, but we've made strong efforts toward
Xmaking this as releasble as possible.  Please use this port to aid OpenVPN
Xto test and make this next release as stable as possible.
X
XOpenVPN is a robust, scalable and highly configurable VPN (Virtual Private
XNetwork) daemon which can be used to securely link two or more private networks
Xusing an encrypted tunnel over the internet. It can operate over UDP or TCP,
Xcan use SSL or a pre-shared secret to authenticate peers, and in SSL mode, one
Xserver can handle many clients.
X
XDO NOT USE IN PRODUCTION WITHOUT CAUTION
X
XWWW: http://openvpn.net/
60b7cef8bf11720ab4f2c92bfcdde3a0
echo x - openvpn-beta/pkg-plist
sed 's/^X//' >openvpn-beta/pkg-plist << '43599854de2d256af4d9100baa1fed50'
Xsbin/openvpn
Xlib/openvpn-auth-pam.so
Xlib/openvpn-down-root.so
X%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
X%%PORTDOCS%%%%DOCSDIR%%/COPYING
X%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL
X%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/PORTS
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/README.openvpn-auth-pam
X%%PORTDOCS%%%%DOCSDIR%%/README.openvpn-down-root
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/README
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-ca
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-dh
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-inter
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-key
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-key-pass
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-key-pkcs12
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-key-server
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-req
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/build-req-pass
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/clean-all
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/list-crl
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/make-crl
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/openssl.cnf
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/revoke-crt
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/revoke-full
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/sign-req
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/1.0/vars
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/Makefile
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/README
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-ca
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-dh
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-inter
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-key
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-key-pass
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-key-pkcs12
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-key-server
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-req
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/build-req-pass
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/clean-all
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/inherit-inter
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/list-crl
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/openssl-0.9.6.cnf
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/openssl.cnf
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/pkitool
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/revoke-full
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/sign-req
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/vars
X%%PORTDOCS%%%%DOCSDIR%%/easy-rsa/2.0/whichopensslcnf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/README
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/client.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/firewall.sh
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/home.up
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/loopback-client
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/loopback-server
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/office.up
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/openvpn-shutdown.sh
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/openvpn-startup.sh
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/server.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/static-home.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/static-office.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/tls-home.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/tls-office.conf
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/xinetd-client-config
X%%PORTDOCS%%%%DOCSDIR%%/sample-config-files/xinetd-server-config
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/auth-pam.pl
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/bridge-start
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/bridge-stop
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/openvpn.init
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/ucn.pl
X%%PORTDOCS%%%%DOCSDIR%%/sample-scripts/verify-cn
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample-scripts
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample-config-files
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/easy-rsa/2.0
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/easy-rsa/1.0
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/easy-rsa
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
43599854de2d256af4d9100baa1fed50
echo x - openvpn-beta/Makefile
sed 's/^X//' >openvpn-beta/Makefile << '873db260622449fdd47b399af6b25f4a'
X# New ports collection makefile for:	openvpn
X# Date created:		2010-08-13
X# Whom:			Eric F Crist <ecrist@secure-computing.net>
X#
X# $FreeBSD$
X
XPORTNAME=	openvpn
XDISTVERSION=	2.2-beta1
XCATEGORIES=	security net
XMASTER_SITES=	http://build.openvpn.net/downloads/releases/
XPKGNAMESUFFIX=	-beta
X
XMAINTAINER=	ecrist@secure-computing.net
XCOMMENT=	Secure IP/Ethernet tunnel daemon
X
XCONFLICTS=	openvpn-*
X
XGNU_CONFIGURE=	yes
XUSE_OPENSSL=	yes
XCONFIGURE_ARGS=	--with-lzo-lib=${LOCALBASE}/lib \
X		--with-lzo-headers=${LOCALBASE}/include \
X		--disable-depr-random-resolv
XINSTALL_TARGET=	install mandir=${MANPREFIX}/man
X
XMAN8=		openvpn.8
X
XOPTIONS=	PW_SAVE "Interactive passwords may be read from a file" off \
X		PKCS11  "Use security/pkcs11-helper" off
X
XUSE_RC_SUBR=	openvpn.sh
XUSE_LDCONFIG=	${PREFIX}/lib
X
XSUB_FILES=	pkg-message pkg-req
XSUB_LIST+=	OSVERSION=${OSVERSION}
X
X.include <bsd.port.pre.mk>
X
X.ifdef (LOG_OPENVPN)
XCFLAGS+=	-DLOG_OPENVPN=${LOG_OPENVPN}
X.endif
X
Xpre-fetch:
X.ifdef (LOG_OPENVPN)
X	@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}"
X.else
X	@${ECHO} ""
X	@${ECHO} "You may use the following build options:"
X	@${ECHO} ""
X	@${ECHO} "      LOG_OPENVPN={Valid syslog facility}"
X	@${ECHO} "      EXAMPLE:  make LOG_OPENVPN=LOG_DAEMON"
X	@${ECHO} ""
X.endif
X
X# NOTE: there is no way to explicitly specify the LZO version to OpenVPN,
X# if LZO2 and LZO1 are installed, OpenVPN will pick LZO2.
X# So depend on LZO1 only if it's already there and LZO2 isn't.
X# PACKAGE_BUILDING will also force LZO2.
X.if exists(${LOCALBASE}/lib/liblzo2.so.2) || !exists(${LOCALBASE}/lib/liblzo.so.1) || defined(PACKAGE_BUILDING)
XLIB_DEPENDS+=	lzo2.2:${PORTSDIR}/archivers/lzo2
X.else
XLIB_DEPENDS+=	lzo.1:${PORTSDIR}/archivers/lzo
X.endif
X
X.if defined(WITH_PW_SAVE)
XCONFIGURE_ARGS+=	--enable-password-save
X.endif
X
X.if defined(WITH_PKCS11)
XLIB_DEPENDS+=	pkcs11-helper.1:${PORTSDIR}/security/pkcs11-helper
X.else
XCONFIGURE_ARGS+=	--disable-pkcs11
X.endif
X
Xpost-patch:
X	@${FIND} ${WRKSRC} -name \*.orig -delete
X	@${FIND} ${WRKSRC} -name \*.bak -delete
X
Xpost-build:
X	cd ${WRKSRC}/plugin/down-root && ${MAKE}
X	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
X	@# self-tests here
X.if !defined(WITHOUT_CHECK)
X	cd ${WRKSRC} && ${MAKE} check
X.endif
X
Xpre-install:
X	PKG_PREFIX=${PREFIX} ${SH} ${PKGREQ} ${PKGNAME} INSTALL
X
Xpost-install:
X	${MKDIR} ${PREFIX}/lib
X	${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so ${PREFIX}/lib/
X	${INSTALL_PROGRAM} ${WRKSRC}/plugin/auth-pam/openvpn-auth-pam.so ${PREFIX}/lib/
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README ${DOCSDIR}/README.openvpn-down-root
X	${INSTALL_DATA} ${WRKSRC}/plugin/auth-pam/README ${DOCSDIR}/README.openvpn-auth-pam
X.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \
X	PORTS README
X	${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/
X.endfor
X.for dir in easy-rsa easy-rsa/1.0 easy-rsa/2.0 sample-config-files
X	${MKDIR} ${DOCSDIR}/${dir}
X	${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \;
X.endfor
X.for dir in sample-scripts
X	${MKDIR} ${DOCSDIR}/${dir}
X	${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_SCRIPT} \{\} ${DOCSDIR}/${dir} \;
X.endfor
X.else
X	-@${RMDIR} ${DOCSDIR}
X.endif
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
873db260622449fdd47b399af6b25f4a
echo x - openvpn-beta/distinfo
sed 's/^X//' >openvpn-beta/distinfo << '092ad939397484710dd30af0dc071971'
XMD5 (openvpn-2.2-beta1.tar.gz) = 69fdfdc3ee6e21d2887bde4030c8b150
XSHA256 (openvpn-2.2-beta1.tar.gz) = e114f05b3f5bb66e17cdad77e77481f9aab9e4c70a62c631a67c5cfc33f4e340
XSIZE (openvpn-2.2-beta1.tar.gz) = 862178
092ad939397484710dd30af0dc071971
exit
--- ovpnb.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100813151437.439996D437>