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