Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Oct 2014 15:33:25 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r371185 - head/www/rnews
Message-ID:  <201410191533.s9JFXPVJ079436@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sun Oct 19 15:33:24 2014
New Revision: 371185
URL: https://svnweb.freebsd.org/changeset/ports/371185
QAT: https://qat.redports.org/buildarchive/r371185/

Log:
  - Allow staging as a regular user
  - Bump portversion as some directories were not packaged with intended owner

Modified:
  head/www/rnews/Makefile
  head/www/rnews/pkg-plist

Modified: head/www/rnews/Makefile
==============================================================================
--- head/www/rnews/Makefile	Sun Oct 19 15:18:29 2014	(r371184)
+++ head/www/rnews/Makefile	Sun Oct 19 15:33:24 2014	(r371185)
@@ -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>

Modified: head/www/rnews/pkg-plist
==============================================================================
--- head/www/rnews/pkg-plist	Sun Oct 19 15:18:29 2014	(r371184)
+++ head/www/rnews/pkg-plist	Sun Oct 19 15:33:24 2014	(r371185)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410191533.s9JFXPVJ079436>