aboutsummaryrefslogtreecommitdiffstats
path: root/www/chems
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-09-20 05:29:40 +0800
committerantoine <antoine@FreeBSD.org>2014-09-20 05:29:40 +0800
commit7e7f07914c55318273716be2290b96486157fc3c (patch)
treefddb3810b87f552579aef194f864134ed4aefe9c /www/chems
parent88097dad030575d31e0d430784331e766ca8008b (diff)
downloadfreebsd-ports-gnome-7e7f07914c55318273716be2290b96486157fc3c.tar.gz
freebsd-ports-gnome-7e7f07914c55318273716be2290b96486157fc3c.tar.zst
freebsd-ports-gnome-7e7f07914c55318273716be2290b96486157fc3c.zip
Allow staging as a regular user
Use @sample for config.php as it seems more appropriate
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%%