1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00

Unbreak - don't write outside of ${WRKDIRPREFIX}.

PR:		ports/93288
Submitted by:	Babak Farrokhi <babak@farrokhi.net> (maintainer)
This commit is contained in:
Sam Lawrance 2006-02-14 12:26:36 +00:00
parent 328d3441d3
commit a2cccdf5c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156006
2 changed files with 3 additions and 12 deletions

View File

@ -16,22 +16,21 @@ EXTRACT_SUFX= .tgz
MAINTAINER= babak@farrokhi.net
COMMENT= A WikiWikiWeb clone using PHP
BROKEN= Does not build with read-only ports tree
USE_PHP= mbstring
PHP4_PORT?= www/mod_php4
WANT_PHP_WEB= yes
WRKSRC= ${WRKDIR}/${DISTNAME}
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST_SUB+= PMWIKIDIR=${PMWIKIDIR}
SUB_LIST+= PMWIKIDIR=${PMWIKIDIR}
SUB_FILES= pkg-message
pre-fetch:
.if !defined(PMWIKIDIR)
@${ECHO_MSG} ""
@${ECHO_MSG} "Define PMWIKIDIR to override default of 'www/data/pmwiki'."
@${ECHO_MSG} "Define PMWIKIDIR to override default of ${PMWIKIDIR}."
@${ECHO_MSG} ""
.endif
@ -39,19 +38,11 @@ PMWIKIDIR?= www/data/pmwiki
WWWUSER?= www
WWWGROUP?= www
post-configure:
@${SED} -e 's#%%PREFIX%%#${PREFIX}#g' -e 's#%%PMWIKIDIR%%#${PMWIKIDIR}#g' pkg-message > ${PKGMESSAGE}
do-install:
@${MKDIR} -m 755 ${PREFIX}/${PMWIKIDIR}
@${CP} -R ${WRKSRC}/ ${PREFIX}/${PMWIKIDIR}
@${CHOWN} ${WWWUSER}:${WWWGROUP} ${PREFIX}/${PMWIKIDIR}
pre-install:
cd ${WRKSRC} && ${FIND} -s * -type f | ${SED} -e 's|^|${PMWIKIDIR}/|' > ${PLIST} \
&& ${FIND} -d * -type d | ${SED} -e 's|^|@dirrm ${PMWIKIDIR}/|' >> ${PLIST} \
&& ${ECHO_MSG} "@unexec rmdir ${PMWIKIDIR} 2>/dev/null || true" >> ${PLIST}
post-install:
@${MKDIR} -m 775 ${PREFIX}/${PMWIKIDIR}/wiki.d
@${CHOWN} ${WWWUSER}:${WWWGROUP} ${PREFIX}/${PMWIKIDIR}/wiki.d