Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2013 23:12:24 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r310575 - head/security/openvpn
Message-ID:  <201301172312.r0HNCOu9040185@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Thu Jan 17 23:12:24 2013
New Revision: 310575
URL: http://svnweb.freebsd.org/changeset/ports/310575

Log:
  - 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]

Modified:
  head/security/openvpn/Makefile
  head/security/openvpn/pkg-plist

Modified: head/security/openvpn/Makefile
==============================================================================
--- head/security/openvpn/Makefile	Thu Jan 17 23:01:41 2013	(r310574)
+++ head/security/openvpn/Makefile	Thu Jan 17 23:12:24 2013	(r310575)
@@ -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].* open
 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 
 
 .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}/
 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}
 

Modified: head/security/openvpn/pkg-plist
==============================================================================
--- head/security/openvpn/pkg-plist	Thu Jan 17 23:01:41 2013	(r310574)
+++ head/security/openvpn/pkg-plist	Thu Jan 17 23:12:24 2013	(r310575)
@@ -4,42 +4,5 @@ lib/openvpn/plugins/openvpn-plugin-auth-
 lib/openvpn/plugins/openvpn-plugin-down-root.la
 lib/openvpn/plugins/openvpn-plugin-down-root.so
 sbin/openvpn
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/management-notes.txt
-%%PORTDOCS%%%%DOCSDIR%%/PORTS
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/README.auth-pam
-%%PORTDOCS%%%%DOCSDIR%%/README.down-root
-%%PORTDOCS%%%%DOCSDIR%%/README.IPv6
-%%PORTDOCS%%%%DOCSDIR%%/README.polarssl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/README
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/client.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/firewall.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/home.up
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/loopback-client
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/loopback-server
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/office.up
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/openvpn-shutdown.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/openvpn-startup.sh
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/server.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/static-home.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/static-office.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/tls-home.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/tls-office.conf
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/xinetd-client-config
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-config-files/xinetd-server-config
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/auth-pam.pl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/bridge-start
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/bridge-stop
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/ucn.pl
-%%PORTDOCS%%%%DOCSDIR%%/sample/sample-scripts/verify-cn
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample/sample-scripts
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample/sample-config-files
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/sample
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm lib/openvpn/plugins
 @dirrm lib/openvpn



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