1 |
< |
# New ports collection makefile for: openvpn |
2 |
< |
# Date created: 2002-06-23 |
3 |
< |
# Whom: Matthias Andree <matthias.andree@gmx.de> |
4 |
< |
# |
5 |
< |
# $MidnightBSD: mports/security/openvpn/Makefile,v 1.4 2007/11/14 21:31:22 laffer1 Exp $ |
1 |
> |
# $MidnightBSD: mports/security/openvpn/Makefile,v 1.5 2007/11/14 21:33:29 laffer1 Exp $ |
2 |
|
# $FreeBSD: ports/security/openvpn/Makefile,v 1.28 2006/09/14 01:22:01 rafan Exp $ |
7 |
– |
# |
3 |
|
|
4 |
|
PORTNAME= openvpn |
5 |
< |
PORTVERSION= 2.0.9 |
11 |
< |
PORTREVISION= 0 |
5 |
> |
DISTVERSION= 2.1.4 |
6 |
|
CATEGORIES= security net |
7 |
< |
MASTER_SITES= http://openvpn.net/release/ |
7 |
> |
MASTER_SITES= http://swupdate.openvpn.net/community/releases/ |
8 |
|
|
9 |
|
MAINTAINER= matthias.andree@gmx.de |
10 |
|
COMMENT= Secure IP/Ethernet tunnel daemon |
11 |
|
LICENSE= agg |
12 |
|
# gpl2, MSFT, BSDL, etc |
13 |
|
|
14 |
< |
CONFLICTS= openvpn-devel-[0-9]* |
14 |
> |
CONFLICTS= openvpn-devel-[0-9]* openvpn-2.0* openvpn-beta-[0-9]* |
15 |
|
|
16 |
|
GNU_CONFIGURE= yes |
17 |
|
USE_OPENSSL= yes |
18 |
< |
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd6.0 |
18 |
> |
USE_XZ= yes |
19 |
> |
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd7.0 |
20 |
|
CONFIGURE_ARGS= --with-lzo-lib=${LOCALBASE}/lib \ |
21 |
|
--with-lzo-headers=${LOCALBASE}/include |
22 |
+ |
INSTALL_TARGET= install mandir=${MANPREFIX}/man |
23 |
|
|
24 |
|
MAN8= openvpn.8 |
25 |
|
|
26 |
< |
OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off |
26 |
> |
OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off \ |
27 |
> |
PKCS11 "Use security/pkcs11-helper" off |
28 |
|
|
29 |
|
USE_RC_SUBR= openvpn.sh |
30 |
|
USE_LDCONFIG= ${PREFIX}/lib |
34 |
|
|
35 |
|
.include <bsd.port.pre.mk> |
36 |
|
|
37 |
< |
rcsuffix= |
38 |
< |
SUB_LIST+= RCSFX=${rcsuffix} |
37 |
> |
.ifdef (LOG_OPENVPN) |
38 |
> |
CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN} |
39 |
> |
.endif |
40 |
|
|
41 |
+ |
pre-configure: |
42 |
+ |
.ifdef (LOG_OPENVPN) |
43 |
+ |
@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}" |
44 |
+ |
.else |
45 |
+ |
@${ECHO} "" |
46 |
+ |
@${ECHO} "You may use the following build options:" |
47 |
+ |
@${ECHO} "" |
48 |
+ |
@${ECHO} " LOG_OPENVPN={Valid syslog facility, default LOG_DAEMON}" |
49 |
+ |
@${ECHO} " EXAMPLE: make LOG_OPENVPN=LOG_DAEMON" |
50 |
+ |
@${ECHO} "" |
51 |
+ |
.endif |
52 |
+ |
|
53 |
|
# NOTE: there is no way to explicitly specify the LZO version to OpenVPN, |
54 |
|
# if LZO2 and LZO1 are installed, OpenVPN will pick LZO2. |
55 |
|
# So depend on LZO1 only if it's already there and LZO2 isn't. |
64 |
|
CONFIGURE_ARGS+= --enable-password-save |
65 |
|
.endif |
66 |
|
|
67 |
+ |
.if defined(WITH_PKCS11) |
68 |
+ |
LIB_DEPENDS+= pkcs11-helper.1:${PORTSDIR}/security/pkcs11-helper |
69 |
+ |
.else |
70 |
+ |
CONFIGURE_ARGS+= --disable-pkcs11 |
71 |
+ |
.endif |
72 |
+ |
|
73 |
+ |
post-patch: |
74 |
+ |
@${FIND} ${WRKSRC}/easy-rsa/?.0 -type f \ |
75 |
+ |
-exec ${REINPLACE_CMD} -e 's;#!/bin/bash;#!/bin/sh;' \ |
76 |
+ |
-e 's,source ./vars,. ./vars,' \{\} + |
77 |
+ |
@${FIND} ${WRKSRC} -name \*.orig -delete |
78 |
+ |
@${FIND} ${WRKSRC} -name \*.bak -delete |
79 |
+ |
|
80 |
|
post-build: |
81 |
|
cd ${WRKSRC}/plugin/down-root && ${MAKE} |
82 |
+ |
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 |
83 |
|
@# self-tests here |
84 |
|
.if !defined(WITHOUT_CHECK) |
85 |
+ |
@${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO} |
86 |
|
cd ${WRKSRC} && ${MAKE} check |
87 |
|
.endif |
88 |
|
|
89 |
|
post-install: |
90 |
|
${MKDIR} ${PREFIX}/lib |
91 |
< |
${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so \ |
92 |
< |
${PREFIX}/lib |
91 |
> |
${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so ${PREFIX}/lib/ |
92 |
> |
${INSTALL_PROGRAM} ${WRKSRC}/plugin/auth-pam/openvpn-auth-pam.so ${PREFIX}/lib/ |
93 |
|
.if !defined(NOPORTDOCS) |
94 |
|
${MKDIR} ${DOCSDIR} |
95 |
< |
${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README \ |
96 |
< |
${DOCSDIR}/README.openvpn-down-root |
97 |
< |
.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL NEWS \ |
95 |
> |
${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README ${DOCSDIR}/README.openvpn-down-root |
96 |
> |
${INSTALL_DATA} ${WRKSRC}/plugin/auth-pam/README ${DOCSDIR}/README.openvpn-auth-pam |
97 |
> |
.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \ |
98 |
|
PORTS README |
99 |
< |
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR} |
99 |
> |
${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/ |
100 |
|
.endfor |
101 |
< |
( cd ${WRKSRC} \ |
102 |
< |
&& ${FIND} easy-rsa sample-config-files sample-scripts -depth \ |
103 |
< |
| ${GREP} -v easy-rsa/Windows \ |
104 |
< |
| ${CPIO} -pdmu ${DOCSDIR} ) |
101 |
> |
.for dir in easy-rsa easy-rsa/1.0 easy-rsa/2.0 sample-config-files |
102 |
> |
${MKDIR} ${DOCSDIR}/${dir} |
103 |
> |
${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \; |
104 |
> |
.endfor |
105 |
> |
.for dir in sample-scripts |
106 |
> |
${MKDIR} ${DOCSDIR}/${dir} |
107 |
> |
${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_SCRIPT} \{\} ${DOCSDIR}/${dir} \; |
108 |
> |
.endfor |
109 |
> |
.else |
110 |
> |
-@${RMDIR} ${DOCSDIR} |
111 |
|
.endif |
112 |
|
|
113 |
|
.include <bsd.port.post.mk> |