svn commit: r355765 - head/www/phpbb

Xin LI delphij at FreeBSD.org
Fri May 30 00:56:37 UTC 2014


Author: delphij
Date: Fri May 30 00:56:36 2014
New Revision: 355765
URL: http://svnweb.freebsd.org/changeset/ports/355765
QAT: https://qat.redports.org/buildarchive/r355765/

Log:
  Stageify.
  
  Requested by:	maintainer

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

Modified: head/www/phpbb/Makefile
==============================================================================
--- head/www/phpbb/Makefile	Fri May 30 00:45:06 2014	(r355764)
+++ head/www/phpbb/Makefile	Fri May 30 00:56:36 2014	(r355765)
@@ -10,11 +10,13 @@ DISTNAME=	phpBB-${PORTVERSION}
 MAINTAINER=	liukang at 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>

Modified: head/www/phpbb/pkg-plist
==============================================================================
--- head/www/phpbb/pkg-plist	Fri May 30 00:45:06 2014	(r355764)
+++ head/www/phpbb/pkg-plist	Fri May 30 00:56:36 2014	(r355765)
@@ -1,4 +1,3 @@
- at 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
+ at owner %%WWWOWN%%
+ at 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
- at exec touch %B/config.php
- at exec chown -R %%WWWOWN%%:%%WWWGRP%% %B
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
- at dirrmtry share/doc
- at dirrm %%DATADIR%%/contrib
- at dirrm %%DATADIR%%
+ at 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
+ at 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%%
-
+ at owner root
+ at group wheel
+ at dirrm %%DATADIR%%/contrib
+ at dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%


More information about the svn-ports-head mailing list