summaryrefslogtreecommitdiffstats
path: root/www/phpbb
diff options
context:
space:
mode:
authorwjv <wjv@FreeBSD.org>2002-05-10 09:54:03 +0000
committerwjv <wjv@FreeBSD.org>2002-05-10 09:54:03 +0000
commit3f84eed8b3753701a0a149781a7804239dad4ddf (patch)
treee62b48cf90ef59083c8646b936664443a000f7ac /www/phpbb
parent69f79d70b12a1aa4ad4ac4b0f84cfa3bfa8ae5c4 (diff)
downloadFreeBSD-ports-3f84eed8b3753701a0a149781a7804239dad4ddf.zip
FreeBSD-ports-3f84eed8b3753701a0a149781a7804239dad4ddf.tar.gz
- Big cleanup - almost a complete rewrite of this port
- Add necessary dependency on www/mod_php4 - Structure port Makefile and $PLIST in such a way that configuration data is not overwritten upon reinstall - Ensure that (de)installation as package also works correctly - Install documentation under $DOCSDIR - Bump $PORTREVISION
Diffstat (limited to 'www/phpbb')
-rw-r--r--www/phpbb/Makefile66
-rw-r--r--www/phpbb/files/pkg-opts12
-rw-r--r--www/phpbb/pkg-message25
-rw-r--r--www/phpbb/pkg-plist35
4 files changed, 117 insertions, 21 deletions
diff --git a/www/phpbb/Makefile b/www/phpbb/Makefile
index 18440ee..ac5a581 100644
--- a/www/phpbb/Makefile
+++ b/www/phpbb/Makefile
@@ -7,6 +7,7 @@
PORTNAME= phpbb
PORTVERSION= 2.0.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -14,18 +15,71 @@ DISTNAME= phpBB-${PORTVERSION}
MAINTAINER= wjv@FreeBSD.org
+RUN_DEPENDS= ${LOCALBASE}/lib/php/System.php:${PORTSDIR}/www/mod_php4
+
+# 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.
+#
WRKSRC= ${WRKDIR}/phpBB2
NO_BUILD= yes
CPIO= cpio --quiet -pdum -R
-PHPBBDIR= www/data/phpBB
+WWWDOCROOT= www/data
+PHPBBURL= phpBB2
+PHPBBDIR= ${WWWDOCROOT}/${PHPBBURL}
WWWOWN= www
WWWGRP= www
-PLIST_SUB+= PHPBBDIR=${PHPBBDIR}
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGOPTS= ${FILESDIR}/pkg-opts
+PLIST_SUB+= PHPBBDIR=${PHPBBDIR} WWWOWN=${WWWOWN}
+EXCEPTFILES= install.php upgrade.php update_to_FINAL.php
+
+options:
+ @ ${ECHO_MSG} "===> Build options for ${PKGNAME}:"
+ @ ${PERL} -ne '/^#/ || /^\s/ && print || \
+ print sprintf "* %s [%s]\n %s", split(/\|/)' ${PKGOPTS}
+
+post-extract:
+.if !defined(BATCH)
+ @ ${TEST} -r ${PKGOPTS} && \
+ (${ECHO_MSG} '-------------------------------------------------------------------------'; \
+ ${ECHO_MSG} 'Perform a "make options" to see a list of available installation options.'; \
+ ${ECHO_MSG} '-------------------------------------------------------------------------')
+.endif
+
+post-patch:
+ @ ${PERL} -pi.orig -e "s#\.\./templates#/${PHPBBURL}/templates#" \
+ ${WRKSRC}/docs/*.html
+
+post-configure:
+ @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#g' \
+ -e 's#%%DOCSDIR%%#${DOCSDIR}#g' \
+ -e 's#%%PHPBBURL%%#${PHPBBURL}#g' \
+ -e 's#%%PHPBBDIR%%#${PHPBBDIR}#g' pkg-message > \
+ ${PKGMESSAGE}
do-install:
- @ ${MKDIR} -m 0775 ${PREFIX}/${PHPBBDIR} && \
- ${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPBBDIR}
- @ cd ${WRKSRC} && find * | ${CPIO} ${WWWOWN}:${WWWGRP} \
- ${PREFIX}/${PHPBBDIR}
+ @ ${MKDIR} -m 0775 ${PREFIX}/${PHPBBDIR}
+ @ ${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPBBDIR}
+ @ cd ${WRKSRC} && find * \( -name config.php \
+ ${EXCEPTFILES:S/^/-o -name /} -o -name docs -a -prune \) \
+ -o -print | ${CPIO} ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPBBDIR}
+ @ ${TOUCH} ${PREFIX}/${PHPBBDIR}/config.php
+ @ ${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPBBDIR}/config.php
+ @ ${MKDIR} ${DATADIR}
+ @ cd ${WRKSRC} && ${INSTALL_DATA} ${EXCEPTFILES} ${DATADIR}
+
+post-install:
+ @ cd ${DATADIR} && ${INSTALL} -c -o ${WWWOWN} -g ${WWWGRP} \
+ ${EXCEPTFILES} ${PREFIX}/${PHPBBDIR}
+.if !defined(NOPORTOCS)
+ @ ${MKDIR} ${DOCSDIR}
+.for docfile in AUTHORS FAQ.html INSTALL.html README.html \
+ coding-guidelines.txt codingstandards.htm
+ @ ${INSTALL_DATA} ${WRKSRC}/docs/${docfile} ${DOCSDIR}
+.endfor
+.if !defined(BATCH)
+ @ ${CAT} ${PKGMESSAGE}
+.endif
+.endif
.include <bsd.port.mk>
diff --git a/www/phpbb/files/pkg-opts b/www/phpbb/files/pkg-opts
new file mode 100644
index 0000000..c3a754a
--- /dev/null
+++ b/www/phpbb/files/pkg-opts
@@ -0,0 +1,12 @@
+# Variable|Default value|Short description
+# Multi-line/long description (optional).
+# Multi-line/long description lines must start with whitespace!
+#
+WWWDOCROOT|www/data|The DocumentRoot of your webserver under ${LOCALBASE}
+PHPBBURL|phpBB2|The base URL of phpBB2 on your webserver
+ phpBB2 will be installed under ${LOCALBASE}/${WWWDOCROOT}/${PHPBBURL},
+ and will be visible as http://localhost/${PHPBBURL}/
+WWWOWN|www|The user ID under which your webserver executes
+ It is recommended that you do not change this option.
+WWWGRP|www|The group ID under which your webserver executes
+ It is recommended that you do not change this option.
diff --git a/www/phpbb/pkg-message b/www/phpbb/pkg-message
new file mode 100644
index 0000000..de2ae42
--- /dev/null
+++ b/www/phpbb/pkg-message
@@ -0,0 +1,25 @@
+----------------------------------------------------------------------------
+phpBB2 has been installed, but is not quite ready to be used yet!
+
+You have to ensure that you have a database server (or ODBC access to a
+remote database) installed and configured, and you have to ensure that your
+PHP installation has been compiled with support for your database or
+database access method. You have to create a database for phpBB2 to use,
+and ensure that this database may be accessed and changed by the user id
+under which your web server executes. Further information on these
+installation procedures may be found in:
+
+ %%DOCSDIR%%/INDEX.html
+
+Once these steps have been taken, you may connect to the following URL to
+configure your installation of phpBB2:
+
+ http://localhost/%%PHPBBURL%%/
+
+After configuring phpBB2 and ensuring that it is operational, you MUST
+delete the following three files manually for security purposes:
+
+ %%PREFIX%%/%%PHPBBDIR%%/install.php
+ %%PREFIX%%/%%PHPBBDIR%%/upgrade.php
+ %%PREFIX%%/%%PHPBBDIR%%/update_to_FINAL.php
+----------------------------------------------------------------------------
diff --git a/www/phpbb/pkg-plist b/www/phpbb/pkg-plist
index a55b1d0..719ebb6 100644
--- a/www/phpbb/pkg-plist
+++ b/www/phpbb/pkg-plist
@@ -1,3 +1,4 @@
+@unexec [ -s %D/%%PHPBBDIR%%/config.php ] || rm -f %D/%%PHPBBDIR%%/config.php
%%PHPBBDIR%%/admin/admin_board.php
%%PHPBBDIR%%/admin/admin_db_utilities.php
%%PHPBBDIR%%/admin/admin_disallow.php
@@ -18,7 +19,6 @@
%%PHPBBDIR%%/admin/page_header_admin.php
%%PHPBBDIR%%/admin/pagestart.php
%%PHPBBDIR%%/common.php
-%%PHPBBDIR%%/config.php
%%PHPBBDIR%%/contrib/README.html
%%PHPBBDIR%%/contrib/attachments.zip
%%PHPBBDIR%%/contrib/card_ban_system.zip
@@ -47,13 +47,6 @@
%%PHPBBDIR%%/db/schemas/oracle_triggers.sql
%%PHPBBDIR%%/db/schemas/postgres_basic.sql
%%PHPBBDIR%%/db/schemas/postgres_schema.sql
-%%PHPBBDIR%%/docs/AUTHORS
-%%PHPBBDIR%%/docs/COPYING
-%%PHPBBDIR%%/docs/FAQ.html
-%%PHPBBDIR%%/docs/INSTALL.html
-%%PHPBBDIR%%/docs/README.html
-%%PHPBBDIR%%/docs/coding-guidelines.txt
-%%PHPBBDIR%%/docs/codingstandards.htm
%%PHPBBDIR%%/extension.inc
%%PHPBBDIR%%/faq.php
%%PHPBBDIR%%/groupcp.php
@@ -111,7 +104,6 @@
%%PHPBBDIR%%/includes/usercp_sendpasswd.php
%%PHPBBDIR%%/includes/usercp_viewprofile.php
%%PHPBBDIR%%/index.php
-%%PHPBBDIR%%/install.php
%%PHPBBDIR%%/language/index.htm
%%PHPBBDIR%%/language/lang_english/email/admin_activate.tpl
%%PHPBBDIR%%/language/lang_english/email/admin_send_email.tpl
@@ -297,11 +289,26 @@
%%PHPBBDIR%%/templates/subSilver/viewtopic_body.tpl
%%PHPBBDIR%%/templates/subSilver/viewtopic_poll_ballot.tpl
%%PHPBBDIR%%/templates/subSilver/viewtopic_poll_result.tpl
-%%PHPBBDIR%%/update_to_FINAL.php
-%%PHPBBDIR%%/upgrade.php
%%PHPBBDIR%%/viewforum.php
%%PHPBBDIR%%/viewonline.php
%%PHPBBDIR%%/viewtopic.php
+@exec touch %B/config.php && chown %%WWWOWN%% %B/config.php
+%%PORTDOCS%%share/doc/phpbb/AUTHORS
+%%PORTDOCS%%share/doc/phpbb/FAQ.html
+%%PORTDOCS%%share/doc/phpbb/INSTALL.html
+%%PORTDOCS%%share/doc/phpbb/README.html
+%%PORTDOCS%%share/doc/phpbb/coding-guidelines.txt
+%%PORTDOCS%%share/doc/phpbb/codingstandards.htm
+share/phpbb/install.php
+@exec install -c -o %%WWWOWN%% %D/%F %D/%%PHPBBDIR%%
+@unexec rm -f %D/%%PHPBBDIR%%/%f 2>/dev/null || true
+share/phpbb/update_to_FINAL.php
+@exec install -c -o %%WWWOWN%% %D/%F %D/%%PHPBBDIR%%
+@unexec rm -f %D/%%PHPBBDIR%%/%f 2>/dev/null || true
+share/phpbb/upgrade.php
+@exec install -c -o %%WWWOWN%% %D/%F %D/%%PHPBBDIR%%
+@unexec rm -f %D/%%PHPBBDIR%%/%f 2>/dev/null || true
+@dirrm share/phpbb
@dirrm %%PHPBBDIR%%/templates/subSilver/images/lang_english
@dirrm %%PHPBBDIR%%/templates/subSilver/images
@dirrm %%PHPBBDIR%%/templates/subSilver/admin
@@ -315,11 +322,9 @@
@dirrm %%PHPBBDIR%%/images/avatars/uploads
@dirrm %%PHPBBDIR%%/images/avatars
@dirrm %%PHPBBDIR%%/images
-@dirrm %%PHPBBDIR%%/docs
@dirrm %%PHPBBDIR%%/db/schemas
@dirrm %%PHPBBDIR%%/db
@dirrm %%PHPBBDIR%%/contrib
@dirrm %%PHPBBDIR%%/admin
-@dirrm %%PHPBBDIR%%
-@unexec rmdir %D/www/data 2>/dev/null || true
-@unexec rmdir %D/www 2>/dev/null || true
+@unexec rmdir %D/%%PHPBBDIR%% 2>/dev/null || true
+%%PORTDOCS%%@dirrm share/doc/phpbb
OpenPOWER on IntegriCloud