aboutsummaryrefslogtreecommitdiff
path: root/www/chems
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2014-09-19 21:29:40 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2014-09-19 21:29:40 +0000
commitab824f8625011e9a27aa74ceb83c0543d56c9721 (patch)
treefddb3810b87f552579aef194f864134ed4aefe9c /www/chems
parentf21f8b9b7301d93342f0684d5170229a78341d21 (diff)
downloadports-ab824f8625011e9a27aa74ceb83c0543d56c9721.tar.gz
ports-ab824f8625011e9a27aa74ceb83c0543d56c9721.zip
Allow staging as a regular user
Use @sample for config.php as it seems more appropriate
Notes
Notes: svn path=/head/; revision=368601
Diffstat (limited to 'www/chems')
-rw-r--r--www/chems/Makefile14
-rw-r--r--www/chems/pkg-plist6
2 files changed, 5 insertions, 15 deletions
diff --git a/www/chems/Makefile b/www/chems/Makefile
index 915b38abecb0..2a8df0c29a45 100644
--- a/www/chems/Makefile
+++ b/www/chems/Makefile
@@ -3,6 +3,7 @@
PORTNAME= chems
DISTVERSION= 0x04
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/0x04
@@ -12,21 +13,12 @@ COMMENT= The geekest content helper management system
NO_BUILD= yes
USES= zip
USE_PHP= xml iconv gd
+PLIST_SUB= WWWOWN="${WWWOWN}"
SUB_FILES= pkg-message
-WWWDIR?= ${PREFIX}/www/${PORTNAME}
do-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}
${CP} -R ${WRKSRC}/ ${STAGEDIR}${WWWDIR}
- ${TOUCH} ${STAGEDIR}${WWWDIR}/usr/config.php
- @${CHOWN} ${WWWOWN} ${STAGEDIR}${WWWDIR}/usr/config.php
-
-create-plist:
- @${FIND} -s ${WRKSRC}/${file} -not -type d \
- | ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST}
- @${ECHO_CMD} '@exec touch %D/%%WWWDIR%%/usr/config.php;chown ${WWWOWN} %D/%%WWWDIR%%/usr/config.php' >> ${PLIST}
- @${ECHO_CMD} '@unexec if [ ! -s %D/%%WWWDIR%%/usr/config.php ];then rm -f %D/%%WWWDIR%%/usr/config.php;fi' >> ${PLIST}
- @${FIND} -ds ${WRKSRC}/${file} -type d \
- | ${SED} -e 's,^${WRKSRC},@dirrm %%WWWDIR%%,' >> ${PLIST}
+ ${MV} ${STAGEDIR}${WWWDIR}/usr/config.php ${STAGEDIR}${WWWDIR}/usr/config.php.sample
.include <bsd.port.mk>
diff --git a/www/chems/pkg-plist b/www/chems/pkg-plist
index 916b6c568e5d..2e1cd25625a9 100644
--- a/www/chems/pkg-plist
+++ b/www/chems/pkg-plist
@@ -43,7 +43,7 @@
%%WWWDIR%%/themes/monochrome/favicon.ico
%%WWWDIR%%/themes/monochrome/monochrome.css
%%WWWDIR%%/themes/monochrome/monochrome.theme
-%%WWWDIR%%/usr/config.php
+@sample(%%WWWOWN%%,,) %%WWWDIR%%/usr/config.php.sample
%%WWWDIR%%/usr/images/feed.png
%%WWWDIR%%/usr/images/header.png
%%WWWDIR%%/usr/images/logo.png
@@ -57,8 +57,6 @@
%%WWWDIR%%/usr/modconf.php
%%WWWDIR%%/usr/pages.inc
%%WWWDIR%%/usr/posts.inc
-@exec touch %D/%%WWWDIR%%/usr/config.php;chown www %D/%%WWWDIR%%/usr/config.php
-@unexec if [ ! -s %D/%%WWWDIR%%/usr/config.php ];then rm -f %D/%%WWWDIR%%/usr/config.php;fi
@dirrm %%WWWDIR%%/docs
@dirrm %%WWWDIR%%/modules/blogroll
@dirrm %%WWWDIR%%/modules/categories
@@ -80,4 +78,4 @@
@dirrm %%WWWDIR%%/usr/images/meta
@dirrm %%WWWDIR%%/usr/images
@dirrm %%WWWDIR%%/usr
-@dirrm %%WWWDIR%%/
+@dirrm %%WWWDIR%%