summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-05-30 00:56:36 +0000
committerXin LI <delphij@FreeBSD.org>2014-05-30 00:56:36 +0000
commit53846cd5ebbc86f0ccc75d554bf31b14957e5f5b (patch)
tree1ec6b0b0c9dcffea81689f911602919248851216 /www
parent891b6976cc36c460c7ccadc860d5a15a9a9e7aeb (diff)
downloadfreebsd-ports-53846cd5ebbc86f0ccc75d554bf31b14957e5f5b.zip
Stageify.
Requested by: maintainer
Diffstat (limited to 'www')
-rw-r--r--www/phpbb/Makefile45
-rw-r--r--www/phpbb/pkg-plist18
2 files changed, 28 insertions, 35 deletions
diff --git a/www/phpbb/Makefile b/www/phpbb/Makefile
index 33e2c504c04a..eca1c4f5aa7c 100644
--- a/www/phpbb/Makefile
+++ b/www/phpbb/Makefile
@@ -10,11 +10,13 @@ DISTNAME= phpBB-${PORTVERSION}
MAINTAINER= liukang@cn.freebsd.org
COMMENT= A PHP-based bulletin board / discussion forum system
+LICENSE= GPLv2
+
RUN_DEPENDS= ${LOCALBASE}/share/pear/System.php:${PORTSDIR}/devel/pear
CONFLICTS= phpbb-tw-[0-9]*
-USE_BZIP2= yes
+USES= tar:bzip2
# The phpBB2 port supports a number of variables that may be tweaked at build
# time. Perform a "make options" to see more information on these variables.
@@ -24,7 +26,6 @@ PHPBBURL?= phpBB2
#
# End of user-configurable variables.
-NO_STAGE= yes
# Set/override/append to variables from bsd.port.mk:
#
WRKSRC= ${WRKDIR}/phpBB2
@@ -32,7 +33,7 @@ NO_BUILD= yes
SUB_FILES= pkg-message
SUB_LIST= PHPBBURL="${PHPBBURL}" \
PHPBBDIR="${PHPBBDIR}" \
- DELETEFILES="${EXCEPTFILES}"
+ DELETEFILES="${EXCEPTFILES:S,${STAGEDIR},,g}"
PHPBB_VER= ${PORTVERSION:S/.//g:S/.//g}
PLIST_SUB+= PHPBBDIR=${PHPBBDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
PLIST_SUB+= PHPBB_VER=${PHPBB_VER}
@@ -41,9 +42,9 @@ PLIST_SUB+= PHPBB_VER=${PHPBB_VER}
#
PHPBBDIR= ${WWWDOCROOT}/${PHPBBURL}
PKGOPTS= ${FILESDIR}/pkg-opts
-EXCEPTFILES= ${PREFIX}/${PHPBBDIR}/install/install.php \
- ${PREFIX}/${PHPBBDIR}/install/upgrade.php \
- ${PREFIX}/${PHPBBDIR}/install/update_to_latest.php
+EXCEPTFILES= ${STAGEDIR}${PREFIX}/${PHPBBDIR}/install/install.php \
+ ${STAGEDIR}${PREFIX}/${PHPBBDIR}/install/upgrade.php \
+ ${STAGEDIR}${PREFIX}/${PHPBBDIR}/install/update_to_latest.php
options:
@ ${ECHO_MSG} "===> Build options for ${PKGNAME}:"
@@ -60,30 +61,20 @@ pre-everything::
post-patch:
@ ${REINPLACE_CMD} -e "s#\.\./templates#/${PHPBBURL}/templates#" \
${WRKSRC}/docs/*.html
- @${RM} -f `${FIND} ${WRKSRC} -name '*.orig'`
+ @${FIND} ${WRKSRC} -name '*.orig' -or -name '*.bak' -delete
do-install:
- @ ${MKDIR} -m 0775 ${PREFIX}/${PHPBBDIR}
- @ cd ${WRKSRC} && ${FIND} * \( -name config.php \
+ @${MKDIR} -m 0775 ${STAGEDIR}${PREFIX}/${PHPBBDIR}
+ @cd ${WRKSRC} && ${FIND} * \( -name config.php \
${EXCEPTFILES:S/^/-o -name /} \
-o -name docs -a -prune -o -name contrib -a -prune \) -o -print \
- | ${TAR} cTf - - | ${TAR} xUCf ${PREFIX}/${PHPBBDIR} -
- @ ${TOUCH} ${PREFIX}/${PHPBBDIR}/config.php
- @ ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPBBDIR}
- @ ${MKDIR} ${DATADIR}/contrib
- @ cd ${WRKSRC} && ${INSTALL_DATA} ${EXCEPTFILES} ${DATADIR}
- @ cd ${WRKSRC}/contrib && ${INSTALL_DATA} * ${DATADIR}/contrib
-
-post-install:
-# @ cd ${DATADIR} && ${INSTALL} -c -o ${WWWOWN} -g ${WWWGRP} \
-# ${EXCEPTFILES} ${PREFIX}/${PHPBBDIR}
-.if !defined(NOPORTDOCS)
- @ ${MKDIR} ${DOCSDIR}
- @ cd ${WRKSRC}/docs && ${FIND} * -type f -maxdepth 0 \! -name \*.bak \
- \! -name COPYING -exec ${INSTALL_DATA} {} ${DOCSDIR} \;
-.if !defined(BATCH)
- @ ${CAT} ${PKGMESSAGE}
-.endif
-.endif
+ | ${TAR} cTf - - | ${TAR} xUCf ${STAGEDIR}${PREFIX}/${PHPBBDIR} -
+ @${INSTALL_DATA} ${WRKSRC}/config.php ${STAGEDIR}${PREFIX}/${PHPBBDIR}/config.php.example
+ @${MKDIR} ${STAGEDIR}${DATADIR}/contrib
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${EXCEPTFILES} ${STAGEDIR}${DATADIR}
+ @cd ${WRKSRC}/contrib && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}/contrib
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @cd ${WRKSRC}/docs && ${FIND} * -type f -maxdepth 0 \
+ \! -name COPYING -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR} \;
.include <bsd.port.mk>
diff --git a/www/phpbb/pkg-plist b/www/phpbb/pkg-plist
index 4394352b0ae3..de5c12fd4a2f 100644
--- a/www/phpbb/pkg-plist
+++ b/www/phpbb/pkg-plist
@@ -1,4 +1,3 @@
-@unexec [ -s %D/%%PHPBBDIR%%/config.php ] || rm -f %D/%%PHPBBDIR%%/config.php
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.html
%%PORTDOCS%%%%DOCSDIR%%/FAQ.html
@@ -14,6 +13,8 @@
%%DATADIR%%/install.php
%%DATADIR%%/update_to_latest.php
%%DATADIR%%/upgrade.php
+@owner %%WWWOWN%%
+@group %%WWWGRP%%
%%PHPBBDIR%%/admin/admin_board.php
%%PHPBBDIR%%/admin/admin_db_utilities.php
%%PHPBBDIR%%/admin/admin_disallow.php
@@ -302,12 +303,9 @@
%%PHPBBDIR%%/viewforum.php
%%PHPBBDIR%%/viewonline.php
%%PHPBBDIR%%/viewtopic.php
-@exec touch %B/config.php
-@exec chown -R %%WWWOWN%%:%%WWWGRP%% %B
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrmtry share/doc
-@dirrm %%DATADIR%%/contrib
-@dirrm %%DATADIR%%
+@unexec if cmp -s %D/%%PHPBBDIR%%/config.php %D/%%PHPBBDIR%%/config.php.example; then rm -f %D/%%PHPBBDIR%%/config.php ; fi
+%%PHPBBDIR%%/config.php.example
+@exec if [ ! -f %D/%%PHPBBDIR%%/config.php ]; then cp -p %D/%F %B/config.php; fi
@dirrm %%PHPBBDIR%%/admin
@dirrm %%PHPBBDIR%%/cache
@dirrm %%PHPBBDIR%%/db
@@ -327,4 +325,8 @@
@dirrmtry %%PHPBBDIR%%/templates/subSilver
@dirrmtry %%PHPBBDIR%%/templates
@dirrmtry %%PHPBBDIR%%
-
+@owner root
+@group wheel
+@dirrm %%DATADIR%%/contrib
+@dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%