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