1 |
commit: ce90eb1881c8ba949bf8615802842056434ce897 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 10 11:18:30 2022 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 10 11:18:30 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce90eb18 |
7 |
|
8 |
net-mail/dovecot: add 2.3.19 |
9 |
|
10 |
Signed-off-by: Eray Aslan <eras <AT> gentoo.org> |
11 |
|
12 |
net-mail/dovecot/Manifest | 2 + |
13 |
net-mail/dovecot/dovecot-2.3.19.ebuild | 302 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 304 insertions(+) |
15 |
|
16 |
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest |
17 |
index 7cdaa824a9c7..dd889979b546 100644 |
18 |
--- a/net-mail/dovecot/Manifest |
19 |
+++ b/net-mail/dovecot/Manifest |
20 |
@@ -1,6 +1,8 @@ |
21 |
DIST dovecot-2.3-pigeonhole-0.5.14.tar.gz 1910607 BLAKE2B 5c08214535d298ce2b8defd8c945e96597a98bda6493a3e27481fdadc0e149e6dd01c6ececaa583dd331614669bd8e033cd1b91d64d03a9e0cdcef67fa9c27b8 SHA512 c5d5d309769eabe2c0971646d0c14d166b6b524acf59e1069eca803f764544fa2535c09c9a630ca706aa70442b688ee26af831d29e674823bac7ea7c0e1f33cc |
22 |
DIST dovecot-2.3-pigeonhole-0.5.17.1.tar.gz 1952704 BLAKE2B 7dfc6b5bdb82bcaa60e0f41722f9a884edee7853ce09c9391d4c610be16728f58cc7095b8dd2d47e89296ff36aa926c687b39a418bc74ca0bfc3c4eab98156df SHA512 632a963d90a3fa052f314360d59ff25274d80952307ab5dd9193a2713ebf686500a7b2559b56f04b07e0a261066eed9b8525b14197f3be51728af09acb76e894 |
23 |
DIST dovecot-2.3-pigeonhole-0.5.18.tar.gz 1953892 BLAKE2B 478da07a2f507a3322c6b6035f8cb74a720c030cc9413496f90a793d165178617207e26b0b57f710a9b9c7671be3fffdbaccaacb8747198abf82943dcb4a24df SHA512 44c3d945a5aebb8935e6e46751e44f505f2abd529c31e3efb689d3b5b9cdf9bca4f5231fc42a8d19837cb95c7618f5b64dfdf5964f40a0a6987144a37cdbaaec |
24 |
+DIST dovecot-2.3-pigeonhole-0.5.19.tar.gz 1954148 BLAKE2B 0c52293f9447260f3e95f31c5ea3c04a1971b1a5621b56be1c79a8575aceb4f7e7fef62e7d0a3d980dcb5b8e1a8eeec543adcf0b016b65eb34ca4a26e8d2fe23 SHA512 5b0a61c7711232ea3651b818a970b500b05bd340a04bcd5a5f0ea0529eda65f498912a845c8f3b3b80196d010bc22bd4a380e1f682cb42f62b80d2d43a94993a |
25 |
DIST dovecot-2.3.14.1.tar.gz 7534719 BLAKE2B 1ba5143711fe340b9fad61db41ba658485e42be52f3b0f196eeb9b8e4b7c1b865b6a08f879dadeb2db3979b17be34699ce5febc4545887307f62bd5b72076f86 SHA512 b71b82c2918ac9940ef6bc274bc9c2b3e56a08cf5054244d80547ad89c421b9180c5afa8b5b140831239fbe2cbeeceb83a0052e037eb198d8fc27d07cba4ba35 |
26 |
DIST dovecot-2.3.17.1.tar.gz 7700848 BLAKE2B adf12c84def899795d8446766b5c88fd5c68a5969a1807b4dd9c2e4894ddc0693a771ce4d4c0c72b0b03501903c39c650eace97b6708114b7fe038b62ea2ecce SHA512 976aa4f68e86f401e5766017e1702740d5b03892aff98f31f9ef0c6d242311d0f4b50d7faa426306bf1c902d7fc6d021438977bc887fa66ee360b069ec32ad79 |
27 |
DIST dovecot-2.3.18.tar.gz 7763230 BLAKE2B ff3e0c2cad87d2e2632345a25825eebd0a6c1520376d85286453bde7505f22410d03911cd588a0d102b75f22cc1de051b01c43a57c90138340186e8cb024247a SHA512 b5eccf790a3960614876f122efb6296fe49ab7c523b08c10347fd4d10ed293fbd327279511c227b420f7c0786975186157eaa0fb5cd3aab1f3be9a4c5c3ad233 |
28 |
+DIST dovecot-2.3.19.tar.gz 7790661 BLAKE2B 060364dc83a5fcb7ee7a5a77467aedb79de13e65c5abfb1a9c1e76c7fac4b5b1ad07157917d095631ea72b194efdde38829d4c7274ced65dca7b457c0cc4bb13 SHA512 a61ce88b53c4f24faddf4951f16cb75dfe52aa7057d072c727566a7c9a683cc487d26cea9a83ad8aca161a053949d2f2196ba6a58015e3d33be897094aabf887 |
29 |
|
30 |
diff --git a/net-mail/dovecot/dovecot-2.3.19.ebuild b/net-mail/dovecot/dovecot-2.3.19.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..1fa7a3cfb45f |
33 |
--- /dev/null |
34 |
+++ b/net-mail/dovecot/dovecot-2.3.19.ebuild |
35 |
@@ -0,0 +1,302 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
40 |
+ |
41 |
+LUA_COMPAT=( lua5-1 lua5-3 ) |
42 |
+# do not add a ssl USE flag. ssl is mandatory |
43 |
+SSL_DEPS_SKIP=1 |
44 |
+inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs |
45 |
+ |
46 |
+MY_P="${P/_/.}" |
47 |
+#MY_S="${PN}-ce-${PV}" |
48 |
+major_minor="$(ver_cut 1-2)" |
49 |
+sieve_version="0.5.19" |
50 |
+if [[ ${PV} == *_rc* ]]; then |
51 |
+ rc_dir="rc/" |
52 |
+else |
53 |
+ rc_dir="" |
54 |
+fi |
55 |
+SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
56 |
+ sieve? ( |
57 |
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
58 |
+ ) |
59 |
+ managesieve? ( |
60 |
+ https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
61 |
+ ) " |
62 |
+DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
63 |
+HOMEPAGE="https://www.dovecot.org/" |
64 |
+ |
65 |
+SLOT="0" |
66 |
+LICENSE="LGPL-2.1 MIT" |
67 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
68 |
+ |
69 |
+IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite" |
70 |
+IUSE_DOVECOT_COMPRESS="lz4 zstd" |
71 |
+IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 lucene managesieve rpc |
72 |
+ selinux sieve solr static-libs stemmer suid systemd tcpd textcat unwind" |
73 |
+ |
74 |
+IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
75 |
+ |
76 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
77 |
+ |
78 |
+DEPEND=" |
79 |
+ app-arch/bzip2 |
80 |
+ app-arch/xz-utils |
81 |
+ dev-libs/icu:= |
82 |
+ dev-libs/openssl:0= |
83 |
+ sys-libs/zlib:= |
84 |
+ virtual/libiconv |
85 |
+ argon2? ( dev-libs/libsodium:= ) |
86 |
+ caps? ( sys-libs/libcap ) |
87 |
+ kerberos? ( virtual/krb5 ) |
88 |
+ ldap? ( net-nds/openldap:= ) |
89 |
+ lua? ( ${LUA_DEPS} ) |
90 |
+ lucene? ( >=dev-cpp/clucene-2.3 ) |
91 |
+ lz4? ( app-arch/lz4 ) |
92 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
93 |
+ pam? ( sys-libs/pam:= ) |
94 |
+ postgres? ( dev-db/postgresql:* ) |
95 |
+ rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto ) |
96 |
+ selinux? ( sec-policy/selinux-dovecot ) |
97 |
+ solr? ( net-misc/curl dev-libs/expat ) |
98 |
+ sqlite? ( dev-db/sqlite:* ) |
99 |
+ stemmer? ( dev-libs/snowball-stemmer:= ) |
100 |
+ suid? ( acct-group/mail ) |
101 |
+ systemd? ( sys-apps/systemd:= ) |
102 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
103 |
+ textcat? ( app-text/libexttextcat ) |
104 |
+ unwind? ( sys-libs/libunwind:= ) |
105 |
+ zstd? ( app-arch/zstd:= ) |
106 |
+ virtual/libcrypt:= |
107 |
+ " |
108 |
+ |
109 |
+RDEPEND=" |
110 |
+ ${DEPEND} |
111 |
+ acct-group/dovecot |
112 |
+ acct-group/dovenull |
113 |
+ acct-user/dovecot |
114 |
+ acct-user/dovenull |
115 |
+ net-mail/mailbase |
116 |
+ " |
117 |
+ |
118 |
+S="${WORKDIR}/${MY_P}" |
119 |
+ |
120 |
+PATCHES=( |
121 |
+ "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch |
122 |
+ "${FILESDIR}/${PN}"-socket-name-too-long.patch |
123 |
+) |
124 |
+ |
125 |
+pkg_setup() { |
126 |
+ use lua && lua-single_pkg_setup |
127 |
+ if use managesieve && ! use sieve; then |
128 |
+ ewarn "managesieve USE flag selected but sieve USE flag unselected" |
129 |
+ ewarn "sieve USE flag will be turned on" |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+src_prepare() { |
134 |
+ default |
135 |
+ # bug 657108 |
136 |
+ #elibtoolize |
137 |
+ eautoreconf |
138 |
+ |
139 |
+ # Bug #727244 |
140 |
+ append-cflags -fasynchronous-unwind-tables |
141 |
+} |
142 |
+ |
143 |
+src_configure() { |
144 |
+ local conf="" |
145 |
+ |
146 |
+ if use postgres || use mysql || use sqlite; then |
147 |
+ conf="${conf} --with-sql" |
148 |
+ fi |
149 |
+ |
150 |
+ # turn valgrind tests off. Bug #340791 |
151 |
+ VALGRIND=no \ |
152 |
+ LUAPC="${ELUA}" \ |
153 |
+ systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
154 |
+ econf \ |
155 |
+ --with-rundir="${EPREFIX}/run/dovecot" \ |
156 |
+ --with-statedir="${EPREFIX}/var/lib/dovecot" \ |
157 |
+ --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
158 |
+ --disable-rpath \ |
159 |
+ --with-bzlib \ |
160 |
+ --without-libbsd \ |
161 |
+ --with-lzma \ |
162 |
+ --with-icu \ |
163 |
+ --with-ssl \ |
164 |
+ --with-zlib \ |
165 |
+ $( use_with argon2 sodium ) \ |
166 |
+ $( use_with caps libcap ) \ |
167 |
+ $( use_with kerberos gssapi ) \ |
168 |
+ $( use_with lua ) \ |
169 |
+ $( use_with ldap ) \ |
170 |
+ $( use_with lucene ) \ |
171 |
+ $( use_with lz4 ) \ |
172 |
+ $( use_with mysql ) \ |
173 |
+ $( use_with pam ) \ |
174 |
+ $( use_with postgres pgsql ) \ |
175 |
+ $( use_with sqlite ) \ |
176 |
+ $( use_with solr ) \ |
177 |
+ $( use_with stemmer ) \ |
178 |
+ $( use_with systemd ) \ |
179 |
+ $( use_with tcpd libwrap ) \ |
180 |
+ $( use_with textcat ) \ |
181 |
+ $( use_with unwind libunwind ) \ |
182 |
+ $( use_with zstd ) \ |
183 |
+ $( use_enable static-libs static ) \ |
184 |
+ ${conf} |
185 |
+ |
186 |
+ if use sieve || use managesieve; then |
187 |
+ # The sieve plugin needs this file to be build to determine the plugin |
188 |
+ # directory and the list of libraries to link to. |
189 |
+ emake dovecot-config |
190 |
+ cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
191 |
+ econf \ |
192 |
+ $( use_enable static-libs static ) \ |
193 |
+ --localstatedir="${EPREFIX}/var" \ |
194 |
+ --enable-shared \ |
195 |
+ --with-dovecot="${S}" \ |
196 |
+ $( use_with ldap ) \ |
197 |
+ $( use_with managesieve ) |
198 |
+ fi |
199 |
+} |
200 |
+ |
201 |
+src_compile() { |
202 |
+ default |
203 |
+ if use sieve || use managesieve; then |
204 |
+ cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
205 |
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
206 |
+ fi |
207 |
+} |
208 |
+ |
209 |
+src_test() { |
210 |
+ default |
211 |
+ if use sieve || use managesieve; then |
212 |
+ cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
213 |
+ default |
214 |
+ fi |
215 |
+} |
216 |
+ |
217 |
+src_install() { |
218 |
+ default |
219 |
+ |
220 |
+ if use suid; then |
221 |
+ einfo "Changing perms to allow deliver to be suided" |
222 |
+ fowners root:mail "/usr/libexec/dovecot/dovecot-lda" |
223 |
+ fperms 4750 "/usr/libexec/dovecot/dovecot-lda" |
224 |
+ fi |
225 |
+ |
226 |
+ newinitd "${FILESDIR}"/dovecot.init-r6 dovecot |
227 |
+ |
228 |
+ rm -rf "${ED}"/usr/share/doc/dovecot |
229 |
+ |
230 |
+ dodoc AUTHORS NEWS README TODO |
231 |
+ dodoc doc/*.{txt,cnf,xml,sh} |
232 |
+ docinto example-config |
233 |
+ dodoc doc/example-config/*.{conf,ext} |
234 |
+ docinto example-config/conf.d |
235 |
+ dodoc doc/example-config/conf.d/*.{conf,ext} |
236 |
+ docinto wiki |
237 |
+ dodoc doc/wiki/* |
238 |
+ doman doc/man/*.{1,7} |
239 |
+ |
240 |
+ # Create the dovecot.conf file from the dovecot-example.conf file that |
241 |
+ # the dovecot folks nicely left for us.... |
242 |
+ local conf="${ED}/etc/dovecot/dovecot.conf" |
243 |
+ local confd="${ED}/etc/dovecot/conf.d" |
244 |
+ |
245 |
+ insinto /etc/dovecot |
246 |
+ doins doc/example-config/*.{conf,ext} |
247 |
+ insinto /etc/dovecot/conf.d |
248 |
+ doins doc/example-config/conf.d/*.{conf,ext} |
249 |
+ fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext |
250 |
+ rm -f "${confd}/../README" |
251 |
+ |
252 |
+ # .maildir is the Gentoo default |
253 |
+ local mail_location="maildir:~/.maildir" |
254 |
+ sed -i -e \ |
255 |
+ "s|#mail_location =|mail_location = ${mail_location}|" \ |
256 |
+ "${confd}/10-mail.conf" \ |
257 |
+ || die "failed to update mail location settings in 10-mail.conf" |
258 |
+ |
259 |
+ # We're using pam files (imap and pop3) provided by mailbase |
260 |
+ if use pam; then |
261 |
+ sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
262 |
+ "${confd}/auth-system.conf.ext" \ |
263 |
+ || die "failed to update PAM settings in auth-system.conf.ext" |
264 |
+ # mailbase does not provide a sieve pam file |
265 |
+ use managesieve && dosym imap /etc/pam.d/sieve |
266 |
+ sed -i -e \ |
267 |
+ 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
268 |
+ "${confd}/10-auth.conf" \ |
269 |
+ || die "failed to update PAM settings in 10-auth.conf" |
270 |
+ fi |
271 |
+ |
272 |
+ # Disable ipv6 if necessary |
273 |
+ if ! use ipv6; then |
274 |
+ sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
275 |
+ || die "failed to update listen settings in dovecot.conf" |
276 |
+ fi |
277 |
+ |
278 |
+ # Update ssl cert locations |
279 |
+ sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
280 |
+ || die "ssl conf failed" |
281 |
+ sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
282 |
+ -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
283 |
+ "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
284 |
+ |
285 |
+ # Install SQL configuration |
286 |
+ if use mysql || use postgres; then |
287 |
+ sed -i -e \ |
288 |
+ 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
289 |
+ "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
290 |
+ 10-auth.conf" |
291 |
+ fi |
292 |
+ |
293 |
+ # Install LDAP configuration |
294 |
+ if use ldap; then |
295 |
+ sed -i -e \ |
296 |
+ 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
297 |
+ "${confd}/10-auth.conf" \ |
298 |
+ || die "failed to update ldap settings in 10-auth.conf" |
299 |
+ fi |
300 |
+ |
301 |
+ if use sieve || use managesieve; then |
302 |
+ cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
303 |
+ emake DESTDIR="${ED}" install |
304 |
+ sed -i -e \ |
305 |
+ 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
306 |
+ || die "failed to update sieve settings in 15-lda.conf" |
307 |
+ rm -rf "${ED}"/usr/share/doc/dovecot |
308 |
+ docinto example-config/conf.d |
309 |
+ dodoc doc/example-config/conf.d/*.conf |
310 |
+ insinto /etc/dovecot/conf.d |
311 |
+ doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
312 |
+ use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
313 |
+ docinto sieve/rfc |
314 |
+ dodoc doc/rfc/*.txt |
315 |
+ docinto sieve/devel |
316 |
+ dodoc doc/devel/DESIGN |
317 |
+ docinto plugins |
318 |
+ dodoc doc/plugins/*.txt |
319 |
+ docinto extensions |
320 |
+ dodoc doc/extensions/*.txt |
321 |
+ docinto locations |
322 |
+ dodoc doc/locations/*.txt |
323 |
+ doman doc/man/*.{1,7} |
324 |
+ fi |
325 |
+ |
326 |
+ use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
327 |
+} |
328 |
+ |
329 |
+pkg_postinst() { |
330 |
+ # Let's not make a new certificate if we already have one |
331 |
+ if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
332 |
+ -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
333 |
+ einfo "Creating SSL certificate" |
334 |
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
335 |
+ install_cert /etc/ssl/dovecot/server |
336 |
+ fi |
337 |
+} |