1 |
# New ports collection makefile for: squirrelmail |
2 |
# Date created: 27 December 2001 |
3 |
# Whom: Simon Dick <simond@irrelevant.org> |
4 |
# |
5 |
# $FreeBSD: ports/mail/squirrelmail/Makefile,v 1.45 2006/08/11 16:28:19 clsung Exp $ |
6 |
# $MidnightBSD: mports/mail/squirrelmail/Makefile,v 1.7 2008/04/19 18:19:53 laffer1 Exp $ |
7 |
# |
8 |
|
9 |
PORTNAME= squirrelmail |
10 |
PORTVERSION= 1.4.13 |
11 |
PORTREVISION= 1 |
12 |
CATEGORIES= mail www |
13 |
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} |
14 |
MASTER_SITE_SUBDIR= ${PORTNAME} |
15 |
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ |
16 |
all_locales-1.4.13-20071220${EXTRACT_SUFX} |
17 |
DIST_SUBDIR= ${PORTNAME} |
18 |
|
19 |
MAINTAINER= ports@MidnightBSD.org |
20 |
COMMENT= A webmail system which accesses mail over IMAP |
21 |
LICENSE= gpl2 |
22 |
|
23 |
USE_PHP= session mhash gettext mbstring pcre openssl xml |
24 |
WANT_PHP_WEB= yes |
25 |
|
26 |
USE_BZIP2= yes |
27 |
USE_GETTEXT= yes |
28 |
|
29 |
.ifdef WITH_DATABASE |
30 |
RUN_DEPENDS+= ${PREFIX}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB |
31 |
.endif |
32 |
|
33 |
.ifdef WITH_LDAP |
34 |
USE_PHP+= ldap |
35 |
.endif |
36 |
|
37 |
.ifndef WITHOUT_WWWDIR |
38 |
SQUIRRELDIR?= ${PREFIX}/www/${PORTNAME} |
39 |
.else |
40 |
SQUIRRELDIR?= ${PREFIX}/${PORTNAME} |
41 |
.endif |
42 |
|
43 |
PLIST_SUB= PORTVERSION=${PORTVERSION} \ |
44 |
SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}" |
45 |
|
46 |
SUB_FILES= pkg-message pkg-install pkg-deinstall |
47 |
SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR} |
48 |
|
49 |
PORTDOCS= * |
50 |
|
51 |
pre-everything:: |
52 |
@${ECHO_CMD} "SquirrelMail is installed into ${SQUIRRELDIR}" |
53 |
@${ECHO_CMD} "To use the old location ${PREFIX}/${PORTNAME} define" |
54 |
@${ECHO_CMD} "WITHOUT_WWWDIR when patching or installing" |
55 |
@${ECHO_CMD} |
56 |
@${ECHO_CMD} "Use WITH_LDAP to ensure PHP LDAP support is installed" |
57 |
@${ECHO_CMD} "Use WITH_DATABASE to ensure PEAR framework for database support is installed" |
58 |
@${ECHO_CMD} " (note that this does not install the database specific PEAR support, e.g. MySQL)" |
59 |
@${ECHO_CMD} |
60 |
|
61 |
post-patch: |
62 |
.ifndef PATCH_DEBUG |
63 |
@${RM} -f ${WRKSRC}/config/config_default.php.orig ${WRKSRC}/functions/global.php.orig |
64 |
.endif |
65 |
@${REINPLACE_CMD} -e 's|ispell|${LOCALBASE}/bin/ispell|g' \ |
66 |
${WRKSRC}/plugins/squirrelspell/sqspell_config.php |
67 |
@${RM} ${WRKSRC}/plugins/squirrelspell/sqspell_config.php.bak |
68 |
|
69 |
# Rearrange the documentation |
70 |
do-build: |
71 |
.for file in AUTHORS ChangeLog COPYING INSTALL README UPGRADE |
72 |
@${MV} ${WRKSRC}/${file} ${WRKSRC}/doc/ |
73 |
.endfor |
74 |
@${MV} ${WRKSRC}/ReleaseNotes ${WRKSRC}/doc/ReleaseNotes-${PORTVERSION}.txt |
75 |
@${MV} ${WRKSRC}/themes/README.themes ${WRKSRC}/doc/ |
76 |
@cd ${WRKSRC} ; for f in `find plugins -name "README*" -or \ |
77 |
-name INSTALL -or -name CHANGES -or -name HISTORY`; \ |
78 |
do \ |
79 |
${MKDIR} doc/`dirname $$f` ; \ |
80 |
${MV} $$f doc/`dirname $$f` ; \ |
81 |
done; \ |
82 |
${MV} doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell ; \ |
83 |
${RM} -rf doc/plugins/squirrelspell/doc ; \ |
84 |
${MV} plugins/squirrelspell/doc/* doc/plugins/squirrelspell ; \ |
85 |
${RM} -f doc/plugins/squirrelspell/index.php ; \ |
86 |
${RM} -rf plugins/squirrelspell/doc |
87 |
@${ECHO} "left_refresh=300" >> ${WRKSRC}/data/default_pref |
88 |
@${CP} -r ${WRKSRC}/../locale ${WRKSRC} |
89 |
@${CP} -r ${WRKSRC}/../images ${WRKSRC} |
90 |
@${CP} -r ${WRKSRC}/../help ${WRKSRC} |
91 |
|
92 |
do-install: |
93 |
${MKDIR} ${PREFIX}/etc/periodic/daily |
94 |
${INSTALL_SCRIPT} ${FILESDIR}/111.clean-squirrelmail ${PREFIX}/etc/periodic/daily |
95 |
${MKDIR} ${SQUIRRELDIR} |
96 |
@${CP} -pv ${WRKSRC}/index.php ${SQUIRRELDIR} |
97 |
@${CP} -pv ${WRKSRC}/configure ${SQUIRRELDIR} |
98 |
.for DIR in class config data functions help images include locale plugins po src themes |
99 |
@${CP} -rpv ${WRKSRC}/${DIR} ${SQUIRRELDIR} |
100 |
.endfor |
101 |
${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/data |
102 |
.if !defined(NOPORTDOCS) |
103 |
${MKDIR} ${DOCSDIR} |
104 |
@${CP} -Rv ${WRKSRC}/doc/* ${DOCSDIR} |
105 |
.endif |
106 |
|
107 |
|
108 |
.include <bsd.port.mk> |