From 47897d0dce03528efe1817ee870d4c62e63a4dd7 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 17 Jan 2013 23:12:24 +0000 Subject: - 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] --- security/openvpn/Makefile | 63 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'security/openvpn/Makefile') 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 +# Created by: Matthias Andree # $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 -.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 @@ -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} -- cgit v1.2.3