Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/dovecot/
Date: Wed, 05 Aug 2020 05:40:40
Message-Id: 1596606026.033d96a9f086d39bca401690ff61a697565d0ec4.eras@gentoo
1 commit: 033d96a9f086d39bca401690ff61a697565d0ec4
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 5 05:40:26 2020 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 5 05:40:26 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=033d96a9
7
8 net-mail/dovecot: remove old
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 net-mail/dovecot/Manifest | 3 -
14 net-mail/dovecot/dovecot-2.3.10.ebuild | 286 --------------------------------
15 net-mail/dovecot/dovecot-2.3.9.3.ebuild | 286 --------------------------------
16 3 files changed, 575 deletions(-)
17
18 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
19 index bdfc9ace470..d69d2605939 100644
20 --- a/net-mail/dovecot/Manifest
21 +++ b/net-mail/dovecot/Manifest
22 @@ -2,8 +2,5 @@ DIST dovecot-2.2-pigeonhole-0.4.24.2.tar.gz 1833284 BLAKE2B bee45fd129aee3d5126b
23 DIST dovecot-2.2.36.4.tar.gz 6257899 BLAKE2B 3260e96f369e85f2dfd5ece0d9b12902c7192d057369e8a151cc6ab7b4f2033d4e1029fb862d412f2837fd384d7fe729cf1ab15cac9ac335e943bb1fdb532b51 SHA512 e33ab2f6c5f7b4ffca3d57580329f1df8e1655c755a1a6b575a4e49d57ea94d1ab67df2419033c9d68acf5959c6edfa596815dc2bc43798e9aef3d17d271cc4d
24 DIST dovecot-2.3-pigeonhole-0.5.10.tar.gz 1899237 BLAKE2B a308500d6a51d4a9b99ae16b75829f1f799351675a31d91e450c4ea1b095d7719af424534f4b7736559b06819a337e7be0bd44307b77a775c8a54359e41822c1 SHA512 f3d380edba4d25d20ee52db21d2965e3a6b229924e9a04fbf45cfe32e1d25448977ee41b12ba41ad8cf8b795f19bb1dbef1d7d09e775598d782123268f61dc8b
25 DIST dovecot-2.3-pigeonhole-0.5.7.2.tar.gz 1857602 BLAKE2B 8de6200bb1ca99d25b48c963c007e9fda07e21f0708d4542e497985a61c07270febd8f29171d607c4025f4651c2ef17d84447a789ebad896c55aa36ec2cd876c SHA512 7fc8d89ee31c8e8c16a9aeaeffb591f4188de36fc80e3a30a9ae10bc5acd7ea5d5d91e077fda566e61d588d9221ec53044ce17a9cc0c9c219dbe6824558a1d60
26 -DIST dovecot-2.3-pigeonhole-0.5.9.tar.gz 1897060 BLAKE2B 73b9abd0a7ea9468f7880fdd0d0471c5825f341c7297807c404ce50a8792f821d2599840ce9eb2705a118a0ee078aafad9f4f6eb64a02fbcb3b0f89c00042ada SHA512 1b8d2ac8d3985dde035fc45df519788a924ba971f3e39717f5196ea56a982d4156226586d0a964473525d086967883ea52f2e624e81f7035cb0952b76f2414d8
27 DIST dovecot-2.3.10.1.tar.gz 7226958 BLAKE2B 2f9223d9184b3f8809b573ebd5637e1fd32885a377d95284bbf6d0d975b61462e351d42c515ca860a2348e39634ff440cb58dc6894008782a0e7d5a4dead4d77 SHA512 5c07436a3e861993f241caa2c60f035c533c5fceb5c8540c1717d31bedd54b82299f7ea11bfee12c72d4d33985d93a7130c4f56877864a7ad21cf7373a29cc06
28 -DIST dovecot-2.3.10.tar.gz 7222241 BLAKE2B 4ffc95c3a52c9287603d19fb91fbc8418d4c37bbc82f30e5026eb5888705a07fc1903b0571d4b4cb1c8ca74bf373acc931129803ca2ad91cb085e92a483a684c SHA512 73e10d7d1e616d6599eb53f2d2d1ac0f0f2e6e84019faac5cd525e833da44839a7e483635b61d432e3254a9e5f6f90915bec8940c584210341085241949dffa2
29 DIST dovecot-2.3.7.2.tar.gz 7076231 BLAKE2B 2cb93aa594db722489063b490469dfe284b1f997b64c9a699b506ccbd04e8e7c2d503ddc12a2598958dfca88560c19487801a728f386b8fea5f637a75b83812e SHA512 172f7f0edb884259e4c050607510aee67a35c3a20b7dd147e7c8a25a04921c18f7d6b5c85af2c69ae8c4d53791550970e471b033dbfae94253e331053b6a317d
30 -DIST dovecot-2.3.9.3.tar.gz 7181682 BLAKE2B 3ef9c50ea2b9d2f8a5d953e373baaf5d880ae4c93dbe773ce267784ded207fb338959a334aa12a449f8d39eb51284318de317d8953a56a0f7f016199769be809 SHA512 e39dc825a03f009928b67d01747bb70487fbec155e6be5109037db67b78301aa761db432f7355e96d927abf30c68f0116a5f2cf518b9eebf7f5c7806ac00ae41
31
32 diff --git a/net-mail/dovecot/dovecot-2.3.10.ebuild b/net-mail/dovecot/dovecot-2.3.10.ebuild
33 deleted file mode 100644
34 index 55d798652c5..00000000000
35 --- a/net-mail/dovecot/dovecot-2.3.10.ebuild
36 +++ /dev/null
37 @@ -1,286 +0,0 @@
38 -# Copyright 1999-2020 Gentoo Authors
39 -# Distributed under the terms of the GNU General Public License v2
40 -
41 -EAPI=7
42 -
43 -# do not add a ssl USE flag. ssl is mandatory
44 -SSL_DEPS_SKIP=1
45 -inherit autotools ssl-cert systemd toolchain-funcs
46 -
47 -MY_P="${P/_/.}"
48 -#MY_S="${PN}-ce-${PV}"
49 -major_minor="$(ver_cut 1-2)"
50 -sieve_version="0.5.10"
51 -if [[ ${PV} == *_rc* ]] ; then
52 - rc_dir="rc/"
53 -else
54 - rc_dir=""
55 -fi
56 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
57 - sieve? (
58 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
59 - )
60 - managesieve? (
61 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
62 - ) "
63 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
64 -HOMEPAGE="https://www.dovecot.org/"
65 -
66 -SLOT="0"
67 -LICENSE="LGPL-2.1 MIT"
68 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
69 -
70 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
71 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
72 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
73 -
74 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
75 -
76 -DEPEND="argon2? ( dev-libs/libsodium )
77 - bzip2? ( app-arch/bzip2 )
78 - caps? ( sys-libs/libcap )
79 - kerberos? ( virtual/krb5 )
80 - ldap? ( net-nds/openldap )
81 - lua? ( dev-lang/lua:* )
82 - lucene? ( >=dev-cpp/clucene-2.3 )
83 - lzma? ( app-arch/xz-utils )
84 - lz4? ( app-arch/lz4 )
85 - mysql? ( dev-db/mysql-connector-c:0= )
86 - pam? ( sys-libs/pam )
87 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
88 - selinux? ( sec-policy/selinux-dovecot )
89 - solr? ( net-misc/curl dev-libs/expat )
90 - sqlite? ( dev-db/sqlite:* )
91 - !libressl? ( dev-libs/openssl:0= )
92 - libressl? ( dev-libs/libressl:0= )
93 - suid? ( acct-group/mail )
94 - tcpd? ( sys-apps/tcp-wrappers )
95 - textcat? ( app-text/libexttextcat )
96 - vpopmail? ( net-mail/vpopmail )
97 - zlib? ( sys-libs/zlib )
98 - virtual/libiconv
99 - dev-libs/icu:="
100 -
101 -RDEPEND="${DEPEND}
102 - acct-group/dovecot
103 - acct-group/dovenull
104 - acct-user/dovecot
105 - acct-user/dovenull
106 - net-mail/mailbase"
107 -
108 -pkg_setup() {
109 - if use managesieve && ! use sieve; then
110 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
111 - ewarn "sieve USE flag will be turned on"
112 - fi
113 -}
114 -
115 -src_prepare() {
116 - default
117 - # bug 657108
118 - elibtoolize
119 - #eautoreconf
120 -}
121 -
122 -src_configure() {
123 - local conf=""
124 -
125 - if use postgres || use mysql || use sqlite; then
126 - conf="${conf} --with-sql"
127 - fi
128 -
129 - # turn valgrind tests off. Bug #340791
130 - VALGRIND=no econf \
131 - --with-rundir="${EPREFIX}/run/dovecot" \
132 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
133 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
134 - --without-stemmer \
135 - --disable-rpath \
136 - --without-libbsd \
137 - --with-icu \
138 - --with-ssl \
139 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
140 - $( use_with argon2 sodium ) \
141 - $( use_with bzip2 bzlib ) \
142 - $( use_with caps libcap ) \
143 - $( use_with kerberos gssapi ) \
144 - $( use_with lua ) \
145 - $( use_with ldap ) \
146 - $( use_with lucene ) \
147 - $( use_with lz4 ) \
148 - $( use_with lzma ) \
149 - $( use_with mysql ) \
150 - $( use_with pam ) \
151 - $( use_with postgres pgsql ) \
152 - $( use_with sqlite ) \
153 - $( use_with solr ) \
154 - $( use_with tcpd libwrap ) \
155 - $( use_with textcat ) \
156 - $( use_with vpopmail ) \
157 - $( use_with zlib ) \
158 - $( use_enable static-libs static ) \
159 - ${conf}
160 -
161 - if use sieve || use managesieve ; then
162 - # The sieve plugin needs this file to be build to determine the plugin
163 - # directory and the list of libraries to link to.
164 - emake dovecot-config
165 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
166 - econf \
167 - $( use_enable static-libs static ) \
168 - --localstatedir="${EPREFIX}/var" \
169 - --enable-shared \
170 - --with-dovecot="${S}" \
171 - $( use_with managesieve )
172 - fi
173 -}
174 -
175 -src_compile() {
176 - default
177 - if use sieve || use managesieve ; then
178 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
179 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
180 - fi
181 -}
182 -
183 -src_test() {
184 - default
185 - if use sieve || use managesieve ; then
186 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
187 - default
188 - fi
189 -}
190 -
191 -src_install() {
192 - default
193 -
194 - # insecure:
195 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
196 - # better:
197 - if use suid;then
198 - einfo "Changing perms to allow deliver to be suided"
199 - fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
200 - fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
201 - fi
202 -
203 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
204 -
205 - rm -rf "${ED}"/usr/share/doc/dovecot
206 -
207 - dodoc AUTHORS NEWS README TODO
208 - dodoc doc/*.{txt,cnf,xml,sh}
209 - docinto example-config
210 - dodoc doc/example-config/*.{conf,ext}
211 - docinto example-config/conf.d
212 - dodoc doc/example-config/conf.d/*.{conf,ext}
213 - docinto wiki
214 - dodoc doc/wiki/*
215 - doman doc/man/*.{1,7}
216 -
217 - # Create the dovecot.conf file from the dovecot-example.conf file that
218 - # the dovecot folks nicely left for us....
219 - local conf="${ED}/etc/dovecot/dovecot.conf"
220 - local confd="${ED}/etc/dovecot/conf.d"
221 -
222 - insinto /etc/dovecot
223 - doins doc/example-config/*.{conf,ext}
224 - insinto /etc/dovecot/conf.d
225 - doins doc/example-config/conf.d/*.{conf,ext}
226 - fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
227 - rm -f "${confd}/../README"
228 -
229 - # .maildir is the Gentoo default
230 - local mail_location="maildir:~/.maildir"
231 - sed -i -e \
232 - "s|#mail_location =|mail_location = ${mail_location}|" \
233 - "${confd}/10-mail.conf" \
234 - || die "failed to update mail location settings in 10-mail.conf"
235 -
236 - # We're using pam files (imap and pop3) provided by mailbase
237 - if use pam; then
238 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
239 - "${confd}/auth-system.conf.ext" \
240 - || die "failed to update PAM settings in auth-system.conf.ext"
241 - # mailbase does not provide a sieve pam file
242 - use managesieve && dosym imap /etc/pam.d/sieve
243 - sed -i -e \
244 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
245 - "${confd}/10-auth.conf" \
246 - || die "failed to update PAM settings in 10-auth.conf"
247 - fi
248 -
249 - # Disable ipv6 if necessary
250 - if ! use ipv6; then
251 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
252 - || die "failed to update listen settings in dovecot.conf"
253 - fi
254 -
255 - # Update ssl cert locations
256 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
257 - || die "ssl conf failed"
258 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
259 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
260 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
261 -
262 - # Install SQL configuration
263 - if use mysql || use postgres; then
264 - sed -i -e \
265 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
266 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
267 - 10-auth.conf"
268 - fi
269 -
270 - # Install LDAP configuration
271 - if use ldap; then
272 - sed -i -e \
273 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
274 - "${confd}/10-auth.conf" \
275 - || die "failed to update ldap settings in 10-auth.conf"
276 - fi
277 -
278 - if use vpopmail; then
279 - sed -i -e \
280 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
281 - "${confd}/10-auth.conf" \
282 - || die "failed to update vpopmail settings in 10-auth.conf"
283 - fi
284 -
285 - if use sieve || use managesieve ; then
286 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
287 - emake DESTDIR="${ED}" install
288 - sed -i -e \
289 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
290 - || die "failed to update sieve settings in 15-lda.conf"
291 - rm -rf "${ED}"/usr/share/doc/dovecot
292 - docinto example-config/conf.d
293 - dodoc doc/example-config/conf.d/*.conf
294 - insinto /etc/dovecot/conf.d
295 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
296 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
297 - docinto sieve/rfc
298 - dodoc doc/rfc/*.txt
299 - docinto sieve/devel
300 - dodoc doc/devel/DESIGN
301 - docinto plugins
302 - dodoc doc/plugins/*.txt
303 - docinto extensions
304 - dodoc doc/extensions/*.txt
305 - docinto locations
306 - dodoc doc/locations/*.txt
307 - doman doc/man/*.{1,7}
308 - fi
309 -
310 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
311 -}
312 -
313 -pkg_postinst() {
314 - # Let's not make a new certificate if we already have one
315 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
316 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
317 - einfo "Creating SSL certificate"
318 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
319 - install_cert /etc/ssl/dovecot/server
320 - fi
321 -
322 - elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes."
323 -}
324
325 diff --git a/net-mail/dovecot/dovecot-2.3.9.3.ebuild b/net-mail/dovecot/dovecot-2.3.9.3.ebuild
326 deleted file mode 100644
327 index a41f1f0e0e9..00000000000
328 --- a/net-mail/dovecot/dovecot-2.3.9.3.ebuild
329 +++ /dev/null
330 @@ -1,286 +0,0 @@
331 -# Copyright 1999-2020 Gentoo Authors
332 -# Distributed under the terms of the GNU General Public License v2
333 -
334 -EAPI=7
335 -
336 -# do not add a ssl USE flag. ssl is mandatory
337 -SSL_DEPS_SKIP=1
338 -inherit autotools ssl-cert systemd toolchain-funcs
339 -
340 -MY_P="${P/_/.}"
341 -#MY_S="${PN}-ce-${PV}"
342 -major_minor="$(ver_cut 1-2)"
343 -sieve_version="0.5.9"
344 -if [[ ${PV} == *_rc* ]] ; then
345 - rc_dir="rc/"
346 -else
347 - rc_dir=""
348 -fi
349 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
350 - sieve? (
351 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
352 - )
353 - managesieve? (
354 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
355 - ) "
356 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
357 -HOMEPAGE="https://www.dovecot.org/"
358 -
359 -SLOT="0"
360 -LICENSE="LGPL-2.1 MIT"
361 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
362 -
363 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
364 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
365 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
366 -
367 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
368 -
369 -DEPEND="argon2? ( dev-libs/libsodium )
370 - bzip2? ( app-arch/bzip2 )
371 - caps? ( sys-libs/libcap )
372 - kerberos? ( virtual/krb5 )
373 - ldap? ( net-nds/openldap )
374 - lua? ( dev-lang/lua:* )
375 - lucene? ( >=dev-cpp/clucene-2.3 )
376 - lzma? ( app-arch/xz-utils )
377 - lz4? ( app-arch/lz4 )
378 - mysql? ( dev-db/mysql-connector-c:0= )
379 - pam? ( sys-libs/pam )
380 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
381 - selinux? ( sec-policy/selinux-dovecot )
382 - solr? ( net-misc/curl dev-libs/expat )
383 - sqlite? ( dev-db/sqlite:* )
384 - !libressl? ( dev-libs/openssl:0= )
385 - libressl? ( dev-libs/libressl:0= )
386 - suid? ( acct-group/mail )
387 - tcpd? ( sys-apps/tcp-wrappers )
388 - textcat? ( app-text/libexttextcat )
389 - vpopmail? ( net-mail/vpopmail )
390 - zlib? ( sys-libs/zlib )
391 - virtual/libiconv
392 - dev-libs/icu:="
393 -
394 -RDEPEND="${DEPEND}
395 - acct-group/dovecot
396 - acct-group/dovenull
397 - acct-user/dovecot
398 - acct-user/dovenull
399 - net-mail/mailbase"
400 -
401 -pkg_setup() {
402 - if use managesieve && ! use sieve; then
403 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
404 - ewarn "sieve USE flag will be turned on"
405 - fi
406 -}
407 -
408 -src_prepare() {
409 - default
410 - # bug 657108
411 - elibtoolize
412 - #eautoreconf
413 -}
414 -
415 -src_configure() {
416 - local conf=""
417 -
418 - if use postgres || use mysql || use sqlite; then
419 - conf="${conf} --with-sql"
420 - fi
421 -
422 - # turn valgrind tests off. Bug #340791
423 - VALGRIND=no econf \
424 - --with-rundir="${EPREFIX}/run/dovecot" \
425 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
426 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
427 - --without-stemmer \
428 - --disable-rpath \
429 - --without-libbsd \
430 - --with-icu \
431 - --with-ssl \
432 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
433 - $( use_with argon2 sodium ) \
434 - $( use_with bzip2 bzlib ) \
435 - $( use_with caps libcap ) \
436 - $( use_with kerberos gssapi ) \
437 - $( use_with lua ) \
438 - $( use_with ldap ) \
439 - $( use_with lucene ) \
440 - $( use_with lz4 ) \
441 - $( use_with lzma ) \
442 - $( use_with mysql ) \
443 - $( use_with pam ) \
444 - $( use_with postgres pgsql ) \
445 - $( use_with sqlite ) \
446 - $( use_with solr ) \
447 - $( use_with tcpd libwrap ) \
448 - $( use_with textcat ) \
449 - $( use_with vpopmail ) \
450 - $( use_with zlib ) \
451 - $( use_enable static-libs static ) \
452 - ${conf}
453 -
454 - if use sieve || use managesieve ; then
455 - # The sieve plugin needs this file to be build to determine the plugin
456 - # directory and the list of libraries to link to.
457 - emake dovecot-config
458 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
459 - econf \
460 - $( use_enable static-libs static ) \
461 - --localstatedir="${EPREFIX}/var" \
462 - --enable-shared \
463 - --with-dovecot="${S}" \
464 - $( use_with managesieve )
465 - fi
466 -}
467 -
468 -src_compile() {
469 - default
470 - if use sieve || use managesieve ; then
471 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
472 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
473 - fi
474 -}
475 -
476 -src_test() {
477 - default
478 - if use sieve || use managesieve ; then
479 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
480 - default
481 - fi
482 -}
483 -
484 -src_install() {
485 - default
486 -
487 - # insecure:
488 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
489 - # better:
490 - if use suid;then
491 - einfo "Changing perms to allow deliver to be suided"
492 - fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
493 - fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
494 - fi
495 -
496 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
497 -
498 - rm -rf "${ED}"/usr/share/doc/dovecot
499 -
500 - dodoc AUTHORS NEWS README TODO
501 - dodoc doc/*.{txt,cnf,xml,sh}
502 - docinto example-config
503 - dodoc doc/example-config/*.{conf,ext}
504 - docinto example-config/conf.d
505 - dodoc doc/example-config/conf.d/*.{conf,ext}
506 - docinto wiki
507 - dodoc doc/wiki/*
508 - doman doc/man/*.{1,7}
509 -
510 - # Create the dovecot.conf file from the dovecot-example.conf file that
511 - # the dovecot folks nicely left for us....
512 - local conf="${ED}/etc/dovecot/dovecot.conf"
513 - local confd="${ED}/etc/dovecot/conf.d"
514 -
515 - insinto /etc/dovecot
516 - doins doc/example-config/*.{conf,ext}
517 - insinto /etc/dovecot/conf.d
518 - doins doc/example-config/conf.d/*.{conf,ext}
519 - fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
520 - rm -f "${confd}/../README"
521 -
522 - # .maildir is the Gentoo default
523 - local mail_location="maildir:~/.maildir"
524 - sed -i -e \
525 - "s|#mail_location =|mail_location = ${mail_location}|" \
526 - "${confd}/10-mail.conf" \
527 - || die "failed to update mail location settings in 10-mail.conf"
528 -
529 - # We're using pam files (imap and pop3) provided by mailbase
530 - if use pam; then
531 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
532 - "${confd}/auth-system.conf.ext" \
533 - || die "failed to update PAM settings in auth-system.conf.ext"
534 - # mailbase does not provide a sieve pam file
535 - use managesieve && dosym imap /etc/pam.d/sieve
536 - sed -i -e \
537 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
538 - "${confd}/10-auth.conf" \
539 - || die "failed to update PAM settings in 10-auth.conf"
540 - fi
541 -
542 - # Disable ipv6 if necessary
543 - if ! use ipv6; then
544 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
545 - || die "failed to update listen settings in dovecot.conf"
546 - fi
547 -
548 - # Update ssl cert locations
549 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
550 - || die "ssl conf failed"
551 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
552 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
553 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
554 -
555 - # Install SQL configuration
556 - if use mysql || use postgres; then
557 - sed -i -e \
558 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
559 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
560 - 10-auth.conf"
561 - fi
562 -
563 - # Install LDAP configuration
564 - if use ldap; then
565 - sed -i -e \
566 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
567 - "${confd}/10-auth.conf" \
568 - || die "failed to update ldap settings in 10-auth.conf"
569 - fi
570 -
571 - if use vpopmail; then
572 - sed -i -e \
573 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
574 - "${confd}/10-auth.conf" \
575 - || die "failed to update vpopmail settings in 10-auth.conf"
576 - fi
577 -
578 - if use sieve || use managesieve ; then
579 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
580 - emake DESTDIR="${ED}" install
581 - sed -i -e \
582 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
583 - || die "failed to update sieve settings in 15-lda.conf"
584 - rm -rf "${ED}"/usr/share/doc/dovecot
585 - docinto example-config/conf.d
586 - dodoc doc/example-config/conf.d/*.conf
587 - insinto /etc/dovecot/conf.d
588 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
589 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
590 - docinto sieve/rfc
591 - dodoc doc/rfc/*.txt
592 - docinto sieve/devel
593 - dodoc doc/devel/DESIGN
594 - docinto plugins
595 - dodoc doc/plugins/*.txt
596 - docinto extensions
597 - dodoc doc/extensions/*.txt
598 - docinto locations
599 - dodoc doc/locations/*.txt
600 - doman doc/man/*.{1,7}
601 - fi
602 -
603 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
604 -}
605 -
606 -pkg_postinst() {
607 - # Let's not make a new certificate if we already have one
608 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
609 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
610 - einfo "Creating SSL certificate"
611 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
612 - install_cert /etc/ssl/dovecot/server
613 - fi
614 -
615 - elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes."
616 -}