1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

www/tikiwiki: Add Stage support, switch to autogen pkg list

PR:		190954
Submitted by:	Joe Benden

The stage PR worked, but there were existing problems that weren't fixed,
such as muted install commands, "cp -r" instead of install macros, the use
of "-" prefix on commands that won't fail.  A list of additional, "while
we are here changes":

  * 16,000+ line, 1.1Mb pkg-plist removed, autogen instead
  * Remove now-unnecessary x-generate-plist maintainer target
  * Remove PLIST_SUB lines
  * Remove unnecessary roll-your-own extract target.  Leave one original
    deletion as a post-extract target
  * Use COPYTREE_SHARE instead of "cp -r"
  * move CHOWN operations to pkg-plist generation
This commit is contained in:
John Marino 2014-06-13 20:06:35 +00:00
parent 2db0c147d8
commit 602869b606
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357720
2 changed files with 16 additions and 16326 deletions

View File

@ -17,35 +17,30 @@ USE_PHP= gettext pcre posix session xml zlib
WANT_PHP_WEB= yes
NO_BUILD= yes
NO_MTREE= yes
TIKIWIKI_DIR?= www/${PORTNAME}-${PORTVERSION}
PLIST_SUB= TIKIWIKI_DIR=${TIKIWIKI_DIR}
TEMP_PLIST= ${WRKDIR}/temp-pkg-plist
SUB_FILES= pkg-message
SUB_LIST+= PORTNAME=${PORTNAME} TIKIWIKI_DIR=${TIKIWIKI_DIR}
WRKSRC= ${WRKDIR}/${DISTNAME}
# This target is only meant to be used by the port maintainer.
# Stolen from dokuwiki sorry :)
x-generate-plist: extract
@cd ${WRKSRC} && ${FIND} -s . -type f | \
${SED} -e 's|^./||;s|^|%%TIKIWIKI_DIR%%/|' > ${TEMP_PLIST} \
&& ${FIND} -s -d * -type d | \
${SED} -e 's|^|@dirrm %%TIKIWIKI_DIR%%/|' >> ${TEMP_PLIST} \
&& ${ECHO_CMD} "@dirrmtry %%TIKIWIKI_DIR%%" >> ${TEMP_PLIST}
NO_STAGE= yes
do-extract:
${MKDIR} ${WRKDIR}
${TAR} -yxf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} -C ${WRKDIR}
post-extract:
@${FIND} ${WRKSRC} -name '.DS_Store' -delete
do-install:
-${MKDIR} ${PREFIX}/${TIKIWIKI_DIR}
@${CP} -R ${WRKSRC}/ ${PREFIX}/${TIKIWIKI_DIR}
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${TIKIWIKI_DIR}
${MKDIR} ${STAGEDIR}${PREFIX}/${TIKIWIKI_DIR}
cd ${WRKSRC} && \
${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/${TIKIWIKI_DIR}
# pkg-plist would be over 15,000 lines, consuming 1.1Mb
# The benefits of a fixed pkg-plist aren't worth it, autogen!
post-install:
@${CAT} ${PKGMESSAGE}
@echo "@owner ${WWWOWN}" >> ${TMPPLIST}
@echo "@group ${WWWGRP}" >> ${TMPPLIST}
@cd ${STAGEDIR}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
${SORT} >> ${TMPPLIST}
@echo "@owner" >> ${TMPPLIST}
@echo "@group" >> ${TMPPLIST}
@cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | \
${SORT} -r | ${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST}
.include <bsd.port.mk>

File diff suppressed because it is too large Load Diff