diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2006-01-10 04:03:43 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2006-01-10 04:03:43 +0000 |
commit | 34e8cee99aca22de171dae9e842504f3e7165ae5 (patch) | |
tree | 66cca6415c61025819c59ad27d5426ecdad48bab /www/drupal6 | |
parent | d57ad7a668ef05da2d1e41a921b4f4b6307e106c (diff) | |
download | ports-34e8cee99aca22de171dae9e842504f3e7165ae5.tar.gz ports-34e8cee99aca22de171dae9e842504f3e7165ae5.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
Notes
Notes:
svn path=/head/; revision=153172
Diffstat (limited to 'www/drupal6')
-rw-r--r-- | www/drupal6/Makefile | 40 | ||||
-rw-r--r-- | www/drupal6/files/pkg-message.in | 27 | ||||
-rw-r--r-- | www/drupal6/pkg-plist | 6 |
3 files changed, 41 insertions, 32 deletions
diff --git a/www/drupal6/Makefile b/www/drupal6/Makefile index e90887a207f0..7ca6e627a6aa 100644 --- a/www/drupal6/Makefile +++ b/www/drupal6/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/drupal6/files/pkg-message.in b/www/drupal6/files/pkg-message.in new file mode 100644 index 000000000000..10d65e2c1fea --- /dev/null +++ b/www/drupal6/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/drupal6/pkg-plist b/www/drupal6/pkg-plist index 4810a1475d9f..f2a4397544bf 100644 --- a/www/drupal6/pkg-plist +++ b/www/drupal6/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.") |