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, 6 months ago) by laffer1
File size: 3594 byte(s)
Log Message:
cpe

File Contents

# User Rev Content
1 laffer1 15462 # $MidnightBSD$
2 laffer1 592
3     PORTNAME= squirrelmail
4 laffer1 11895 PORTVERSION= 1.4.22
5 laffer1 16987 PORTREVISION= 2
6 laffer1 592 CATEGORIES= mail www
7 laffer1 14985 MASTER_SITES= SF/${PORTNAME}/stable/${PORTVERSION}
8     DISTNAME= ${PORTNAME}-webmail-${PORTVERSION}
9 laffer1 592 DIST_SUBDIR= ${PORTNAME}
10    
11     MAINTAINER= ports@MidnightBSD.org
12 laffer1 16798 COMMENT= Webmail system which accesses mail over IMAP
13    
14 laffer1 4794 LICENSE= gpl2
15 laffer1 592
16 laffer1 11360 USE_PHP= session gettext mbstring pcre openssl xml
17 laffer1 592 WANT_PHP_WEB= yes
18    
19 laffer1 16987 USES= gettext tar:bzip2 cpe
20 laffer1 592
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 laffer1 8436 @${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 laffer1 11895 ${WRKSRC}/functions/imap_search.php.orig \
61 laffer1 8436 ${WRKSRC}/src/addrbook_search_html.php.orig \
62     ${WRKSRC}/src/compose.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     @${MV} ${WRKSRC}/themes/README.themes ${WRKSRC}/doc/
74 laffer1 14985 @cd ${WRKSRC} ; for f in `${FIND} plugins -name "README*" -or \
75 laffer1 592 -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 laffer1 14985 @${FIND} ${WRKSRC} -name '*.orig' -delete
86 laffer1 592 @${ECHO} "left_refresh=300" >> ${WRKSRC}/data/default_pref
87 laffer1 8436 @${MV} ${WRKSRC}/config/config_local.php ${WRKSRC}/config/config_local.php.sample
88 laffer1 592
89 laffer1 8436 pre-install:
90     @${ECHO} "Your umask should be lax while installing this. Like, 022 or something."
91     @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
92    
93 laffer1 592 do-install:
94     ${MKDIR} ${PREFIX}/etc/periodic/daily
95     ${INSTALL_SCRIPT} ${FILESDIR}/111.clean-squirrelmail ${PREFIX}/etc/periodic/daily
96     ${MKDIR} ${SQUIRRELDIR}
97 laffer1 14985 ${INSTALL_DATA} ${WRKSRC}/index.php ${SQUIRRELDIR}
98     ${INSTALL_SCRIPT} ${WRKSRC}/configure ${SQUIRRELDIR}
99 laffer1 592 .for DIR in class config data functions help images include locale plugins po src themes
100 laffer1 14985 cd ${WRKSRC} && ${FIND} ${DIR} | ${CPIO} -pdmu --quiet ${SQUIRRELDIR}
101 laffer1 592 .endfor
102     ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${SQUIRRELDIR}/data
103     .if !defined(NOPORTDOCS)
104     ${MKDIR} ${DOCSDIR}
105 laffer1 14985 cd ${WRKSRC}/doc && ${FIND} . | ${CPIO} -pdmu --quiet ${DOCSDIR}
106 laffer1 592 .endif
107    
108     .include <bsd.port.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H