aboutsummaryrefslogtreecommitdiffstats
path: root/www/hastymail2-devel/Makefile
blob: 2cc6a3f238e908f834a3d2d529923e6e4d247be3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Created by: Bartlomiej Rutkowski <r@robakdesign.com>
# $FreeBSD$

PORTNAME=   hastymail2
PORTVERSION=    1.1.${HASTYMAIL_REV:S/.//g}
CATEGORIES= www mail
MASTER_SITES=   http://files.bsdroot.lv/my/FreeBSD/distfiles/hastymail2-devel/
PKGNAMESUFFIX=  -devel
DISTNAME=   ${PORTNAME}-devel-${HASTYMAIL_REV}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Small, fast and secure yet powerful IMAP webmail

LICENSE=    GPLv2+
LICENSE_FILE=   ${WRKSRC}/COPYING

BROKEN=     unfetchable

NO_BUILD=   yes
SUB_FILES=  pkg-message

USES=       php:web
USE_PHP=    session imap pcre

WRKSRC=     ${WRKDIR}/${PORTNAME}
FIND_SKIP_OPTS= -not -name hastymail2.conf.example -not -name '*.orig'

CONFLICTS_INSTALL=  hastymail2-[0-9]*

HASTYMAIL_REV=  2011.08.22

PLIST_SUB=  WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}"

OPTIONS_DEFINE= PGSQL MYSQL DB
DB_DESC=    Use older pear DB (instead of MDB2)

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL=  yes
.if ! ${PORT_OPTIONS:MDB}
RUN_DEPENDS+=   ${LOCALBASE}/share/pear/MDB2/Driver/mysql.php:databases/pear-MDB2_Driver_mysql@${PHP_FLAVOR}
.endif
.endif

.if ${PORT_OPTIONS:MPGSQL}
USES+=  pgsql
.if ! ${PORT_OPTIONS:MDB}
RUN_DEPENDS+=   ${LOCALBASE}/share/pear/MDB2/Driver/pgsql.php:databases/pear-MDB2_Driver_pgsql@${PHP_FLAVOR}
.endif
.endif

.if ${PORT_OPTIONS:MDB} && (${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL})
RUN_DEPENDS+=   ${LOCALBASE}/share/pear/DB.php:databases/pear-DB@${PHP_FLAVOR}
.endif

post-patch:
    @${SED} -I.orig -e "s#'/etc/hastymail2/hastymail2.rc'#'${ETCDIR}/hastymail2.rc'#" \
        ${WRKSRC}/index.php
    @${SED} -I.orig -e "s# /etc/hastymail/hastyamil2.rc# ${ETCDIR}/hastyamil2.rc#" \
        ${WRKSRC}/hastymail2.conf.example

do-install:
    @${MKDIR} ${STAGEDIR}${WWWDIR}
    cd ${WRKSRC} && ${FIND} . ${FIND_SKIP_OPTS} \
        | ${PAX} -rwd ${STAGEDIR}${WWWDIR}
    @${MKDIR} ${STAGEDIR}${ETCDIR}
    ${INSTALL_DATA} ${WRKSRC}/hastymail2.conf.example \
        ${STAGEDIR}${ETCDIR}/hastymail2.conf.sample

.include <bsd.port.mk>