Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2014 16:59:28 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r359580 - head/net-mgmt/phpweathermap
Message-ID:  <201406271659.s5RGxTi1086975@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Fri Jun 27 16:59:28 2014
New Revision: 359580
URL: http://svnweb.freebsd.org/changeset/ports/359580
QAT: https://qat.redports.org/buildarchive/r359580/

Log:
  Support STAGE
  
  Future update should move files to WWWDIR
  
  Sponsored by:	SupraNet Communications, Inc

Modified:
  head/net-mgmt/phpweathermap/Makefile

Modified: head/net-mgmt/phpweathermap/Makefile
==============================================================================
--- head/net-mgmt/phpweathermap/Makefile	Fri Jun 27 16:53:53 2014	(r359579)
+++ head/net-mgmt/phpweathermap/Makefile	Fri Jun 27 16:59:28 2014	(r359580)
@@ -11,6 +11,8 @@ DISTNAME=	php-weathermap-${PORTVERSION}
 MAINTAINER=	hhyou@cs.nctu.edu.tw
 COMMENT=	A network visualisation tool with web editor
 
+LICENSE=	GPLv2
+
 RUN_DEPENDS=	${LOCALBASE}/share/pear/Console/Getopt.php:${PORTSDIR}/devel/pear \
 		rrdtool:${PORTSDIR}/databases/rrdtool
 
@@ -18,8 +20,6 @@ NO_BUILD=	yes
 USES=		zip
 USE_PHP=	gd
 
-LICENSE=	GPLv2
-
 WM_FILES=	HTML_ImageMap.class.php WeatherMap.functions.php \
 		WeatherMapLink.class.php WeatherMapNode.class.php \
 		Weathermap.class.php weathermap.conf
@@ -34,42 +34,35 @@ WRKSRC=		${WRKDIR}/weathermap
 
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 post-patch:
 	${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/editor.php
 	${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \
 			    -e 's|%%PREFIX%%|${PREFIX}|'  ${WRKSRC}/weathermap
-# 	${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/editor.php
 
 do-install:
-	@${MKDIR} ${DATADIR}/www/configs
-	@${INSTALL_SCRIPT} ${WRKSRC}/weathermap ${PREFIX}/bin/phpweathermap
+	@${MKDIR} ${STAGEDIR}/${DATADIR}/www/configs
+	@${INSTALL_SCRIPT} ${WRKSRC}/weathermap ${STAGEDIR}/${PREFIX}/bin/phpweathermap
 	@for i in ${WM_FILES}; do \
-		${INSTALL_DATA} ${WRKSRC}/$$i ${DATADIR}/$$i; \
+		${INSTALL_DATA} ${WRKSRC}/$$i ${STAGEDIR}/${DATADIR}/$$i; \
 	done
 	@for i in ${WM_WWW_FILES}; do \
-		${INSTALL_DATA} ${WRKSRC}/$$i ${DATADIR}/www/$$i; \
+		${INSTALL_DATA} ${WRKSRC}/$$i ${STAGEDIR}/${DATADIR}/www/$$i; \
 	done
-	@${CP} -R ${WRKSRC}/lib ${DATADIR}
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "${WM_WWW_DIRS}" ${DATADIR}/www)
-	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DATADIR}/www
-.if !defined(NOPORTEXAMPLES)
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "random-bits" ${EXAMPLESDIR})
-	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
-		${EXAMPLESDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
-	@${FIND} ${EXAMPLESDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
-	@${ECHO_CMD} '@exec ${FIND} ${EXAMPLESDIR} -type f -print0 | \
-		${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
-	@${FIND} ${EXAMPLESDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
-	@${ECHO_CMD} '@exec ${FIND} ${EXAMPLESDIR} -type d -print0 | \
-		${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
+	@${CP} -R ${WRKSRC}/lib ${STAGEDIR}/${DATADIR}
+	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "${WM_WWW_DIRS}" ${STAGEDIR}/${DATADIR}/www)
+	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}/${DATADIR}/www
+
+.if ${PORT_OPTIONS:MEXAMPLES}
+	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "random-bits" ${STAGEDIR}/${EXAMPLESDIR})
+	@${FIND} ${STAGEDIR}/${EXAMPLESDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
+	@${FIND} ${STAGEDIR}/${EXAMPLESDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
 .endif
 
 post-install:
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
+	@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}/${DOCSDIR}
 .endif
 	@${CAT} ${PKGMESSAGE}
 



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