Lines 34-44
Link Here
|
34 |
CONFIGURE_ARGS= --localstatedir=/var \ |
34 |
CONFIGURE_ARGS= --localstatedir=/var \ |
35 |
--with-statedir=/var/db/dovecot \ |
35 |
--with-statedir=/var/db/dovecot \ |
36 |
--without-shadow |
36 |
--without-shadow |
37 |
CPPFLAGS+= -I${LOCALBASE}/include |
37 |
|
38 |
LDFLAGS+= -L${LOCALBASE}/lib |
|
|
39 |
USE_LDCONFIG= ${PREFIX}/lib/dovecot |
38 |
USE_LDCONFIG= ${PREFIX}/lib/dovecot |
40 |
|
39 |
|
41 |
USERS= ${PORTNAME} dovenull |
40 |
USERS= dovecot dovenull |
42 |
GROUPS= ${USERS} |
41 |
GROUPS= ${USERS} |
43 |
|
42 |
|
44 |
PROTOCOLS= imap pop3 |
43 |
PROTOCOLS= imap pop3 |
Lines 55-202
Link Here
|
55 |
LUCENE_DESC= CLucene FTS support |
54 |
LUCENE_DESC= CLucene FTS support |
56 |
SOLR_DESC= Solr FTS support |
55 |
SOLR_DESC= Solr FTS support |
57 |
|
56 |
|
58 |
.include <bsd.port.pre.mk> |
57 |
OPTIONS_SUB= yes |
|
|
58 |
DOCS_CONFIGURE_WITH= docs |
59 |
GSSAPI_CONFIGURE_WITH= gssapi |
60 |
GSSAPI_LDFLAGS= -lgssapi_krb5 |
61 |
KQUEUE_CONFIGURE_OFF= --with-ioloop=poll |
62 |
KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue |
63 |
LDAP_CONFIGURE_WITH= ldap |
64 |
LDAP_USE= OPENLDAP=yes |
65 |
LIBWRAP_CONFIGURE_WITH= libwrap |
66 |
LUCENE_CONFIGURE_WITH= lucene |
67 |
LUCENE_LIB_DEPENDS= libclucene-core.so:${PORTSDIR}/textproc/clucene |
68 |
MYSQL_CONFIGURE_WITH= mysql |
69 |
MYSQL_USE= MYSQL=yes |
70 |
PGSQL_CONFIGURE_WITH= pgsql |
71 |
PGSQL_USE= PGSQL=yes |
72 |
SOLR_BUILD_DEPENDS= curl:${PORTSDIR}/ftp/curl |
73 |
SOLR_CONFIGURE_WITH= solr |
74 |
SOLR_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 |
75 |
SQLITE_CONFIGURE_WITH= sqlite |
76 |
SQLITE_USE= SQLITE=3 |
77 |
SSL_CONFIGURE_OFF= --without-ssl |
78 |
SSL_CONFIGURE_ON= --with-ssl=openssl |
79 |
VPOPMAIL_BUILD_DEPENDS= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail |
80 |
VPOPMAIL_CONFIGURE_WITH=vpopmail |
59 |
|
81 |
|
|
|
82 |
.include <bsd.port.options.mk> |
83 |
|
60 |
.if ${ARCH} == "arm" |
84 |
.if ${ARCH} == "arm" |
61 |
BROKEN= Does not build on arm |
85 |
BROKEN= Does not build on arm |
62 |
.endif |
86 |
.endif |
63 |
|
87 |
|
64 |
# sed script for dovecot.conf |
|
|
65 |
REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\ |
66 |
s!/usr/!${PREFIX}/!g;\ |
67 |
s!=/usr!=${PREFIX}!g;\ |
68 |
s!=/etc !=${PREFIX}/etc !g;\ |
69 |
s!/etc/dovecot!${PREFIX}&!g;\ |
70 |
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\ |
71 |
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g; |
72 |
|
73 |
.if ${PORT_OPTIONS:MDOCS} |
74 |
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README |
88 |
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README |
75 |
PORTDOCS= * |
89 |
PORTDOCS= * |
76 |
.else |
|
|
77 |
CONFIGURE_ARGS+= --without-docs |
78 |
.endif |
79 |
|
80 |
PORTEXAMPLES= * |
90 |
PORTEXAMPLES= * |
81 |
|
91 |
|
82 |
## kqueue(2) support |
|
|
83 |
# |
84 |
.if ${PORT_OPTIONS:MKQUEUE} |
85 |
CONFIGURE_ARGS+=--with-ioloop=kqueue |
86 |
.else |
87 |
CONFIGURE_ARGS+=--with-ioloop=poll |
88 |
.endif |
89 |
|
90 |
## SSL support |
91 |
# |
92 |
.if ${PORT_OPTIONS:MSSL} |
92 |
.if ${PORT_OPTIONS:MSSL} |
93 |
PROTOCOLS+= imaps pop3s |
93 |
PROTOCOLS+= imaps pop3s |
94 |
PLIST_SUB+= SSL="" |
|
|
95 |
.else |
96 |
PLIST_SUB+= SSL="@comment " |
97 |
CONFIGURE_ARGS+=--without-ssl |
98 |
.endif |
94 |
.endif |
99 |
|
95 |
|
100 |
## GSSAPI support |
|
|
101 |
# |
102 |
.if ${PORT_OPTIONS:MGSSAPI} |
103 |
CONFIGURE_ARGS+=--with-gssapi |
104 |
LDFLAGS+= -lgssapi_krb5 |
105 |
.else |
106 |
CONFIGURE_ARGS+=--without-gssapi |
107 |
.endif |
108 |
|
109 |
## VPopMail Support |
110 |
# |
111 |
.if ${PORT_OPTIONS:MVPOPMAIL} |
112 |
BUILD_DEPENDS+= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail |
113 |
CONFIGURE_ARGS+=--with-vpopmail |
114 |
.else |
115 |
CONFIGURE_ARGS+=--without-vpopmail |
116 |
.endif |
117 |
|
118 |
## OpenLDAP Support |
119 |
# |
120 |
.if ${PORT_OPTIONS:MLDAP} |
96 |
.if ${PORT_OPTIONS:MLDAP} |
121 |
USE_OPENLDAP= yes |
|
|
122 |
CONFIGURE_ARGS+=--with-ldap |
123 |
PLIST_SUB+= LDAP="" |
124 |
_REQUIRE+= slapd |
97 |
_REQUIRE+= slapd |
125 |
.else |
|
|
126 |
CONFIGURE_ARGS+=--without-ldap |
127 |
PLIST_SUB+= LDAP="@comment " |
128 |
.endif |
98 |
.endif |
129 |
|
99 |
|
130 |
## CLucene FTS support |
|
|
131 |
# |
132 |
.if ${PORT_OPTIONS:MLUCENE} |
133 |
CONFIGURE_ARGS+=--with-lucene |
134 |
LIB_DEPENDS+= libclucene-core.so:${PORTSDIR}/textproc/clucene |
135 |
PLIST_SUB+= LUCENE="" |
136 |
.else |
137 |
PLIST_SUB+= LUCENE="@comment " |
138 |
.endif |
139 |
|
140 |
## PostgreSQL Support |
141 |
# |
142 |
.if ${PORT_OPTIONS:MPGSQL} |
100 |
.if ${PORT_OPTIONS:MPGSQL} |
143 |
USE_PGSQL= yes |
|
|
144 |
CONFIGURE_ARGS+=--with-pgsql |
145 |
PLIST_SUB+= SQL="" |
146 |
_REQUIRE+= postgresql |
101 |
_REQUIRE+= postgresql |
147 |
.else |
|
|
148 |
CONFIGURE_ARGS+=--without-pgsql |
149 |
PLIST_SUB+= SQL="@comment " |
150 |
.endif |
102 |
.endif |
151 |
|
103 |
|
152 |
## MySQL Support |
|
|
153 |
# |
154 |
.if ${PORT_OPTIONS:MMYSQL} |
104 |
.if ${PORT_OPTIONS:MMYSQL} |
155 |
USE_MYSQL= yes |
|
|
156 |
CONFIGURE_ARGS+=--with-mysql |
157 |
PLIST_SUB+= SQL="" |
158 |
_REQUIRE+= mysql |
105 |
_REQUIRE+= mysql |
159 |
.else |
|
|
160 |
CONFIGURE_ARGS+=--without-mysql |
161 |
PLIST_SUB+= SQL="@comment " |
162 |
.endif |
106 |
.endif |
163 |
|
107 |
|
164 |
## SQLite Support |
108 |
SUB_LIST+= REQUIRE="${_REQUIRE}" |
165 |
# |
109 |
SUB_FILES+= pkg-deinstall pkg-message |
166 |
.if ${PORT_OPTIONS:MSQLITE} |
|
|
167 |
USE_SQLITE= 3 |
168 |
CONFIGURE_ARGS+=--with-sqlite |
169 |
PLIST_SUB+= SQL="" |
170 |
.else |
171 |
CONFIGURE_ARGS+=--without-sqlite |
172 |
PLIST_SUB+= SQL="@comment " |
173 |
.endif |
174 |
|
110 |
|
175 |
## SOLR support |
111 |
# sed script for dovecot.conf |
176 |
# |
112 |
REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\ |
177 |
.if ${PORT_OPTIONS:MSOLR} |
113 |
s!/usr/!${PREFIX}/!g;\ |
178 |
CONFIGURE_ARGS+=--with-solr |
114 |
s!=/usr!=${PREFIX}!g;\ |
179 |
BUILD_DEPENDS+= curl:${PORTSDIR}/ftp/curl |
115 |
s!=/etc !=${PREFIX}/etc !g;\ |
180 |
LIB_DEPENDS+= libexpat.so:${PORTSDIR}/textproc/expat2 |
116 |
s!/etc/dovecot!${PREFIX}&!g;\ |
181 |
PLIST_SUB+= SOLR="" |
117 |
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\ |
182 |
.else |
118 |
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g; |
183 |
CONFIGURE_ARGS+=--without-solr |
|
|
184 |
PLIST_SUB+= SOLR="@comment " |
185 |
.endif |
186 |
|
119 |
|
187 |
## libwrap support |
|
|
188 |
# |
189 |
.if ${PORT_OPTIONS:MLIBWRAP} |
190 |
CONFIGURE_ARGS+=--with-libwrap |
191 |
PLIST_SUB+= LIBWRAP="" |
192 |
.else |
193 |
CONFIGURE_ARGS+=--without-libwrap |
194 |
PLIST_SUB+= LIBWRAP="@comment " |
195 |
.endif |
196 |
|
197 |
SUB_LIST= REQUIRE="${_REQUIRE}" |
198 |
SUB_FILES= pkg-deinstall pkg-message |
199 |
|
200 |
post-patch: |
120 |
post-patch: |
201 |
@${REINPLACE_CMD} -E -e '${REINPLACE}' \ |
121 |
@${REINPLACE_CMD} -E -e '${REINPLACE}' \ |
202 |
${WRKSRC}/doc/example-config/dovecot.conf |
122 |
${WRKSRC}/doc/example-config/dovecot.conf |
Lines 207-215
Link Here
|
207 |
|
127 |
|
208 |
post-install: |
128 |
post-install: |
209 |
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} |
129 |
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR} |
210 |
cd ${WRKSRC}/doc && ${INSTALL_SCRIPT} dovecot-openssl.cnf mkcert.sh ${STAGEDIR}${EXAMPLESDIR} |
130 |
(cd ${WRKSRC}/doc && ${INSTALL_SCRIPT} dovecot-openssl.cnf mkcert.sh ${STAGEDIR}${EXAMPLESDIR}) |
211 |
.if ${PORT_OPTIONS:MDOCS} |
131 |
.if ${PORT_OPTIONS:MDOCS} |
212 |
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR} |
132 |
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} |
213 |
.endif |
133 |
.endif |
214 |
|
134 |
|
215 |
.include <bsd.port.post.mk> |
135 |
.include <bsd.port.mk> |