Prune sysutils/rubygem-smart_proxy_salt
[dports.git] / www / hastymail2 / Makefile
1 # Created by: Bartlomiej Rutkowski <r@robakdesign.com>
2 # $FreeBSD$
3
4 PORTNAME=       hastymail2
5 PORTVERSION=    1.1
6 PORTREVISION=   5
7 PORTEPOCH=      1
8 CATEGORIES=     www mail
9 MASTER_SITES=   SF/hastymail/Hastymail2%20Stable%20Releases/Hastymail2%201.1/
10 DISTNAME=       hastymail2_${WIKEDVERSION}
11
12 MAINTAINER=     ports@FreeBSD.org
13 COMMENT=        Small, fast and secure yet powerful IMAP webmail
14
15 LICENSE=        GPLv2
16
17 NO_BUILD=       yes
18 SUB_FILES=      pkg-message
19
20 CONFLICTS=      hastymail-* hastymail2-devel-*
21
22 WANT_PHP_WEB=   yes
23 USE_PHP=        ctype pcre session xml
24
25 WIKEDVERSION=   1_1
26 WRKSRC=         ${WRKDIR}/${PORTNAME}_${WIKEDVERSION}
27 NO_BUILD=       yes
28 FIND_SKIP_OPTS= -not -name hastymail2.conf.example -not -name '*.orig'
29 PLIST_SUB=      WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}"
30
31 OPTIONS_DEFINE= PGSQL MYSQL DB ICONV MBSTRING
32
33 DB_DESC=        Use older pear DB (instead of MDB2)
34 MBSTRING_DESC=  Support multi-byte character sets
35
36 .include <bsd.port.options.mk>
37
38 .if ${PORT_OPTIONS:MMYSQL}
39 USE_MYSQL=      yes
40 .if ! ${PORT_OPTIONS:MDB}
41 RUN_DEPENDS+=   ${LOCALBASE}/share/pear/MDB2/Driver/mysql.php:${PORTSDIR}/databases/pear-MDB2_Driver_mysql
42 .endif
43 .endif
44
45 .if ${PORT_OPTIONS:MPGSQL}
46 USES+=  pgsql
47 .if ! ${PORT_OPTIONS:MDB}
48 RUN_DEPENDS+=   ${LOCALBASE}/share/pear/MDB2/Driver/pgsql.php:${PORTSDIR}/databases/pear-MDB2_Driver_pgsql
49 .endif
50 .endif
51
52 .if ${PORT_OPTIONS:MDB} && (${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL})
53 RUN_DEPENDS+=   ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
54 .endif
55
56 .if ${PORT_OPTIONS:MICONV}
57 USE_PHP+=       iconv
58 .endif
59
60 .if ${PORT_OPTIONS:MMBSTRING}
61 USE_PHP+=       mbstring
62 .endif
63
64 post-patch:
65         @${REINPLACE_CMD} -E "s#/etc/hastymail[2]*/hasty[ma][ma]il2.rc#${PREFIX}/etc/hastymail2/hastymail2.rc#" \
66                 ${WRKSRC}/index.php ${WRKSRC}/hastymail2.conf.example
67         @${FIND} ${WRKSRC}/plugins -name config.php | ${XARGS} -I % ${MV} % %.sample
68
69 do-install:
70         @${MKDIR} ${STAGEDIR}${WWWDIR}
71         @cd ${WRKSRC} && ${FIND} . ${FIND_SKIP_OPTS} \
72                 | ${PAX} -rwd ${STAGEDIR}${WWWDIR}
73         @${MKDIR} ${STAGEDIR}${ETCDIR}
74         @${INSTALL_DATA} ${WRKSRC}/hastymail2.conf.example \
75                 ${STAGEDIR}${ETCDIR}/hastymail2.conf.sample
76
77 .include <bsd.port.mk>