ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/mail/squirrelmail/Makefile
Revision: 16987
Committed: Fri Sep 12 01:31:05 2014 UTC (9 years, 7 months ago) by laffer1
File size: 3594 byte(s)
Log Message:
cpe

File Contents

# Content
1 # $MidnightBSD$
2
3 PORTNAME= squirrelmail
4 PORTVERSION= 1.4.22
5 PORTREVISION= 2
6 CATEGORIES= mail www
7 MASTER_SITES= SF/${PORTNAME}/stable/${PORTVERSION}
8 DISTNAME= ${PORTNAME}-webmail-${PORTVERSION}
9 DIST_SUBDIR= ${PORTNAME}
10
11 MAINTAINER= ports@MidnightBSD.org
12 COMMENT= Webmail system which accesses mail over IMAP
13
14 LICENSE= gpl2
15
16 USE_PHP= session gettext mbstring pcre openssl xml
17 WANT_PHP_WEB= yes
18
19 USES= gettext tar:bzip2 cpe
20
21 .ifdef WITH_DATABASE
22 RUN_DEPENDS+= ${PREFIX}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
23 .endif
24
25 .ifdef WITH_LDAP
26 USE_PHP+= ldap
27 .endif
28
29 .ifndef WITHOUT_WWWDIR
30 SQUIRRELDIR?= ${PREFIX}/www/${PORTNAME}
31 .else
32 SQUIRRELDIR?= ${PREFIX}/${PORTNAME}
33 .endif
34
35 PLIST_SUB= PORTVERSION=${PORTVERSION} \
36 SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}"
37
38 SUB_FILES= pkg-message pkg-install pkg-deinstall
39 SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR}
40
41 PORTDOCS= *
42
43 pre-everything::
44 @${ECHO_CMD} "SquirrelMail is installed into ${SQUIRRELDIR}"
45 @${ECHO_CMD} "To use the old location ${PREFIX}/${PORTNAME} define"
46 @${ECHO_CMD} "WITHOUT_WWWDIR when patching or installing"
47 @${ECHO_CMD}
48 @${ECHO_CMD} "Use WITH_LDAP to ensure PHP LDAP support is installed"
49 @${ECHO_CMD} "Use WITH_DATABASE to ensure PEAR framework for database support is installed"
50 @${ECHO_CMD} " (note that this does not install the database specific PEAR support, e.g. MySQL)"
51 @${ECHO_CMD}
52
53 post-patch:
54 .ifndef PATCH_DEBUG
55 @${RM} -f \
56 ${WRKSRC}/class/deliver/Deliver.class.php.orig \
57 ${WRKSRC}/config/config_default.php.orig \
58 ${WRKSRC}/functions/global.php.orig \
59 ${WRKSRC}/functions/i18n.php.orig \
60 ${WRKSRC}/functions/imap_search.php.orig \
61 ${WRKSRC}/src/addrbook_search_html.php.orig \
62 ${WRKSRC}/src/compose.php.orig
63 .endif
64 @${REINPLACE_CMD} -e 's|ispell|${LOCALBASE}/bin/ispell|g' \
65 ${WRKSRC}/plugins/squirrelspell/sqspell_config.php
66 @${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
71 # Rearrange the documentation
72 do-build:
73 @${MV} ${WRKSRC}/themes/README.themes ${WRKSRC}/doc/
74 @cd ${WRKSRC} ; for f in `${FIND} plugins -name "README*" -or \
75 -name INSTALL -or -name CHANGES -or -name HISTORY`; \
76 do \
77 ${MKDIR} doc/`dirname $$f` ; \
78 ${MV} $$f doc/`dirname $$f` ; \
79 done; \
80 ${MV} doc/plugins/squirrelspell/doc/README doc/plugins/squirrelspell ; \
81 ${RM} -rf doc/plugins/squirrelspell/doc ; \
82 ${MV} plugins/squirrelspell/doc/* doc/plugins/squirrelspell ; \
83 ${RM} -f doc/plugins/squirrelspell/index.php ; \
84 ${RM} -rf plugins/squirrelspell/doc
85 @${FIND} ${WRKSRC} -name '*.orig' -delete
86 @${ECHO} "left_refresh=300" >> ${WRKSRC}/data/default_pref
87 @${MV} ${WRKSRC}/config/config_local.php ${WRKSRC}/config/config_local.php.sample
88
89 pre-install:
90 @${ECHO} "Your umask should be lax while installing this. Like, 022 or something."
91 @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
92
93 do-install:
94 ${MKDIR} ${PREFIX}/etc/periodic/daily
95 ${INSTALL_SCRIPT} ${FILESDIR}/111.clean-squirrelmail ${PREFIX}/etc/periodic/daily
96 ${MKDIR} ${SQUIRRELDIR}
97 ${INSTALL_DATA} ${WRKSRC}/index.php ${SQUIRRELDIR}
98 ${INSTALL_SCRIPT} ${WRKSRC}/configure ${SQUIRRELDIR}
99 .for DIR in class config data functions help images include locale plugins po src themes
100 cd ${WRKSRC} && ${FIND} ${DIR} | ${CPIO} -pdmu --quiet ${SQUIRRELDIR}
101 .endfor
102 ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/data
103 .if !defined(NOPORTDOCS)
104 ${MKDIR} ${DOCSDIR}
105 cd ${WRKSRC}/doc && ${FIND} . | ${CPIO} -pdmu --quiet ${DOCSDIR}
106 .endif
107
108 .include <bsd.port.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H