2002-02-10 01:44:59 +01:00
|
|
|
# New ports collection makefile for: squirrelmail
|
|
|
|
# Date created: 27 December 2001
|
|
|
|
# Whom: Simon Dick <simond@irrelevant.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= squirrelmail
|
2005-07-14 17:12:29 +02:00
|
|
|
PORTVERSION?= 1.4.5
|
2003-11-21 03:56:07 +01:00
|
|
|
CATEGORIES?= mail www
|
2002-02-10 01:44:59 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= squirrelmail
|
2005-02-08 16:35:37 +01:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
2005-07-14 17:12:29 +02:00
|
|
|
all_locales-${PORTVERSION}-20050713${EXTRACT_SUFX}
|
2005-02-08 16:35:37 +01:00
|
|
|
DIST_SUBDIR= squirrelmail
|
2002-02-10 01:44:59 +01:00
|
|
|
|
2003-11-21 03:56:07 +01:00
|
|
|
MAINTAINER?= simond@irrelevant.org
|
|
|
|
COMMENT?= A webmail system which accesses mail over IMAP
|
|
|
|
|
|
|
|
CONFLICTS?= ja-squirrelmail-1.*
|
2002-02-10 01:44:59 +01:00
|
|
|
|
2004-11-04 15:53:09 +01:00
|
|
|
USE_PHP= session mhash gettext mbstring pcre openssl xml
|
2004-01-14 15:01:56 +01:00
|
|
|
WANT_PHP_WEB= yes
|
2002-02-10 01:44:59 +01:00
|
|
|
|
|
|
|
USE_BZIP2= yes
|
2004-12-10 22:31:40 +01:00
|
|
|
USE_REINPLACE= yes
|
2004-01-13 10:14:24 +01:00
|
|
|
|
2004-07-22 04:00:11 +02:00
|
|
|
.ifdef WITH_DATABASE
|
|
|
|
WANT_PHP_PEAR= yes
|
2004-12-19 21:37:19 +01:00
|
|
|
RUN_DEPENDS+= ${PREFIX}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
|
2004-07-22 04:00:11 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifdef WITH_LDAP
|
2004-07-23 21:07:58 +02:00
|
|
|
USE_PHP+= ldap
|
2004-07-22 04:00:11 +02:00
|
|
|
.endif
|
|
|
|
|
2004-01-13 10:14:24 +01:00
|
|
|
.ifndef WITHOUT_WWWDIR
|
|
|
|
SQUIRRELDIR?= ${PREFIX}/www/squirrelmail
|
|
|
|
.else
|
|
|
|
SQUIRRELDIR?= ${PREFIX}/squirrelmail
|
|
|
|
.endif
|
|
|
|
|
|
|
|
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
|
|
|
|
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
|
|
|
|
SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}"
|
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_CMD} "SquirrelMail is installed into ${SQUIRRELDIR}"
|
|
|
|
@${ECHO_CMD} "To use the old location ${PREFIX}/squirrelmail define"
|
|
|
|
@${ECHO_CMD} "WITHOUT_WWWDIR when patching or installing"
|
|
|
|
@${ECHO_CMD}
|
2004-07-22 04:00:11 +02:00
|
|
|
@${ECHO_CMD} "Use WITH_LDAP to ensure PHP LDAP support is installed"
|
|
|
|
@${ECHO_CMD} "Use WITH_DATABASE to ensure PEAR framework for database support is installed"
|
2005-02-08 16:35:37 +01:00
|
|
|
@${ECHO_CMD} " (note that this does not install the database specific PEAR support, e.g. MySQL)"
|
2004-07-22 04:00:11 +02:00
|
|
|
@${ECHO_CMD}
|
2004-01-13 10:14:24 +01:00
|
|
|
|
2004-01-13 16:59:50 +01:00
|
|
|
.if !target(slaveport-post-patch)
|
|
|
|
slaveport-post-patch:
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch: slaveport-post-patch
|
2004-01-13 10:14:24 +01:00
|
|
|
.ifndef PATCH_DEBUG
|
2004-01-13 16:59:50 +01:00
|
|
|
@${RM} -f ${WRKSRC}/config/config_default.php.orig
|
2004-01-13 10:14:24 +01:00
|
|
|
.endif
|
|
|
|
@${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \
|
2004-01-13 16:59:50 +01:00
|
|
|
${MASTERDIR}/pkg-install > ${PKGINSTALL}
|
2004-01-13 10:14:24 +01:00
|
|
|
@${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \
|
2004-01-13 16:59:50 +01:00
|
|
|
${MASTERDIR}/pkg-deinstall > ${PKGDEINSTALL}
|
2004-01-13 10:14:24 +01:00
|
|
|
@${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \
|
2004-01-13 16:59:50 +01:00
|
|
|
${MASTERDIR}/pkg-message > ${PKGMESSAGE}
|
2004-12-10 22:31:40 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|ispell|${LOCALBASE}/bin/ispell|g' \
|
|
|
|
${WRKSRC}/plugins/squirrelspell/sqspell_config.php
|
2005-02-08 16:35:37 +01:00
|
|
|
@${RM} ${WRKSRC}/plugins/squirrelspell/sqspell_config.php.bak
|
2004-01-13 10:14:24 +01:00
|
|
|
|
|
|
|
# Rearrange the documentation
|
|
|
|
do-build:
|
|
|
|
.for file in AUTHORS ChangeLog COPYING INSTALL README UPGRADE
|
|
|
|
@${MV} ${WRKSRC}/${file} ${WRKSRC}/doc/
|
|
|
|
.endfor
|
2005-07-14 17:12:29 +02:00
|
|
|
@${MV} ${WRKSRC}/ReleaseNotes ${WRKSRC}/doc/ReleaseNotes-${PORTVERSION}.txt
|
2004-01-13 10:14:24 +01:00
|
|
|
@${MV} ${WRKSRC}/themes/README.themes ${WRKSRC}/doc/
|
|
|
|
@cd ${WRKSRC} ; for f in `find plugins -name "README*" -or \
|
|
|
|
-name INSTALL -or -name CHANGES -or -name HISTORY`; \
|
|
|
|
do \
|
2004-12-19 21:38:22 +01:00
|
|
|
${MKDIR} doc/`dirname $$f` ; \
|
|
|
|
${MV} $$f doc/`dirname $$f` ; \
|
2004-01-13 10:14:24 +01:00
|
|
|
done; \
|
|
|
|
${MV} doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell ; \
|
|
|
|
${RM} -rf doc/plugins/squirrelspell/doc ; \
|
|
|
|
${MV} plugins/squirrelspell/doc/* doc/plugins/squirrelspell ; \
|
|
|
|
${RM} -f doc/plugins/squirrelspell/index.php ; \
|
|
|
|
${RM} -rf plugins/squirrelspell/doc
|
|
|
|
@${ECHO} "left_refresh=300" >> ${WRKSRC}/data/default_pref
|
2005-02-08 16:35:37 +01:00
|
|
|
@${CP} -r ${WRKSRC}/../locale ${WRKSRC}
|
|
|
|
@${CP} -r ${WRKSRC}/../images ${WRKSRC}
|
|
|
|
@${CP} -r ${WRKSRC}/../help ${WRKSRC}
|
2002-02-10 01:44:59 +01:00
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@${ECHO} "Your umask should be lax while installing this. Like, 022 or something."
|
2003-10-19 11:36:08 +02:00
|
|
|
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
2002-02-10 01:44:59 +01:00
|
|
|
|
|
|
|
do-install:
|
2004-01-13 10:14:24 +01:00
|
|
|
${MKDIR} ${PREFIX}/etc/periodic/daily
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/111.clean-squirrelmail ${PREFIX}/etc/periodic/daily
|
|
|
|
${MKDIR} ${SQUIRRELDIR}
|
|
|
|
${CP} -p ${WRKSRC}/index.php ${SQUIRRELDIR}
|
|
|
|
${CP} -p ${WRKSRC}/configure ${SQUIRRELDIR}
|
|
|
|
.for DIR in class config data functions help images include locale plugins po src themes
|
|
|
|
${CP} -rp ${WRKSRC}/${DIR} ${SQUIRRELDIR}
|
|
|
|
.endfor
|
|
|
|
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/data
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
${MKDIR} ${DOCSDIR}
|
|
|
|
${CP} -R ${WRKSRC}/doc/* ${DOCSDIR}
|
|
|
|
.endif
|
2002-02-10 01:44:59 +01:00
|
|
|
|
|
|
|
post-install:
|
2004-01-13 11:47:21 +01:00
|
|
|
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2004-01-13 10:14:24 +01:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2002-02-10 01:44:59 +01:00
|
|
|
|
2004-02-09 12:43:38 +01:00
|
|
|
.include <bsd.port.mk>
|