- Move owner handling to plist, fixing build from non-root

- Unsilence install commands
- Drop @dirrm* from plist
- Switch to options helpers
- Add LICENSE_FILE
- Add NO_ARCH

Approved by:	portmgr blanket
This commit is contained in:
Dmitry Marakasov 2015-09-14 17:16:57 +00:00
parent 79721c3714
commit dd7be453cc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=396911
2 changed files with 22 additions and 26 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= phpweathermap
PORTVERSION= 0.97a
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt www
MASTER_SITES= http://www.network-weathermap.com/files/
DISTNAME= php-weathermap-${PORTVERSION}
@ -12,11 +12,13 @@ MAINTAINER= hhyou@cs.nctu.edu.tw
COMMENT= Network visualisation tool with web editor
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= ${LOCALBASE}/share/pear/Console/Getopt.php:${PORTSDIR}/devel/pear \
rrdtool:${PORTSDIR}/databases/rrdtool
NO_BUILD= yes
NO_ARCH= yes
USES= zip
USE_PHP= gd
@ -34,9 +36,10 @@ WRKSRC= ${WRKDIR}/weathermap
SUB_FILES= pkg-message
PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.options.mk>
post-patch:
${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/editor.php
${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \
@ -53,18 +56,14 @@ do-install:
done
@${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}
do-install-EXAMPLES-on:
@(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
${FIND} ${STAGEDIR}/${EXAMPLESDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
${FIND} ${STAGEDIR}/${EXAMPLESDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
post-install:
.if ${PORT_OPTIONS:MDOCS}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}/${DOCSDIR}
@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}/${DOCSDIR}
.endif
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}/${DOCSDIR}
.include <bsd.port.mk>

View File

@ -9,8 +9,6 @@ bin/phpweathermap
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-1.png
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-2.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-2.png
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/random-bits
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%DATADIR%%/HTML_ImageMap.class.php
%%DATADIR%%/WeatherMap.functions.php
%%DATADIR%%/WeatherMapLink.class.php
@ -37,6 +35,8 @@ bin/phpweathermap
%%DATADIR%%/lib/poller-common.php
%%DATADIR%%/lib/post/WeatherMapPostProcessorTest.php
%%DATADIR%%/lib/pre/WeatherMapPreProcessorTest.php
@owner %%WWWOWN%%
@group %%WWWGRP%%
%%DATADIR%%/www/docs/example/Gradient_BK_800.png
%%DATADIR%%/www/docs/example/Vera.ttf
%%DATADIR%%/www/docs/example/VeraBI.ttf
@ -166,16 +166,13 @@ bin/phpweathermap
%%DATADIR%%/www/images/wrench_orange.png
%%DATADIR%%/www/images/yellow-ball-64.png
%%DATADIR%%/www/overlib.js
@dirrm %%DATADIR%%/www/images
@dirrm %%DATADIR%%/www/editor-resources
@dirrm %%DATADIR%%/www/docs/pages
@dirrm %%DATADIR%%/www/docs/images
@dirrm %%DATADIR%%/www/docs/example
@dirrm %%DATADIR%%/www/docs
@dirrm %%DATADIR%%/www/configs
@dirrm %%DATADIR%%/www
@dirrm %%DATADIR%%/lib/pre
@dirrm %%DATADIR%%/lib/post
@dirrm %%DATADIR%%/lib/datasources
@dirrm %%DATADIR%%/lib
@dirrm %%DATADIR%%
@dir %%DATADIR%%/www/images
@dir %%DATADIR%%/www/editor-resources
@dir %%DATADIR%%/www/docs/pages
@dir %%DATADIR%%/www/docs/images
@dir %%DATADIR%%/www/docs/example
@dir %%DATADIR%%/www/docs
@dir %%DATADIR%%/www/configs
@dir %%DATADIR%%/www
@owner
@group