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