Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jun 2014 05:07:59 +0000 (UTC)
From:      Martin Wilke <miwi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r356287 - head/www/rnews
Message-ID:  <201406030507.s5357xki045507@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: miwi
Date: Tue Jun  3 05:07:59 2014
New Revision: 356287
URL: http://svnweb.freebsd.org/changeset/ports/356287
QAT: https://qat.redports.org/buildarchive/r356287/

Log:
  - Stage support
  
  PR:		90394

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

Modified: head/www/rnews/Makefile
==============================================================================
--- head/www/rnews/Makefile	Tue Jun  3 05:06:59 2014	(r356286)
+++ head/www/rnews/Makefile	Tue Jun  3 05:07:59 2014	(r356287)
@@ -18,7 +18,6 @@ OPTIONS_DEFINE=	GD MYSQLSERVER DOCS
 OPTIONS_DEFAULT=	GD
 MYSQLSERVER_DESC=	Use MySQL-Server on localhost
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 USE_PHP=	mysql mbstring pcre xml iconv
@@ -41,42 +40,35 @@ PORTDOCS=	CHANGELOG INSTALL LICENSE READ
 CONFIGS=	inc/config.php inc/config_user.php
 
 do-install:
-	@${FIND} -s ${WRKSRC} -type  d | ${SED} -e 's,^${WRKSRC},${WWWDIR},' \
+	@${FIND} -s ${WRKSRC} -type  d | ${SED} -e 's,^${WRKSRC},${STAGEDIR}${WWWDIR},' \
 		| ${XARGS} ${MKDIR}
-	${INSTALL_DATA} -v ${WRKSRC}/*.php ${WWWDIR}
-	${INSTALL_DATA} -v ${WRKSRC}/*.css ${WWWDIR}
-	${INSTALL_DATA} -v ${WRKSRC}/*.js ${WWWDIR}
-	${INSTALL_DATA} ${WRKSRC}/.htaccess ${WWWDIR}
-	${INSTALL_DATA} ${WRKSRC}/tmp/.htaccess ${WWWDIR}/tmp
-	${INSTALL_DATA} ${WRKSRC}/favicon.ico ${WWWDIR}
-	${INSTALL_DATA} ${WRKSRC}/help.html ${WWWDIR}
-	${INSTALL_DATA} -v ${WRKSRC}/img/*.gif ${WWWDIR}/img
-	${INSTALL_DATA} -v ${WRKSRC}/img/*.png ${WWWDIR}/img
-	${INSTALL_DATA} -v ${WRKSRC}/img/*.jpg ${WWWDIR}/img
-	( ${FIND} ${WRKSRC}/inc -type f -not -name config_user.php -a -not -name config.php; ${ECHO} ${WWWDIR}/inc ) \
+	${INSTALL_DATA} -v ${WRKSRC}/*.php ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} -v ${WRKSRC}/*.css ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} -v ${WRKSRC}/*.js ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/.htaccess ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/tmp/.htaccess ${STAGEDIR}${WWWDIR}/tmp
+	${INSTALL_DATA} ${WRKSRC}/favicon.ico ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} ${WRKSRC}/help.html ${STAGEDIR}${WWWDIR}
+	${INSTALL_DATA} -v ${WRKSRC}/img/*.gif ${STAGEDIR}${WWWDIR}/img
+	${INSTALL_DATA} -v ${WRKSRC}/img/*.png ${STAGEDIR}${WWWDIR}/img
+	${INSTALL_DATA} -v ${WRKSRC}/img/*.jpg ${STAGEDIR}${WWWDIR}/img
+	( ${FIND} ${WRKSRC}/inc -type f -not -name config_user.php -a -not -name config.php; ${ECHO} ${STAGEDIR}${WWWDIR}/inc ) \
 		| ${XARGS} ${INSTALL_DATA} -v
-	${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${WWWDIR}/magpierss
-	${INSTALL_DATA} ${WRKSRC}/magpierss/extlib/Snoopy.class.inc ${WWWDIR}/magpierss/extlib
-	${INSTALL_DATA} -v ${WRKSRC}/opml/*.opml ${WWWDIR}/opml
-	@${CHOWN} ${WWWOWN} ${WWWDIR}/magpierss/cache
-	@${CHOWN} ${WWWOWN} ${WWWDIR}/img/feeds
-	@${CHOWN} ${WWWOWN} ${WWWDIR}/tmp
+	${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} ${WWWDIR}/${FILE}.sample
+	${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${WWWDIR}/${FILE}.sample
 .endfor
 
 post-install:
-.for FILE in ${CONFIGS}
-. if !exists(${WWWDIR}/${FILE})
-	${INSTALL_DATA} ${WWWDIR}/${FILE}.sample ${WWWDIR}/${FILE}
-	@${CHOWN} ${WWWOWN} ${WWWDIR}/${FILE}
-	@${CHMOD} u+w ${WWWDIR}/${FILE}
-. endif
-.endfor
 .if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
 . for FILE in ${PORTDOCS}
-	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
 . endfor
 .endif
 	@${CAT} ${PKGMESSAGE}

Modified: head/www/rnews/pkg-plist
==============================================================================
--- head/www/rnews/pkg-plist	Tue Jun  3 05:06:59 2014	(r356286)
+++ head/www/rnews/pkg-plist	Tue Jun  3 05:07:59 2014	(r356287)
@@ -115,6 +115,7 @@
 @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



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