Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2014 00:43:42 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363281 - head/net-mgmt/routers2-extras
Message-ID:  <201407290043.s6T0hgNe016768@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Tue Jul 29 00:43:41 2014
New Revision: 363281
URL: http://svnweb.freebsd.org/changeset/ports/363281
QAT: https://qat.redports.org/buildarchive/r363281/

Log:
  Stage net-mgmt/routers2-extras and cleanup
  
   * stage support
   * use PORTDOCS (remove from pkg-plist)
   * use DOCS instead of NOPORTDOCS
   * get rid of 5 unnecessary for loops
  
  PR:		191709
  Submitted by:	Dan Lukes
  Modified++:	marino

Modified:
  head/net-mgmt/routers2-extras/Makefile
  head/net-mgmt/routers2-extras/pkg-plist

Modified: head/net-mgmt/routers2-extras/Makefile
==============================================================================
--- head/net-mgmt/routers2-extras/Makefile	Tue Jul 29 00:39:33 2014	(r363280)
+++ head/net-mgmt/routers2-extras/Makefile	Tue Jul 29 00:43:41 2014	(r363281)
@@ -18,39 +18,37 @@ RUN_DEPENDS=	${LOCALBASE}/www/routers2/r
 WRKSRC=		${WRKDIR}/routers2-v${PORTVERSION}/extras
 
 USES=		perl5
-
 NO_BUILD=	YES
+PORTDOCS=	README *.txt
+
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
 
-NO_STAGE=	yes
 post-patch:
-	for file in buildwan.pl cfgmaker_host.pl 95.pl ; do \
-		${REINPLACE_CMD} -e 's|%%PERL%%|${PERL}|' ${WRKSRC}/$$file; \
-	done
-	for file in cfgmaker_host.pl ; do \
-		${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/$$file; \
-	done
+	${REINPLACE_CMD} -e 's|%%PERL%%|${PERL}|' \
+		-e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+		${WRKSRC}/buildwan.pl \
+		${WRKSRC}/cfgmaker_host.pl \
+		${WRKSRC}/95.pl
 
 do-install:
-		${MKDIR} -m 755 ${PREFIX}/www/routers2/extras
-.if !defined(NOPORTDOCS)
-		${MKDIR} -m 755 ${DOCSDIR}
-		for file in README *.txt; do \
-			${INSTALL_DATA} ${WRKSRC}/$$file ${DOCSDIR}; \
-		done
+	${MKDIR} ${STAGEDIR}${PREFIX}/www/routers2/extras/templates
+	cd ${WRKSRC}; ${INSTALL_SCRIPT} buildwan.pl cfgmaker_host.pl \
+		check_vmware.pl check_foundry checkagent gather.pl \
+		getstats.sh graphprune.pl mrtg-apache mrtg-nrpe.pl \
+		mrtg-nrpe.sh mrtg-pnsclient.pl mrtg-portsinuse.pl \
+		rrd-archive-clean.pl rrd-archive.pl rrdextend.pl \
+		winalert.pl targetnames/targetnames.pl \
+		${STAGEDIR}${PREFIX}/www/routers2/extras
+	cd ${WRKSRC}; ${INSTALL_DATA} mrtg-nrpe.cfg mrtg-pnsclient.cfg \
+		rrd-archive.conf winalert.conf \
+		${STAGEDIR}${PREFIX}/www/routers2/extras
+	cd ${WRKSRC}; ${INSTALL_DATA} mrtg-templates/* \
+		${STAGEDIR}${PREFIX}/www/routers2/extras/templates
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}; ${INSTALL_DATA} README *.txt ${STAGEDIR}${DOCSDIR}
 .endif
-		for file in buildwan.pl cfgmaker_host.pl check_vmware.pl check_foundry checkagent \
-			gather.pl getstats.sh graphprune.pl mrtg-apache mrtg-nrpe.pl mrtg-nrpe.sh \
-			mrtg-pnsclient.pl mrtg-portsinuse.pl rrd-archive-clean.pl \
-			rrd-archive.pl rrdextend.pl \
-			winalert.pl targetnames/targetnames.pl; do \
-			${INSTALL_SCRIPT} ${WRKSRC}/$$file ${PREFIX}/www/routers2/extras; \
-		done
-		for file in mrtg-nrpe.cfg mrtg-pnsclient.cfg rrd-archive.conf winalert.conf ; do \
-			${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/www/routers2/extras; \
-		done
-		${MKDIR} -m 755 ${PREFIX}/www/routers2/extras/templates
-		for file in mrtg-templates/* ; do \
-			${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/www/routers2/extras/templates; \
-		done
 
 .include <bsd.port.mk>

Modified: head/net-mgmt/routers2-extras/pkg-plist
==============================================================================
--- head/net-mgmt/routers2-extras/pkg-plist	Tue Jul 29 00:39:33 2014	(r363280)
+++ head/net-mgmt/routers2-extras/pkg-plist	Tue Jul 29 00:43:41 2014	(r363281)
@@ -25,13 +25,5 @@ www/routers2/extras/templates/template-m
 www/routers2/extras/templates/template-mrtg-pnsclient
 www/routers2/extras/winalert.conf
 www/routers2/extras/winalert.pl
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/buildwan.txt
-%%PORTDOCS%%%%DOCSDIR%%/graphprune.txt
-%%PORTDOCS%%%%DOCSDIR%%/mrtg-nrpe.txt
-%%PORTDOCS%%%%DOCSDIR%%/mrtg-pnsclient.txt
-%%PORTDOCS%%%%DOCSDIR%%/rrd-archive.txt
-%%PORTDOCS%%%%DOCSDIR%%/winalert.txt
 @dirrm www/routers2/extras/templates
 @dirrm www/routers2/extras
-%%PORTDOCS%%@dirrm %%DOCSDIR%%



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