- Allow staging as a regular user

- Bump portversion as some directories were not packaged with intended owner
This commit is contained in:
Antoine Brodin 2014-10-19 15:33:24 +00:00
parent bb0bb496c4
commit dca0102834
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371185
2 changed files with 9 additions and 34 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= rnews PORTNAME= rnews
PORTVERSION= 1.01 PORTVERSION= 1.01
PORTREVISION= 1 PORTREVISION= 2
CATEGORIES= www CATEGORIES= www
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@ -57,21 +57,15 @@ do-install:
${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${STAGEDIR}${WWWDIR}/magpierss ${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${STAGEDIR}${WWWDIR}/magpierss
${INSTALL_DATA} ${WRKSRC}/magpierss/extlib/Snoopy.class.inc ${STAGEDIR}${WWWDIR}/magpierss/extlib ${INSTALL_DATA} ${WRKSRC}/magpierss/extlib/Snoopy.class.inc ${STAGEDIR}${WWWDIR}/magpierss/extlib
${INSTALL_DATA} -v ${WRKSRC}/opml/*.opml ${STAGEDIR}${WWWDIR}/opml ${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} .for FILE in ${CONFIGS}
${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${WWWDIR}/${FILE}.sample ${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${WWWDIR}/${FILE}.sample
.endfor .endfor
post-install:
.if ${PORT_OPTIONS:MDOCS} .if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${DOCSDIR}
. for FILE in ${PORTDOCS} . for FILE in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/${FILE} ${STAGEDIR}${DOCSDIR}
. endfor . endfor
.endif .endif
@${CAT} ${PKGMESSAGE}
create-plist: create-plist:
@${FIND} -s ${WRKSRC} \( -name "*.php" -o -name "*.inc" -o -name "*.js" -o -name "*.css" -o -name "*.jpg" \ @${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 \ -and -not -name config_user.php -and -not -name config.php \
| ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST} | ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST}
.for FILE in ${CONFIGS} .for FILE in ${CONFIGS}
@${ECHO_CMD} '@exec if [ ! -f %D/%%WWWDIR%%/${FILE} ]; then \ @${ECHO_CMD} '@sample(${WWWOWN},,) %%WWWDIR%%/${FILE}.sample' >> ${PLIST}
${INSTALL_DATA} %D/%%WWWDIR%%/${FILE}.sample %D/%%WWWDIR%%/${FILE}; \
${CHOWN} ${WWWOWN} %D/%%WWWDIR%%/${FILE}; \
${CHMOD} u+w %D/%%WWWDIR%%/${FILE}; fi' >> ${PLIST}
.endfor .endfor
.for FILE in ${CONFIGS} .for DIR in magpierss/cache img/feeds tmp
@${ECHO_CMD} '@unexec if cmp -s %D/%%WWWDIR%%/${FILE}.sample %D/%%WWWDIR%%/${FILE}; \ @${ECHO_CMD} '@dir(${WWWOWN},,) %%WWWDIR%%/${DIR}' >> ${PLIST}
then ${RM} -f %D/%%WWWDIR%%/${FILE}; fi' >> ${PLIST}
@${ECHO_CMD} '%%WWWDIR%%/${FILE}.sample' >> ${PLIST}
.endfor .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> .include <bsd.port.mk>

View file

@ -108,19 +108,8 @@
%%WWWDIR%%/rollover.js %%WWWDIR%%/rollover.js
%%WWWDIR%%/search.php %%WWWDIR%%/search.php
%%WWWDIR%%/tmp/.htaccess %%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 @sample(www,,) %%WWWDIR%%/inc/config.php.sample
@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 @sample(www,,) %%WWWDIR%%/inc/config_user.php.sample
@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 @dir(www,,) %%WWWDIR%%/magpierss/cache
%%WWWDIR%%/inc/config.php.sample @dir(www,,) %%WWWDIR%%/img/feeds
@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 @dir(www,,) %%WWWDIR%%/tmp
%%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%%