aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-10-19 23:33:24 +0800
committerantoine <antoine@FreeBSD.org>2014-10-19 23:33:24 +0800
commitcde32adaa22599b063f8607af0bb7819dae411b1 (patch)
tree049c01d3ad6b6d245625acf0450d4210623c5ca2 /www
parent58fe626f83c5ff353f37cb423634ba960f8d77c5 (diff)
downloadfreebsd-ports-gnome-cde32adaa22599b063f8607af0bb7819dae411b1.tar.gz
freebsd-ports-gnome-cde32adaa22599b063f8607af0bb7819dae411b1.tar.zst
freebsd-ports-gnome-cde32adaa22599b063f8607af0bb7819dae411b1.zip
- Allow staging as a regular user
- Bump portversion as some directories were not packaged with intended owner
Diffstat (limited to 'www')
-rw-r--r--www/rnews/Makefile22
-rw-r--r--www/rnews/pkg-plist21
2 files changed, 9 insertions, 34 deletions
diff --git a/www/rnews/Makefile b/www/rnews/Makefile
index 77aa391d66f8..30315b8cf6c4 100644
--- a/www/rnews/Makefile
+++ b/www/rnews/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rnews
PORTVERSION= 1.01
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -57,21 +57,15 @@ do-install:
${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${STAGEDIR}${WWWDIR}/magpierss
${INSTALL_DATA} ${WRKSRC}/magpierss/extlib/Snoopy.class.inc ${STAGEDIR}${WWWDIR}/magpierss/extlib
${INSTALL_DATA} -v ${WRKSRC}/opml/*.opml ${STAGEDIR}${WWWDIR}/opml
- @${CHOWN} ${WWWOWN} ${STAGEDIR}${WWWDIR}/magpierss/cache
- @${CHOWN} ${WWWOWN} ${STAGEDIR}${WWWDIR}/img/feeds
- @${CHOWN} ${WWWOWN} ${STAGEDIR}${WWWDIR}/tmp
.for FILE in ${CONFIGS}
${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${WWWDIR}/${FILE}.sample
.endfor
-
-post-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
. for FILE in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
. endfor
.endif
- @${CAT} ${PKGMESSAGE}
create-plist:
@${FIND} -s ${WRKSRC} \( -name "*.php" -o -name "*.inc" -o -name "*.js" -o -name "*.css" -o -name "*.jpg" \
@@ -79,18 +73,10 @@ create-plist:
-and -not -name config_user.php -and -not -name config.php \
| ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST}
.for FILE in ${CONFIGS}
- @${ECHO_CMD} '@exec if [ ! -f %D/%%WWWDIR%%/${FILE} ]; then \
- ${INSTALL_DATA} %D/%%WWWDIR%%/${FILE}.sample %D/%%WWWDIR%%/${FILE}; \
- ${CHOWN} ${WWWOWN} %D/%%WWWDIR%%/${FILE}; \
- ${CHMOD} u+w %D/%%WWWDIR%%/${FILE}; fi' >> ${PLIST}
+ @${ECHO_CMD} '@sample(${WWWOWN},,) %%WWWDIR%%/${FILE}.sample' >> ${PLIST}
.endfor
-.for FILE in ${CONFIGS}
- @${ECHO_CMD} '@unexec if cmp -s %D/%%WWWDIR%%/${FILE}.sample %D/%%WWWDIR%%/${FILE}; \
- then ${RM} -f %D/%%WWWDIR%%/${FILE}; fi' >> ${PLIST}
- @${ECHO_CMD} '%%WWWDIR%%/${FILE}.sample' >> ${PLIST}
+.for DIR in magpierss/cache img/feeds tmp
+ @${ECHO_CMD} '@dir(${WWWOWN},,) %%WWWDIR%%/${DIR}' >> ${PLIST}
.endfor
- @${ECHO_CMD} '@unexec if [ $$(ls %D/%%WWWDIR%%/img/feeds/|wc -w) -eq 0 ]; then ${RM} -rf %D/%%WWWDIR%%/img/feeds;fi' >> ${PLIST}
- @${FIND} -ds ${WRKSRC} -type d -a -not -name feeds \
- | ${SED} -e 's,^${WRKSRC},@dirrm %%WWWDIR%%,' >> ${PLIST}
.include <bsd.port.mk>
diff --git a/www/rnews/pkg-plist b/www/rnews/pkg-plist
index 80c7ca8d328b..f91d6ceb20e5 100644
--- a/www/rnews/pkg-plist
+++ b/www/rnews/pkg-plist
@@ -108,19 +108,8 @@
%%WWWDIR%%/rollover.js
%%WWWDIR%%/search.php
%%WWWDIR%%/tmp/.htaccess
-@exec if [ ! -f %D/%%WWWDIR%%/inc/config.php ]; then install -o root -g wheel -m 444 %D/%%WWWDIR%%/inc/config.php.sample %D/%%WWWDIR%%/inc/config.php; /usr/sbin/chown www %D/%%WWWDIR%%/inc/config.php; /bin/chmod u+w %D/%%WWWDIR%%/inc/config.php; fi
-@exec if [ ! -f %D/%%WWWDIR%%/inc/config_user.php ]; then install -o root -g wheel -m 444 %D/%%WWWDIR%%/inc/config_user.php.sample %D/%%WWWDIR%%/inc/config_user.php; /usr/sbin/chown www %D/%%WWWDIR%%/inc/config_user.php; /bin/chmod u+w %D/%%WWWDIR%%/inc/config_user.php; fi
-@unexec if cmp -s %D/%%WWWDIR%%/inc/config.php.sample %D/%%WWWDIR%%/inc/config.php; then /bin/rm -f %D/%%WWWDIR%%/inc/config.php; fi
-%%WWWDIR%%/inc/config.php.sample
-@unexec if cmp -s %D/%%WWWDIR%%/inc/config_user.php.sample %D/%%WWWDIR%%/inc/config_user.php; then /bin/rm -f %D/%%WWWDIR%%/inc/config_user.php; fi
-%%WWWDIR%%/inc/config_user.php.sample
-@unexec if [ $(ls %D/%%WWWDIR%%/img/feeds/|wc -w) -eq 0 ]; then /bin/rm -rf %D/%%WWWDIR%%/img/feeds;fi
-@dirrmtry %%WWWDIR%%/img/feeds
-@dirrm %%WWWDIR%%/img
-@dirrm %%WWWDIR%%/inc
-@dirrm %%WWWDIR%%/magpierss/cache
-@dirrm %%WWWDIR%%/magpierss/extlib
-@dirrm %%WWWDIR%%/magpierss
-@dirrm %%WWWDIR%%/opml
-@dirrm %%WWWDIR%%/tmp
-@dirrm %%WWWDIR%%
+@sample(www,,) %%WWWDIR%%/inc/config.php.sample
+@sample(www,,) %%WWWDIR%%/inc/config_user.php.sample
+@dir(www,,) %%WWWDIR%%/magpierss/cache
+@dir(www,,) %%WWWDIR%%/img/feeds
+@dir(www,,) %%WWWDIR%%/tmp