aboutsummaryrefslogtreecommitdiffstats
path: root/www/drupal4
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-01-10 12:03:43 +0800
committerbrooks <brooks@FreeBSD.org>2006-01-10 12:03:43 +0800
commitf49e9b4ec3e11705dc631af5509041ddb0062f9b (patch)
treed72516bf292e4118f172e7efadc7d9c399b26717 /www/drupal4
parent75caf7725e746d537b30f744a8decb9baccf7c28 (diff)
downloadfreebsd-ports-gnome-f49e9b4ec3e11705dc631af5509041ddb0062f9b.tar.gz
freebsd-ports-gnome-f49e9b4ec3e11705dc631af5509041ddb0062f9b.tar.zst
freebsd-ports-gnome-f49e9b4ec3e11705dc631af5509041ddb0062f9b.zip
- Change DRUPDIR to www/durpal. www/data is owned by the installed
webserver and should not be modified - Add a dependancy on php?-xml - Delete redundant DISTNAME definition - Don't undo the config file dance by splatting the default over the top of the preserved file - Get rid of an unnecessicary .for loop - Move the message into pkg-message so it can be seen when installed as a package, add an entry with an Apache Alias example for the new DRUPDIR, and slightly improve the database examples Approved by: maintainer
Diffstat (limited to 'www/drupal4')
-rw-r--r--www/drupal4/Makefile40
-rw-r--r--www/drupal4/files/pkg-message.in27
-rw-r--r--www/drupal4/pkg-plist6
3 files changed, 41 insertions, 32 deletions
diff --git a/www/drupal4/Makefile b/www/drupal4/Makefile
index e90887a207f0..7ca6e627a6aa 100644
--- a/www/drupal4/Makefile
+++ b/www/drupal4/Makefile
@@ -7,14 +7,14 @@
PORTNAME= drupal
PORTVERSION= 4.6.5
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://drupal.org/files/projects/
-DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= wxs@csh.rit.edu
COMMENT= CMS that supports pgsql and mysql
-USE_PHP= session
+USE_PHP= session xml
.include <bsd.port.pre.mk>
@@ -22,20 +22,23 @@ USE_PHP= session
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
.endif
-pre-fetch:
.if !defined(DRUPDIR)
+pre-fetch:
@${ECHO_MSG} ""
- @${ECHO_MSG} "Define DRUPDIR to override default of 'www/data/drupal'."
+ @${ECHO_MSG} "Define DRUPDIR to override default of 'www/drupal'."
@${ECHO_MSG} ""
.endif
-DRUPDIR?= www/data/drupal
+DRUPDIR?= www/drupal
WWWOWN?= www
WWWGRP?= www
NO_BUILD= yes
DOCS= CHANGELOG.txt INSTALL.txt LICENSE.txt MAINTAINERS.txt
PLIST_SUB+= DRUPDIR=${DRUPDIR}
+SUB_LIST+= DRUPDIR=${DRUPDIR}
+SUB_FILES+= pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
do-install:
${MKDIR} ${PREFIX}/${DRUPDIR}
@@ -53,37 +56,16 @@ do-install:
@if [ ! -f ${PREFIX}/${DRUPDIR}/sites/default/settings.php ]; then \
${CP} -p ${PREFIX}/${DRUPDIR}/sites/default/settings.php-dist ${PREFIX}/${DRUPDIR}/sites/default/settings.php ; \
fi
- ${CP} -R ${WRKSRC}/sites ${PREFIX}/${DRUPDIR}
${CP} -R ${WRKSRC}/themes ${PREFIX}/${DRUPDIR}
${CP} ${WRKSRC}/update.php ${PREFIX}/${DRUPDIR}
${CP} ${WRKSRC}/xmlrpc.php ${PREFIX}/${DRUPDIR}
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/${DRUPDIR}/doc
-.for FILE in ${DOCS}
- ${CP} ${WRKSRC}/${FILE} ${PREFIX}/${DRUPDIR}/doc
-.endfor
+ ${CP} ${DOCS:S|^|${WRKSRC}/|} ${PREFIX}/${DRUPDIR}/doc
.endif
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DRUPDIR}
- @${ECHO_MSG} ""
- @${ECHO_MSG} " You now need to create the DB"
- @${ECHO_MSG} " where Drupal is going to live"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " PostgreSQL::"
- @${ECHO_MSG} " createdb -U pgsql -W drupal"
- @${ECHO_MSG} " createuser -U pgsql -e drupal"
- @${ECHO_MSG} " createlang -U pgsql -W plpgsql drupal"
- @${ECHO_MSG} " psql -U drupal drupal < ${PREFIX}/${DRUPDIR}/database/database.pgsql"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " MySQL::"
- @${ECHO_MSG} " mysqladmin -u dba_user -p create drupal"
- @${ECHO_MSG} " mysql -u dba_user -p"
- @${ECHO_MSG} " GRANT ALL PRIVILEGES ON drupal.* TO nobody@localhost IDENTIFIED BY 'password';"
- @${ECHO_MSG} " mysql -u nobody -p drupal < ${PREFIX}/${DRUPDIR}/database/database.mysql"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " Then edit the ${PREFIX}/${DRUPDIR}/sites/default/settings.php to your needs."
- @${ECHO_MSG} " Once you have done that"
- @${ECHO_MSG} " GoTo: http://<your_website>/drupal"
- @${ECHO_MSG} ""
+post-install:
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/www/drupal4/files/pkg-message.in b/www/drupal4/files/pkg-message.in
new file mode 100644
index 000000000000..10d65e2c1fea
--- /dev/null
+++ b/www/drupal4/files/pkg-message.in
@@ -0,0 +1,27 @@
+You now need to create the DB where Drupal is going to live
+
+ PostgreSQL::
+ createdb -U pgsql -W drupal
+ createuser -U pgsql -P -e drupal
+ createlang -U pgsql -W plpgsql drupal
+ psql -U drupal drupal < %%PREFIX%%/%%DRUPDIR%%/database/database.pgsql
+
+ MySQL::
+ mysqladmin -u dba_user -p create drupal
+ mysql -u dba_user -p
+ GRANT ALL PRIVILEGES ON drupal.* TO drupal@localhost IDENTIFIED BY 'passwd';
+ mysql -u drupal -p drupal < %%PREFIX%%/%%DRUPDIR%%/database/database.mysql"
+
+Then edit the %%PREFIX%%/%%DRUPDIR%%/sites/default/settings.php
+to your needs. Once you have done that you must add appropriate
+configuration directives to your apache configuration file
+(%%PREFIX%%/etc/apache(2)/httpd.conf). A typical configuration would be:
+
+ Alias /drupal "%%PREFIX%%/%%DRUPDIR%%"
+
+ <Directory "%%PREFIX%%/%%DRUPDIR%%">
+ Options Indexes FollowSymlinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+ </Directory>
diff --git a/www/drupal4/pkg-plist b/www/drupal4/pkg-plist
index 4810a1475d9f..f2a4397544bf 100644
--- a/www/drupal4/pkg-plist
+++ b/www/drupal4/pkg-plist
@@ -142,12 +142,12 @@
@dirrm %%DRUPDIR%%/themes/chameleon
@dirrm %%DRUPDIR%%/themes/bluemarine
@dirrm %%DRUPDIR%%/themes
-@dirrm %%DRUPDIR%%/sites/default
-@dirrm %%DRUPDIR%%/sites
+@unexec rmdir %D/%%DRUPDIR%%/sites/default 2>/dev/null || /usr/bin/true
+@unexec rmdir %D/%%DRUPDIR%%/sites 2>/dev/null || /usr/bin/true
@dirrm %%DRUPDIR%%/scripts
@dirrm %%DRUPDIR%%/modules
@dirrm %%DRUPDIR%%/misc
@dirrm %%DRUPDIR%%/includes
%%PORTDOCS%%@dirrm %%DRUPDIR%%/doc
@dirrm %%DRUPDIR%%/database
-@dirrm %%DRUPDIR%%
+@unexec rmdir %D/%%DRUPDIR%% 2>/dev/null || (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/%%DRUPDIR%% and its contents manually.")