aboutsummaryrefslogtreecommitdiffstats
path: root/mail/archiveopteryx-devel/Makefile
blob: a86e0c329b6d81a2e5c1f71237b857b795c20673 (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
# Created by: Ashish SHUKLA <ashish@FreeBSD.org>
# $FreeBSD$

PORTNAME=   archiveopteryx
PORTVERSION=    3.2.99.20160129
PORTREVISION=   3
CATEGORIES= mail
PKGNAMESUFFIX=  -devel

MAINTAINER= feld@FreeBSD.org
COMMENT=    Advanced PostgreSQL-based IMAP/POP server

LICENSE=    MIT

BROKEN_powerpc64=   Does not build

BUILD_DEPENDS=  jam:devel/jam

USE_GITHUB= yes
GH_ACCOUNT= aox
GH_PROJECT= aox
GH_TAGNAME= e10c73a

USES=       perl5 ssl
USE_PERL5=  build
WITH_PGSQL= client

PORTDOCS=   COPYING README license.txt

SUB_FILES=  pkg-message

USE_RC_SUBR=    ${PORTNAME}

CONFLICTS=  archiveopteryx-[0-9]*

USERS=      aox
GROUPS=     aox
PLIST_SUB+= USERS="${USERS}"
PLIST_SUB+= GROUPS="${GROUPS}"

JAM?=       ${LOCALBASE}/bin/jam

.include <bsd.port.pre.mk>

# force Clang when on FreeBSD
.if ${OPSYS} == FreeBSD
JAMARG= "-sCLANG=1"
.endif

post-patch:
    @${EGREP} -Rl '%%[[:alpha:]]+%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
        -e 's,%%PREFIX%%,${PREFIX},g'
    ${REINPLACE_CMD} -e "s|\(C++FLAGS =\)|\1 -I${OPENSSLINC}|g" \
        -e"s|INSTALLROOT ?= \"\" ;|INSTALLROOT = \"${STAGEDIR}\" ;|" \
        ${WRKSRC}/Jamsettings
    ${REINPLACE_CMD} -e "s|\(-lcrypto\)|-L${OPENSSLLIB} \1|g" \
        ${WRKSRC}/server/Jamfile

do-build:
    @cd ${WRKSRC} && ${JAM} ${JAMARG}

do-install:
    @cd ${WRKSRC} && ${JAM} ${JAMARG} install

.include <bsd.port.post.mk>