aboutsummaryrefslogtreecommitdiff
path: root/security/openvpn/Makefile
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2013-01-17 23:12:24 +0000
committerMatthias Andree <mandree@FreeBSD.org>2013-01-17 23:12:24 +0000
commit47897d0dce03528efe1817ee870d4c62e63a4dd7 (patch)
tree6b16bd3f9ea258cb0c7d89dad51ecfb84cdacda6 /security/openvpn/Makefile
parent699d1bca85ec1592c6112e6323f4e400c62480ec (diff)
downloadports-47897d0dce03528efe1817ee870d4c62e63a4dd7.tar.gz
ports-47897d0dce03528efe1817ee870d4c62e63a4dd7.zip
- Fix NOPORTDOCS regression [1], by installing to DESTDIR= and then installing from
there, rather than tweaking the Makefiles. - Move examples to EXAMPLESDIR, and heed NOPORTEXAMPLES - Remove a leftover SUB_LIST addition. - Switch comment to my FreeBSD e-mail address. - Use PORTDOCS=* and PORTEXAMPLES=* to remove pkg-plist cruft - Sort PORT_OPTIONS .ifs and stuff. PR: ports/175283 [1] Submitted by: Alexey Markov [1]
Notes
Notes: svn path=/head/; revision=310575
Diffstat (limited to 'security/openvpn/Makefile')
-rw-r--r--security/openvpn/Makefile63
1 files changed, 31 insertions, 32 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile
index 76bb906fbfe4..2acf38b44c64 100644
--- a/security/openvpn/Makefile
+++ b/security/openvpn/Makefile
@@ -1,9 +1,9 @@
-# Created by: Matthias Andree <matthias.andree@gmx.de>
+# Created by: Matthias Andree <mandree@FreeBSD.org>
# $FreeBSD$
PORTNAME= openvpn
DISTVERSION= 2.3.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security net
MASTER_SITES= http://swupdate.openvpn.net/community/releases/ \
http://build.openvpn.net/downloads/releases/
@@ -18,11 +18,11 @@ CONFLICTS_INSTALL= openvpn-2.[!3].* openvpn-[!2].* openvpn-beta-[0-9]* openvpn-d
GNU_CONFIGURE= yes
USE_OPENSSL= yes
USE_XZ= yes
-# let OpenVPN's configure script pick up the libraries
+# let OpenVPN's configure script pick up the requisite libraries:
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-# PolarSSL missing: OpenVPN does not currently compile with PolarSSL 1.2.0+
+# PolarSSL is not provided; OpenVPN does not currently compile with PolarSSL 1.2.0+
OPTIONS_DEFINE= PW_SAVE PKCS11 EASYRSA
OPTIONS_DEFAULT= EASYRSA
PW_SAVE_DESC= Interactive passwords may be read from a file
@@ -31,11 +31,10 @@ EASYRSA_DESC= Install security/easy-rsa RSA helper package
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MDOCS}
-INSTALL_TARGET= install
-.else
-INSTALL_TARGET= install-exec install-man
-.endif
+# use a "stage directory" to install - much easier to sort data/share
+# stuff into docs, examples, ...
+_stagedir= ${WRKDIR}/instage
+INSTALL_TARGET= install DESTDIR=${_stagedir}
.if ${PORT_OPTIONS:MEASYRSA}
RUN_DEPENDS+= easy-rsa>=0:${PORTSDIR}/security/easy-rsa
@@ -48,7 +47,6 @@ USE_RC_SUBR= openvpn
USE_LDCONFIG= ${PREFIX}/lib
SUB_FILES= pkg-message
-SUB_LIST+= OSVERSION=${OSVERSION}
.include <bsd.port.pre.mk>
@@ -58,11 +56,8 @@ CFLAGS+= -DLOG_OPENVPN=${LOG_OPENVPN}
LIB_DEPENDS+= lzo2:${PORTSDIR}/archivers/lzo2
-.if ${PORT_OPTIONS:MPW_SAVE}
-CONFIGURE_ARGS+= --enable-password-save
-.else
-CONFIGURE_ARGS+= --disable-password-save
-.endif
+PORTDOCS= *
+PORTEXAMPLES= *
.if ${PORT_OPTIONS:MPKCS11}
LIB_DEPENDS+= pkcs11-helper:${PORTSDIR}/security/pkcs11-helper
@@ -70,6 +65,12 @@ LIB_DEPENDS+= pkcs11-helper:${PORTSDIR}/security/pkcs11-helper
CONFIGURE_ARGS+= --disable-pkcs11
.endif
+.if ${PORT_OPTIONS:MPW_SAVE}
+CONFIGURE_ARGS+= --enable-password-save
+.else
+CONFIGURE_ARGS+= --disable-password-save
+.endif
+
pre-configure:
.ifdef (LOG_OPENVPN)
@${ECHO} "Building with LOG_OPENVPN=${LOG_OPENVPN}"
@@ -78,7 +79,7 @@ pre-configure:
@${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} " EXAMPLE: make LOG_OPENVPN=LOG_LOCAL6"
@${ECHO} ""
.endif
@@ -90,24 +91,22 @@ post-build:
.endif
post-install:
- ${MKDIR} ${PREFIX}/lib
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
-.for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL \
- PORTS README
- ${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}/
+ ${MKDIR} ${PREFIX}/lib ${PREFIX}/sbin ${PREFIX}/include ${PREFIX}/man
+.for i in lib sbin
+ (cd ${_stagedir}${PREFIX}/${i} && ${COPYTREE_BIN} \* ${PREFIX}/${i}/)
.endfor
-.for dir in sample/sample-config-files
- ${RM} -f ${WRKSRC}/${dir}/*.orig
- ${MKDIR} ${DOCSDIR}/${dir}
- ${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_DATA} \{\} ${DOCSDIR}/${dir} \;
-.endfor
-.for dir in sample/sample-scripts
- ${MKDIR} ${DOCSDIR}/${dir}
- ${FIND} ${WRKSRC}/${dir}/ -maxdepth 1 -type f -exec ${INSTALL_SCRIPT} \{\} ${DOCSDIR}/${dir} \;
+ ${INSTALL_DATA} ${_stagedir}${PREFIX}/include/* ${PREFIX}/include/
+ ${INSTALL_MAN} ${_stagedir}${PREFIX}/man/man8/* ${MAN8PREFIX}/man/man8/
+.if ${PORT_OPTIONS:MDOCS}
+ -${RMDIR} ${_stagedir}${DOCSDIR}/sample
+ (cd ${_stagedir}${DOCSDIR} && ${COPYTREE_SHARE} \* ${DOCSDIR}/)
+.for i in AUTHORS ChangeLog PORTS
+ ${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}/
.endfor
-.else
- -@${RMDIR} ${DOCSDIR}
+.endif
+.if ${PORT_OPTIONS:MEXAMPLES}
+ (cd ${WRKSRC}/sample && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/)
+ ${CHMOD} ${BINMODE} ${EXAMPLESDIR}/sample-scripts/*
.endif
@${CAT} ${PKGMESSAGE}