2002-05-15 12:32:20 +02:00
|
|
|
# Ports collection makefile for: horde2
|
2001-12-03 03:36:06 +01:00
|
|
|
# Date created: Sun Oct 07, 2001
|
|
|
|
# Whom: Thierry Thomas (<thierry@thomas.as>)
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= horde
|
2004-10-26 21:38:56 +02:00
|
|
|
PORTVERSION= 2.2.7
|
2001-12-03 03:36:06 +01:00
|
|
|
CATEGORIES= www
|
2003-01-30 10:28:41 +01:00
|
|
|
MASTER_SITES= ftp://ftp.horde.org/pub/horde/ \
|
2004-03-16 23:20:32 +01:00
|
|
|
ftp://ftp.planetmirror.com/pub/horde/horde/ \
|
|
|
|
ftp://ftp.au.horde.org/pub/horde/horde/ \
|
|
|
|
ftp://ftp.be.horde.org/horde/ \
|
2003-01-30 10:28:41 +01:00
|
|
|
ftp://ftp.es.horde.org/pub/horde/ \
|
|
|
|
ftp://ftp.it.horde.org/pub/mirror/horde.org/horde/ \
|
|
|
|
ftp://ftp.nl.horde.org/mirror/horde-ftp/pub/horde/ \
|
2004-03-16 23:20:32 +01:00
|
|
|
ftp://ftp.uk.horde.org/mirrors/ftp.horde.org/pub/horde/ \
|
|
|
|
http://ftp.horde.org/pub/horde/
|
2001-12-03 03:36:06 +01:00
|
|
|
|
2004-07-19 11:42:01 +02:00
|
|
|
MAINTAINER= thierry@FreeBSD.org
|
2003-02-21 15:08:24 +01:00
|
|
|
COMMENT= A common code-base used by Horde applications, written in PHP
|
2001-12-03 03:36:06 +01:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------
|
2003-09-24 12:22:45 +02:00
|
|
|
# You may define these options:
|
|
|
|
#
|
|
|
|
# - WITH_APACHE2: if you run Apache2;
|
2001-12-03 03:36:06 +01:00
|
|
|
#
|
2003-09-24 12:22:45 +02:00
|
|
|
# - WITHOUT_SUPPORTED_DB: if you run a database not in the ports tree.
|
2001-12-03 03:36:06 +01:00
|
|
|
#
|
2004-07-19 11:42:01 +02:00
|
|
|
# - WITHOUT_MYSQL: this port is built with MySQL by default
|
|
|
|
# but you might choose any other database
|
|
|
|
# supported by PHP (e.g. WITH_POSTGRESQL).
|
|
|
|
#
|
|
|
|
# - WITHOUT_IMP: this port is intended to build a default
|
|
|
|
# package for IMP; use this knob if for
|
|
|
|
# example you only need Chora.
|
|
|
|
#
|
|
|
|
# - WITHOUT_LDAP: if you do not need OpenLDAP.
|
|
|
|
#
|
|
|
|
# - WITHOUT_MCAL: if you don't plan to install Kronolith.
|
|
|
|
#
|
|
|
|
# - WITHOUT_FTP: if you don't plan to install Gollem.
|
|
|
|
#
|
2001-12-03 03:36:06 +01:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
|
2004-07-19 11:42:01 +02:00
|
|
|
RUN_DEPENDS= ${PEARDIR}/Date.php:${PORTSDIR}/devel/pear-Date \
|
2003-06-08 08:00:39 +02:00
|
|
|
${PEARDIR}/HTML/Common.php:${PORTSDIR}/devel/pear-HTML_Common \
|
|
|
|
${PEARDIR}/Log.php:${PORTSDIR}/sysutils/pear-Log \
|
2004-08-31 20:53:45 +02:00
|
|
|
${PEARDIR}/Mail/mime.php:${PORTSDIR}/mail/pear-Mail_Mime \
|
|
|
|
${PEARDIR}/DB.php:${PORTSDIR}/databases/pear-DB
|
2001-12-03 03:36:06 +01:00
|
|
|
|
|
|
|
NO_BUILD= yes
|
2004-07-19 11:42:01 +02:00
|
|
|
USE_PHP= domxml gettext session
|
|
|
|
WANT_PHP_MOD= yes
|
2004-07-29 00:52:38 +02:00
|
|
|
BROKEN_WITH_PHP=5
|
2002-06-26 05:54:09 +02:00
|
|
|
USE_REINPLACE= yes
|
|
|
|
|
2004-07-19 11:42:01 +02:00
|
|
|
.if !defined(NOCRYPT)
|
|
|
|
USE_PHP+= mcrypt
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_MYSQL)
|
|
|
|
USE_PHP+= mysql
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_LDAP)
|
|
|
|
USE_PHP+= ldap
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_IMP)
|
|
|
|
USE_PHP+= imap
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_MCAL)
|
|
|
|
USE_PHP+= mcal
|
|
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_FTP)
|
|
|
|
USE_PHP+= ftp
|
|
|
|
.endif
|
2003-01-30 10:28:41 +01:00
|
|
|
|
2002-06-26 05:54:09 +02:00
|
|
|
REINPLACE_ARGS= -i.beforeHorde
|
2002-01-19 17:58:09 +01:00
|
|
|
DOCS= COPYING README docs/CHANGES docs/CODING_STANDARDS \
|
2003-02-16 00:47:36 +01:00
|
|
|
docs/CONTRIBUTING docs/CREDITS docs/HACKING docs/INSTALL \
|
2004-03-16 23:20:32 +01:00
|
|
|
docs/RELEASE_NOTES docs/SECURITY docs/TRANSLATIONS
|
2003-04-29 05:18:35 +02:00
|
|
|
CONFFILE= horde.php html.php lang.php mime_drivers.php mime_mapping.php \
|
2002-05-16 09:36:11 +02:00
|
|
|
motd.php prefs.php registry.php
|
|
|
|
SUB_DIRS= config graphics lib locale po scripts templates util
|
2001-12-03 03:36:06 +01:00
|
|
|
|
|
|
|
LHORDEDIR?= www/horde
|
|
|
|
LHORDESBIN?= sbin
|
|
|
|
|
|
|
|
PLIST_SUB= HORDEDIR=${LHORDEDIR} HORDESBIN=${LHORDESBIN}
|
|
|
|
|
|
|
|
HORDEDIR= ${PREFIX}/${LHORDEDIR}
|
|
|
|
HORDESBIN= ${PREFIX}/${LHORDESBIN}
|
2001-12-12 21:09:16 +01:00
|
|
|
CONFDIR= ${HORDEDIR}/config
|
2001-12-03 03:36:06 +01:00
|
|
|
|
|
|
|
APACHE_CONF= ${APACHE_CNFDIR}/httpd.conf
|
2003-06-08 08:00:39 +02:00
|
|
|
PEARDIR?= ${LOCALBASE}/share/pear
|
2003-03-30 03:50:03 +02:00
|
|
|
.if defined(WITH_APACHE2)
|
|
|
|
APACHE_CNFDIR= ${LOCALBASE}/etc/apache2
|
|
|
|
.else
|
|
|
|
APACHE_CNFDIR= ${LOCALBASE}/etc/apache
|
|
|
|
.endif
|
2001-12-12 21:09:16 +01:00
|
|
|
HORDE_INC= ${PREFIX}/etc/horde
|
2001-12-03 03:36:06 +01:00
|
|
|
LOG_FILE?= /var/log/horde.log
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "If you plan to install IMP, it is better to configure"
|
2001-12-12 21:09:16 +01:00
|
|
|
@${ECHO_MSG} "PHP with IMAP / IMAP-SSL, OpenLDAP, OpenSSL, mcrypt, XML,"
|
2003-01-30 10:28:41 +01:00
|
|
|
@${ECHO_MSG} "FTP, gettext, zlib, MCAL and a database (like MySQL or"
|
|
|
|
@${ECHO_MSG} "PostgreSQL)."
|
2002-05-16 09:36:11 +02:00
|
|
|
@${ECHO_MSG} "For Japanese language, please enable mbstring."
|
2001-12-03 03:36:06 +01:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@if [ -f ${HORDEDIR}/index.php3 ]; then \
|
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${ECHO_MSG} "Please deinstall the port www/horde." ; \
|
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi
|
2003-01-30 10:28:41 +01:00
|
|
|
# N.B.: database dependencies are binded with mod_php#, not with Horde
|
|
|
|
.if !defined(WITHOUT_SUPPORTED_DB)
|
2004-07-19 11:42:01 +02:00
|
|
|
@if ! php -m | ${GREP} -q -e "mysql" ; then \
|
|
|
|
if ! php -m | ${GREP} -q -e "pgsql" ; then \
|
|
|
|
if ! php -m | ${GREP} -q -e "sybase" ; then \
|
|
|
|
if ! php -m | ${GREP} -q -e "sybase_ct" ; then \
|
2003-01-30 10:28:41 +01:00
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${ECHO_MSG} "Please configure PHP with a database support." ; \
|
|
|
|
${ECHO_MSG} "MySQL, PostgreSQL and Sybase (CTLIB or DBLIB)" ; \
|
|
|
|
${ECHO_MSG} "can be used with PHP AND Horde." ; \
|
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${ECHO_MSG} "(If everything will run on this machine, do not" ; \
|
|
|
|
${ECHO_MSG} " forget to install the database server-side!)" ; \
|
|
|
|
${ECHO_MSG} "" ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi ; \
|
|
|
|
fi ; \
|
|
|
|
fi ; \
|
|
|
|
fi
|
|
|
|
.endif
|
2001-12-03 03:36:06 +01:00
|
|
|
|
2003-08-23 09:56:26 +02:00
|
|
|
post-patch:
|
2004-07-29 00:52:38 +02:00
|
|
|
@${RM} ${WRKSRC}/po/translation.php.orig \
|
|
|
|
${WRKSRC}/scripts/db/README.orig \
|
|
|
|
${WRKSRC}/scripts/set_perms.sh.orig \
|
|
|
|
${WRKSRC}/config/horde.php.dist.orig \
|
|
|
|
${WRKSRC}/config/registry.php.dist.orig \
|
|
|
|
${WRKSRC}/config/mime_drivers.php.dist.orig
|
2003-08-23 09:56:26 +02:00
|
|
|
|
2001-12-03 03:36:06 +01:00
|
|
|
do-install:
|
2001-12-12 21:09:16 +01:00
|
|
|
@${MKDIR} ${HORDEDIR}
|
2002-05-16 09:36:11 +02:00
|
|
|
.for REP in ${SUB_DIRS}
|
|
|
|
@${CP} -Rp ${WRKSRC}/${REP} ${HORDEDIR}
|
|
|
|
.endfor
|
2001-12-12 21:09:16 +01:00
|
|
|
@${CP} -p ${WRKSRC}/*.php ${HORDEDIR}
|
|
|
|
@if [ ! -f ${CONFDIR}/horde.php ]; then \
|
|
|
|
${CP} ${CONFDIR}/horde.php.dist ${CONFDIR}/horde.php ; \
|
2002-06-26 05:54:09 +02:00
|
|
|
${REINPLACE_CMD} -e "s:/tmp/horde.log:${LOG_FILE}:g" ${CONFDIR}/horde.php ; \
|
|
|
|
${RM} ${CONFDIR}/horde.php.beforeHorde ; \
|
2001-12-03 03:36:06 +01:00
|
|
|
fi
|
2002-06-26 05:54:09 +02:00
|
|
|
@${REINPLACE_CMD} -e "s:/etc/mpasswd:${LOCALBASE}/etc/mpasswd:g" \
|
2002-01-19 17:58:09 +01:00
|
|
|
${HORDEDIR}/lib/Auth/mcal.php
|
2002-06-26 05:54:09 +02:00
|
|
|
@${RM} ${HORDEDIR}/lib/Auth/mcal.php.beforeHorde
|
2001-12-12 21:09:16 +01:00
|
|
|
.for FILE in ${CONFFILE}
|
|
|
|
@if [ ! -f ${CONFDIR}/${FILE} ]; then \
|
|
|
|
${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
|
2001-12-03 03:36:06 +01:00
|
|
|
fi
|
2001-12-12 21:09:16 +01:00
|
|
|
.endfor
|
2002-06-26 05:54:09 +02:00
|
|
|
@${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:" ${CONFDIR}/mime_drivers.php
|
|
|
|
@${RM} ${CONFDIR}/mime_drivers.php.beforeHorde
|
2001-12-12 21:09:16 +01:00
|
|
|
@${CP} ${WRKSRC}/scripts/set_perms.sh ${HORDESBIN}/horde_set_perms.sh
|
2002-06-26 05:54:09 +02:00
|
|
|
@${REINPLACE_CMD} -e "s:UPDATED_BY_THE_PORT:${HORDEDIR}/:g" \
|
2002-01-19 17:58:09 +01:00
|
|
|
${HORDESBIN}/horde_set_perms.sh
|
2002-06-26 05:54:09 +02:00
|
|
|
@${RM} ${HORDESBIN}/horde_set_perms.sh.beforeHorde
|
2002-01-19 17:58:09 +01:00
|
|
|
@${CHMOD} u+x ${HORDESBIN}/horde_set_perms.sh
|
2001-12-12 21:09:16 +01:00
|
|
|
@(if [ -f ${APACHE_CONF} ] ; then \
|
2002-06-26 05:54:09 +02:00
|
|
|
${MKDIR} ${HORDE_INC} ; \
|
|
|
|
${CP} -p ${FILESDIR}/httpd.conf.horde ${HORDE_INC} ; \
|
|
|
|
${REINPLACE_CMD} -e "s:/home/httpd/html/horde:${HORDEDIR}:g ; \
|
2003-06-08 08:00:39 +02:00
|
|
|
s:/home/httpd/phplib:${PEARDIR}:g" ${HORDE_INC}/httpd.conf.horde ; \
|
2002-06-26 05:54:09 +02:00
|
|
|
${RM} ${HORDE_INC}/httpd.conf.horde.beforeHorde ; \
|
|
|
|
${ECHO_MSG} "===> Updating ${APACHE_CONF}..." ; \
|
|
|
|
${REINPLACE_CMD} -e "s:php_value auto_prepend_file:# php_value auto_prepend_file:g ; \
|
2003-06-08 08:00:39 +02:00
|
|
|
s:${HORDEDIR}/phplib:${PEARDIR}:g" ${APACHE_CONF} ; \
|
2002-06-26 05:54:09 +02:00
|
|
|
${ECHO_CMD} "# Horde's include directory" >> ${APACHE_CONF} ; \
|
|
|
|
${ECHO_CMD} "Include ${HORDE_INC}" >> ${APACHE_CONF} ; \
|
2001-12-03 03:36:06 +01:00
|
|
|
fi)
|
2003-04-29 05:26:39 +02:00
|
|
|
@${CHOWN} -R www:www ${HORDEDIR}
|
2001-12-12 21:09:16 +01:00
|
|
|
@${CHMOD} -R o-rwx ${CONFDIR}
|
2003-04-29 05:26:39 +02:00
|
|
|
@${TOUCH} ${LOG_FILE}
|
|
|
|
@${CHOWN} www:www ${LOG_FILE}
|
2001-12-03 03:36:06 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2001-12-12 21:09:16 +01:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2001-12-03 03:36:06 +01:00
|
|
|
.for FILE in ${DOCS}
|
2001-12-12 21:09:16 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
|
2001-12-03 03:36:06 +01:00
|
|
|
.endfor
|
2002-06-26 05:54:09 +02:00
|
|
|
@${REINPLACE_CMD} -e "s:/usr/local/apache/htdocs:${PREFIX}/www:g" ${DOCSDIR}/INSTALL
|
|
|
|
@${RM} ${DOCSDIR}/INSTALL.beforeHorde
|
2001-12-12 21:09:16 +01:00
|
|
|
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
|
2001-12-03 03:36:06 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${ECHO}
|
2004-03-16 23:20:32 +01:00
|
|
|
@${SED} -e "s:%%HORDEDIR%%:${HORDEDIR}:g;s:%%APACHE_CONF%%:${APACHE_CONF}:g" \
|
|
|
|
-e "s:%%HORDESBIN%%:${HORDESBIN}:g" ${PKGMESSAGE}
|
2001-12-03 03:36:06 +01:00
|
|
|
@${ECHO}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|