svn commit: r371185 - head/www/rnews

Antoine Brodin antoine at FreeBSD.org
Sun Oct 19 15:33:26 UTC 2014


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}, at 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
- at 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
- at 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
- at 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
- at 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
- at unexec if [ $(ls %D/%%WWWDIR%%/img/feeds/|wc -w) -eq 0 ]; then /bin/rm -rf %D/%%WWWDIR%%/img/feeds;fi
- at dirrmtry %%WWWDIR%%/img/feeds
- at dirrm %%WWWDIR%%/img
- at dirrm %%WWWDIR%%/inc
- at dirrm %%WWWDIR%%/magpierss/cache
- at dirrm %%WWWDIR%%/magpierss/extlib
- at dirrm %%WWWDIR%%/magpierss
- at dirrm %%WWWDIR%%/opml
- at dirrm %%WWWDIR%%/tmp
- at dirrm %%WWWDIR%%
+ at sample(www,,) %%WWWDIR%%/inc/config.php.sample
+ at sample(www,,) %%WWWDIR%%/inc/config_user.php.sample
+ at dir(www,,) %%WWWDIR%%/magpierss/cache
+ at dir(www,,) %%WWWDIR%%/img/feeds
+ at dir(www,,) %%WWWDIR%%/tmp


More information about the svn-ports-all mailing list