2003-12-29 06:13:32 +00:00
|
|
|
# New ports collection makefile for: Drupal
|
|
|
|
# Date Created: 10 Nov 2003
|
|
|
|
# Whom: Sebastian Yepes F. <esn@x123.info>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= drupal
|
2006-01-08 12:32:38 +00:00
|
|
|
PORTVERSION= 4.6.5
|
2003-12-29 06:13:32 +00:00
|
|
|
CATEGORIES= www
|
2005-01-09 22:50:13 +00:00
|
|
|
MASTER_SITES= http://drupal.org/files/projects/
|
2003-12-29 06:13:32 +00:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
|
|
|
|
2006-01-08 12:32:38 +00:00
|
|
|
MAINTAINER= wxs@csh.rit.edu
|
2003-12-29 06:13:32 +00:00
|
|
|
COMMENT= CMS that supports pgsql and mysql
|
|
|
|
|
2005-11-23 20:58:42 +00:00
|
|
|
USE_PHP= session
|
|
|
|
|
2004-05-10 09:02:05 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-09-18 21:35:21 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/libpq.so)
|
2005-01-09 22:50:13 +00:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
|
2004-05-09 18:05:50 +00:00
|
|
|
.endif
|
2004-02-22 00:10:35 +00:00
|
|
|
|
2005-11-03 13:49:19 +00:00
|
|
|
pre-fetch:
|
|
|
|
.if !defined(DRUPDIR)
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "Define DRUPDIR to override default of 'www/data/drupal'."
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
DRUPDIR?= www/data/drupal
|
|
|
|
WWWOWN?= www
|
|
|
|
WWWGRP?= www
|
|
|
|
|
2003-12-29 06:13:32 +00:00
|
|
|
NO_BUILD= yes
|
2004-04-04 13:07:59 +00:00
|
|
|
DOCS= CHANGELOG.txt INSTALL.txt LICENSE.txt MAINTAINERS.txt
|
2005-07-16 11:01:39 +00:00
|
|
|
PLIST_SUB+= DRUPDIR=${DRUPDIR}
|
2003-12-29 06:13:32 +00:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${MKDIR} ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/.htaccess ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/cron.php ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} -R ${WRKSRC}/database ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/favicon.ico ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} -R ${WRKSRC}/includes ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/index.php ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} -R ${WRKSRC}/misc ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} -R ${WRKSRC}/modules ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} -R ${WRKSRC}/scripts ${PREFIX}/${DRUPDIR}
|
2005-12-29 17:51:04 +00:00
|
|
|
${MKDIR} ${PREFIX}/${DRUPDIR}/sites/default
|
|
|
|
${CP} ${WRKSRC}/sites/default/settings.php ${PREFIX}/${DRUPDIR}/sites/default/settings.php-dist
|
|
|
|
@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
|
2005-05-04 13:48:22 +00:00
|
|
|
${CP} -R ${WRKSRC}/sites ${PREFIX}/${DRUPDIR}
|
2003-12-29 06:13:32 +00:00
|
|
|
${CP} -R ${WRKSRC}/themes ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/update.php ${PREFIX}/${DRUPDIR}
|
|
|
|
${CP} ${WRKSRC}/xmlrpc.php ${PREFIX}/${DRUPDIR}
|
2005-07-16 11:01:39 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-12-29 06:13:32 +00:00
|
|
|
${MKDIR} ${PREFIX}/${DRUPDIR}/doc
|
|
|
|
.for FILE in ${DOCS}
|
|
|
|
${CP} ${WRKSRC}/${FILE} ${PREFIX}/${DRUPDIR}/doc
|
|
|
|
.endfor
|
2005-07-16 11:01:39 +00:00
|
|
|
.endif
|
2003-12-29 06:13:32 +00:00
|
|
|
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DRUPDIR}
|
|
|
|
|
|
|
|
@${ECHO_MSG} ""
|
2004-04-04 13:07:59 +00:00
|
|
|
@${ECHO_MSG} " You now need to create the DB"
|
2003-12-29 06:13:32 +00:00
|
|
|
@${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} ""
|
2005-11-03 13:49:19 +00:00
|
|
|
@${ECHO_MSG} " Then edit the ${PREFIX}/${DRUPDIR}/sites/default/settings.php to your needs."
|
2003-12-29 06:13:32 +00:00
|
|
|
@${ECHO_MSG} " Once you have done that"
|
|
|
|
@${ECHO_MSG} " GoTo: http://<your_website>/drupal"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
|
2004-05-10 09:02:05 +00:00
|
|
|
.include <bsd.port.post.mk>
|