1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

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
This commit is contained in:
John Marino 2014-07-29 00:43:41 +00:00
parent 15d8f62d88
commit 7c1c0e91b8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363281
2 changed files with 26 additions and 36 deletions

View File

@ -18,39 +18,37 @@ RUN_DEPENDS= ${LOCALBASE}/www/routers2/routers2.cgi:${PORTSDIR}/net-mgmt/routers
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>

View File

@ -25,13 +25,5 @@ www/routers2/extras/templates/template-mrtg-ping
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%%