blob: 80785f53ef7dbff5ffac2ebd911070a558a7f141 (
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# Created by: Nagy, Attila <bra@fsn.hu>
# $FreeBSD$
PORTNAME= dovecot
PORTVERSION= 2.2.13
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/${PORTVERSION:R}/
PKGNAMESUFFIX= 2
MAINTAINER= ports@FreeBSD.org
COMMENT= Secure and compact IMAP and POP3 servers
LICENSE= LGPL21 MIT
LICENSE_COMB= dual
CONFLICTS= dovecot-1.[0-9]*
######################################################################
# Anytime PORTVERSION changes please bump PORTREVISION of #
# mail/dovecot2-pigeonhole and also mail/dovecot2-antispam-plugin. #
# Please see ports/135311 and ports/146029 for an explanation. #
# #
# Please be careful when updating this port as changes to this port #
# can break mail/dovecot2-pigeonhole. In order to ensure the least #
# amount of breakage possible please consult the maintainer of that #
# port before updating this one. #
######################################################################
USES= iconv
USE_RC_SUBR= dovecot
GNU_CONFIGURE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --localstatedir=/var \
--with-statedir=/var/db/dovecot \
--without-shadow
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_LDCONFIG= ${PREFIX}/lib/dovecot
USERS= dovecot dovenull
GROUPS= ${USERS}
PROTOCOLS= imap pop3
# Default requirement for dovecot rc script
_REQUIRE= LOGIN
OPTIONS_DEFINE= KQUEUE SSL GSSAPI VPOPMAIL LDAP LUCENE PGSQL MYSQL SQLITE \
SOLR DOCS EXAMPLES LIBWRAP
OPTIONS_DEFAULT= KQUEUE SSL
KQUEUE_DESC= kqueue(2) support
VPOPMAIL_DESC= vpopmail support
LUCENE_DESC= CLucene FTS support
SOLR_DESC= Solr FTS support
OPTIONS_SUB= yes
DOCS_CONFIGURE_WITH= docs
GSSAPI_CONFIGURE_WITH= gssapi
GSSAPI_LDFLAGS= -lgssapi_krb5
KQUEUE_CONFIGURE_OFF= --with-ioloop=poll
KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue
LDAP_CONFIGURE_WITH= ldap
LDAP_USE= OPENLDAP=yes
LIBWRAP_CONFIGURE_WITH= libwrap
LUCENE_CONFIGURE_WITH= lucene
LUCENE_LIB_DEPENDS= libclucene-core.so:${PORTSDIR}/textproc/clucene
MYSQL_CONFIGURE_WITH= mysql
MYSQL_USE= MYSQL=yes
PGSQL_CONFIGURE_WITH= pgsql
PGSQL_USE= PGSQL=yes
SOLR_BUILD_DEPENDS= curl:${PORTSDIR}/ftp/curl
SOLR_CONFIGURE_WITH= solr
SOLR_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
SQLITE_CONFIGURE_WITH= sqlite
SQLITE_USE= SQLITE=3
SSL_CONFIGURE_OFF= --without-ssl
SSL_CONFIGURE_ON= --with-ssl=openssl
VPOPMAIL_BUILD_DEPENDS= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail
VPOPMAIL_CONFIGURE_WITH=vpopmail
.include <bsd.port.options.mk>
.if ${ARCH} == "arm"
BROKEN= Does not build on arm
.endif
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
PORTDOCS= *
PORTEXAMPLES= *
.if ${PORT_OPTIONS:MSSL}
PROTOCOLS+= imaps pop3s
.endif
.if ${PORT_OPTIONS:MLDAP}
_REQUIRE+= slapd
.endif
.if ${PORT_OPTIONS:MPGSQL}
_REQUIRE+= postgresql
.endif
.if ${PORT_OPTIONS:MMYSQL}
_REQUIRE+= mysql
.endif
SUB_LIST+= REQUIRE="${_REQUIRE}"
SUB_FILES+= pkg-deinstall pkg-message
# sed script for dovecot.conf
REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
s!/usr/!${PREFIX}/!g;\
s!=/usr!=${PREFIX}!g;\
s!=/etc !=${PREFIX}/etc !g;\
s!/etc/dovecot!${PREFIX}&!g;\
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
post-patch:
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
${WRKSRC}/doc/example-config/dovecot.conf
@${REINPLACE_CMD} -E -e'\
s!-example\.conf[[:>:]]!.conf!g;\
s!^(confdir[[:space:]]+=[[:space:]]+)\$$\(sysconfdir\)!\1${EXAMPLESDIR}!g;\
' ${WRKSRC}/*/Makefile.in ${WRKSRC}/Makefile.in
# exclude this file
${REINPLACE_CMD} -e '/2b/d' ${WRKSRC}/doc/wiki/Makefile.in
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/doc && ${INSTALL_SCRIPT} dovecot-openssl.cnf mkcert.sh ${STAGEDIR}${EXAMPLESDIR})
.if ${PORT_OPTIONS:MDOCS}
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/dovecot/lib*.so
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/dovecot/auth/lib*.so
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/dovecot/doveadm/lib*.so
.include <bsd.port.mk>
|