Diff courier-imap-4.18.2 with a courier-imap-5.0.7

/usr/portage/net-mail/courier-imap/courier-imap-5.0.7.ebuild 2021-05-02 16:09:00.000000000 +0300
1 1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5
inherit autotools libtool readme.gentoo-r1 systemd
6 6

  
7 7
DESCRIPTION="An IMAP daemon designed specifically for maildirs"
......
10 10

  
11 11
LICENSE="GPL-3"
12 12
SLOT="0"
13
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
13
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
14 14

  
15 15
IUSE="berkdb debug fam +gdbm gnutls ipv6 selinux trashquota"
16 16
REQUIRED_USE="|| ( berkdb gdbm )"
17 17

  
18 18
CDEPEND="
19
	gnutls? ( net-libs/gnutls )
19
	gnutls? ( net-libs/gnutls[tools] )
20 20
	!gnutls? (
21 21
		dev-libs/openssl:0=
22 22
	)
23 23
	>=net-libs/courier-authlib-0.66.4
24 24
	>=net-libs/courier-unicode-2
25 25
	>=net-mail/mailbase-0.00-r8
26
	net-dns/libidn:=
26 27
	berkdb? ( sys-libs/db:= )
27 28
	fam? ( virtual/fam )
28 29
	gdbm? ( >=sys-libs/gdbm-1.8.0 )
......
57 58

  
58 59
For a quick-start howto please refer to
59 60
${PN}-gentoo.readme in /usr/share/doc/${PF}
61

  
62
Please convert maildir to utf8
63
and rerun mkdhparams if needed. Location has changed
60 64
"
61 65

  
62 66
PATCHES=(
......
97 101
	use debug && myconf="${myconf} debug=true"
98 102

  
99 103
	econf \
104
		--with-notice=unicode \
100 105
		--disable-root-check \
101 106
		--bindir=/usr/sbin \
102 107
		--sysconfdir="/etc/${PN}" \
......
106 111
		--enable-workarounds-for-imap-client-bugs \
107 112
		--with-mailuser=mail \
108 113
		--with-mailgroup=mail \
114
		--with-certsdir="/etc/courier-imap" \
109 115
		$(use_with fam) \
110 116
		$(use_with ipv6) \
111 117
		$(use_with gnutls) \
112 118
		${myconf}
113

  
114
	# Change the pem file location.
115
	sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \
116
		libs/imap/imapd-ssl.dist || \
117
		die "sed failed"
118

  
119
	sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \
120
		libs/imap/pop3d-ssl.dist || \
121
		die "sed failed"
122 119
}
123 120

  
124 121
#src_compile() {
......
195 192
		doinitd "${T}/${initd}"
196 193
	done
197 194

  
198
	systemd_newunit "${FILESDIR}"/courier-authdaemond-r1.service \
195
	cp "${FILESDIR}"/courier-*-r1.service .
196

  
197
	sed -i \
198
		-e "s:/usr/lib/:/usr/$(get_libdir)/:" \
199
		courier-*-r1.service \
200
		|| die
201

  
202
	systemd_newunit courier-authdaemond-r1.service \
199 203
					courier-authdaemond.service
200
	systemd_newunit "${FILESDIR}"/courier-imapd-ssl-r1.service \
204
	systemd_newunit courier-imapd-ssl-r1.service \
201 205
					courier-imapd-ssl.service
202
	systemd_newunit "${FILESDIR}"/courier-imapd-r1.service \
206
	systemd_newunit courier-imapd-r1.service \
203 207
					courier-imapd.service
204 208

  
205 209
	exeinto "/usr/$(get_libdir)/${PN}"
......
228 232
	dodoc libs/rfc2045/*.html
229 233
	docinto tcpd
230 234
	dodoc libs/tcpd/README* libs/tcpd/*.html
235
	exeinto /etc/cron.monthly
236
	newexe "${FILESDIR}"/${PN}.cron ${PN}
231 237
}
232 238

  
233 239
pkg_postinst() {
......
236 242
	fperms 0755 "${ROOT}/usr/$(get_libdir)/${PN}"
237 243

  
238 244
	readme.gentoo_print_elog
245

  
246
	elog ""
247
	elog "Courier Imap now run as user mail:mail."
248
	elog ""
249
	elog "This require you to enable read/write access to the caches:"
250
	elog "/var/lib/courier-imap/courierssl*cache (chown mail:mail)"
251
	elog "and read access to the certificates (e.g. /etc/courier-imap/pop3d.pem )"
239 252
}
Thank you!