Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/cyrus-imapd/
Date: Wed, 23 Feb 2022 02:52:33
Message-Id: 1645584364.244251d4b188d393047aebefc6826758fe793e47.sam@gentoo
1 commit: 244251d4b188d393047aebefc6826758fe793e47
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 23 02:46:04 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 23 02:46:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=244251d4
7
8 net-mail/cyrus-imapd: add 3.4.3
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-mail/cyrus-imapd/Manifest | 1 +
13 net-mail/cyrus-imapd/cyrus-imapd-3.4.3.ebuild | 226 ++++++++++++++++++++++++++
14 2 files changed, 227 insertions(+)
15
16 diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest
17 index cb3a88782ed5..44417b447816 100644
18 --- a/net-mail/cyrus-imapd/Manifest
19 +++ b/net-mail/cyrus-imapd/Manifest
20 @@ -4,3 +4,4 @@ DIST cyrus-imapd-3.0.15.tar.gz 10843341 BLAKE2B efe65c7afc7d63770adef9e4ea13b87e
21 DIST cyrus-imapd-3.0.16.tar.gz 10875516 BLAKE2B 10915418b4de3f460a20d3808274f9ea83bdadc9a9edf2b383081605f7510a3e1563fa009e1dcc203f1c008f26e9db3ffd80f101f546de1dc8c3e714efc13596 SHA512 c17dd940102989d1e329ad8a1c08655bdd8b349ecb08e661f55ab8e602516ece1a86e52313e8cd5677048470f15f4272fcb598e4bbc61d27e5a673c01cb81ca3
22 DIST cyrus-imapd-3.0.17.tar.gz 11445224 BLAKE2B bf2cd85f878c1b4198be5ce96cf6a4ae1e4fcc765b0c7fe60a6bfd04dd066c0420f86508cbfc1030831b57c2732715440cbf0e327f5147b074fe12926dcda85f SHA512 75519bf8a2ae4a8ff844338bee641d519eaf3419fb81b819dc7a42e5956ef57569e47a0e094ccb9726a9c43f0469cd3def6c62783565b2a2aaa863bda354a7da
23 DIST cyrus-imapd-3.4.2.tar.gz 12603768 BLAKE2B 515c36fc3d6a29991283d47a3e523d87a68c3191b4aae85074f40b2416fe3a89793f1991dc5729912a3d56247f6fbf4aed52abcadbc37ca7cc9bf857a8641871 SHA512 4d7d14e222bc1e97b2d8188804139c4c477de66cb621caba475b57533739ee59d88504d4f47735bb6a6b3c9097dbec382ecfa2c678f978791b9a6956a3cd91d6
24 +DIST cyrus-imapd-3.4.3.tar.gz 13182110 BLAKE2B 485df8e2518a55a3b096d0c330d55f7ed93209ca4ab5851dda53083082e203ad9b1d9218c0863a9bd1e678a732427ef499ff78bacf2d3fb2fe18464186a9e6d2 SHA512 5c4db2a0c26d2323332c1ba67f7b207acfad15f0442f20c6c8a205b5423498465524398315946213c8168bc7eba1fd9f7dc573a91efac6708bfbaf2cb57e9276
25
26 diff --git a/net-mail/cyrus-imapd/cyrus-imapd-3.4.3.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-3.4.3.ebuild
27 new file mode 100644
28 index 000000000000..5bcd06cfed19
29 --- /dev/null
30 +++ b/net-mail/cyrus-imapd/cyrus-imapd-3.4.3.ebuild
31 @@ -0,0 +1,226 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +inherit autotools flag-o-matic pam ssl-cert
38 +
39 +DESCRIPTION="The Cyrus IMAP Server"
40 +HOMEPAGE="https://www.cyrusimap.org/"
41 +SRC_URI="https://github.com/cyrusimap/${PN}/releases/download/${P}/${P}.tar.gz"
42 +
43 +LICENSE="BSD-with-attribution GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
46 +IUSE="afs backup calalarm caps clamav http kerberos ldap \
47 + mysql nntp pam perl postgres replication +server sieve \
48 + sqlite ssl static-libs tcpd test xapian"
49 +RESTRICT="!test? ( test )"
50 +
51 +CDEPEND="
52 + sys-libs/zlib:=
53 + dev-libs/libpcre:3
54 + >=dev-libs/cyrus-sasl-2.1.13:2
55 + dev-libs/jansson:=
56 + dev-libs/icu:=
57 + sys-fs/e2fsprogs
58 + afs? ( net-fs/openafs )
59 + calalarm? ( dev-libs/libical:= )
60 + caps? ( sys-libs/libcap )
61 + clamav? ( app-antivirus/clamav )
62 + http? (
63 + dev-libs/libxml2:2
64 + dev-libs/libical:=
65 + net-libs/nghttp2
66 + )
67 + kerberos? ( virtual/krb5 )
68 + ldap? ( net-nds/openldap )
69 + mysql? ( dev-db/mysql-connector-c:= )
70 + nntp? ( !net-nntp/leafnode )
71 + pam? (
72 + >=net-mail/mailbase-1
73 + sys-libs/pam
74 + )
75 + perl? ( dev-lang/perl:= )
76 + postgres? ( dev-db/postgresql:* )
77 + ssl? ( >=dev-libs/openssl-1.0.1e:=[-bindist(-)] )
78 + sqlite? ( dev-db/sqlite:3 )
79 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
80 + xapian? ( >=dev-libs/xapian-1.4.0:= )"
81 +DEPEND="${CDEPEND}
82 + test? ( dev-util/cunit )"
83 +
84 +# all blockers really needed?
85 +# file collision with app-arch/dump - bug 619584
86 +RDEPEND="${CDEPEND}
87 + acct-group/mail
88 + acct-user/cyrus
89 + !mail-mta/courier
90 + !net-mail/bincimap
91 + !net-mail/courier-imap
92 + !net-mail/uw-imap
93 + !app-arch/dump"
94 +
95 +REQUIRED_USE="afs? ( kerberos )
96 + backup? ( sqlite )
97 + calalarm? ( http )
98 + http? ( sqlite )"
99 +
100 +# https://bugs.gentoo.org/678754
101 +# TODO: check underlinking for other libraries
102 +#PATCHES=(
103 +# "${FILESDIR}/cyrus-imapd-libcap-libs-r1.patch"
104 +#)
105 +
106 +src_prepare() {
107 + default
108 +
109 + # Fix master(8)->cyrusmaster(8) manpage.
110 + for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
111 + sed -i -e 's:master\.8:cyrusmaster.8:g' \
112 + -e 's:master(8):cyrusmaster(8):g' \
113 + "${i}" || die "sed failed" || die "sed failed"
114 + done
115 + mv man/master.8 man/cyrusmaster.8 || die "mv failed"
116 + sed -i -e "s:MASTER:CYRUSMASTER:g" \
117 + -e "s:Master:Cyrusmaster:g" \
118 + -e "s:master:cyrusmaster:g" \
119 + man/cyrusmaster.8 || die "sed failed"
120 +
121 + # lock.h to afs/lock.h
122 + sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \
123 + ptclient/afskrb.c || die
124 +
125 + eautoreconf
126 +}
127 +
128 +src_configure() {
129 + local myconf
130 +
131 + # bug #604466
132 + append-ldflags $(no-as-needed)
133 +
134 + if use afs ; then
135 + myconf+=" --with-afs-libdir=/usr/$(get_libdir)"
136 + myconf+=" --with-afs-incdir=/usr/include/afs"
137 + fi
138 +
139 + # TODO:
140 + # - revisit --with-sphinx-build=no? (it's docs this time, not the search engine)
141 + # - post-emerge message re lmdb removal?
142 + econf \
143 + --enable-murder \
144 + --enable-idled \
145 + --enable-autocreate \
146 + --enable-pcre \
147 + --with-com_err \
148 + --with-cyrus-user=cyrus \
149 + --with-sasl \
150 + --with-sphinx-build=no \
151 + --without-krb \
152 + --without-krbdes \
153 + --enable-squat \
154 + --with-zlib \
155 + $(use_enable afs) \
156 + $(use_enable afs krb5afspts) \
157 + $(use_enable backup) \
158 + $(use_enable calalarm calalarmd) \
159 + $(use_with caps libcap) \
160 + $(use_with clamav) \
161 + $(use_enable nntp) \
162 + $(use_enable http) \
163 + $(use_with http nghttp2) \
164 + $(use_enable replication) \
165 + $(use_enable kerberos gssapi) \
166 + $(use_with ldap) \
167 + $(use_with mysql) \
168 + $(use_with postgres pgsql) \
169 + $(use_with perl) \
170 + $(use_with sqlite) \
171 + $(use_with ssl openssl) \
172 + $(use_enable server) \
173 + $(use_enable sieve) \
174 + $(use_enable static-libs static) \
175 + $(use_with tcpd libwrap) \
176 + $(use_enable xapian) \
177 + $(use_enable test unit-tests) \
178 + ${myconf}
179 +}
180 +
181 +src_install() {
182 + emake DESTDIR="${D}" INSTALLDIRS=vendor install
183 +
184 + dodoc README*
185 + dodoc -r doc
186 +
187 + cp -r contrib tools "${ED}"/usr/share/doc/${PF} || die
188 + rm -f doc/text/Makefile* || die
189 +
190 + mv "${ED}"/usr/libexec/{master,cyrusmaster} || die
191 +
192 + insinto /etc
193 + newins "${ED}"/usr/share/doc/${PF}/doc/examples/cyrus_conf/normal.conf cyrus.conf
194 + newins "${ED}"/usr/share/doc/${PF}/doc/examples/imapd_conf/normal.conf imapd.conf
195 +
196 + sed -i -e '/^configdirectory/s|/var/.*|/var/imap|' \
197 + -e '/^partition-default/s|/var/.*|/var/spool/imap|' \
198 + -e '/^sievedir/s|/var/.*|/var/imap/sieve|' \
199 + "${ED}"/etc/imapd.conf || die
200 +
201 + sed -i -e 's|/var/imap/socket/lmtp|/run/cyrus/socket/lmtp|' \
202 + -e 's|/var/imap/socket/notify|/run/cyrus/socket/notify|' \
203 + "${ED}"/etc/cyrus.conf || die
204 +
205 + # turn off sieve if not installed
206 + if ! use sieve; then
207 + sed -i -e "/sieve/s/^/#/" "${ED}"/etc/cyrus.conf || die
208 + fi
209 +
210 + # same thing for http(s) as well
211 + if ! use http; then
212 + sed -i -e "/http/s/^/#/" "${ED}"/etc/cyrus.conf || die
213 + fi
214 +
215 + newinitd "${FILESDIR}"/cyrus.rc8 cyrus
216 + newconfd "${FILESDIR}"/cyrus.confd cyrus
217 + newpamd "${FILESDIR}"/cyrus.pam-include sieve
218 +
219 + for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
220 + keepdir "/var/${subdir}"
221 + fowners cyrus:mail "/var/${subdir}"
222 + fperms 0750 "/var/${subdir}"
223 + done
224 +
225 + for subdir in imap/{user,quota,sieve} spool/imap ; do
226 + for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
227 + keepdir "/var/${subdir}/${i}"
228 + fowners cyrus:mail "/var/${subdir}/${i}"
229 + fperms 0750 "/var/${subdir}/${i}"
230 + done
231 + done
232 +}
233 +
234 +pkg_preinst() {
235 + if ! has_version ${CATEGORY}/${PN} ; then
236 + elog "For correct logging add the following to /etc/syslog.conf:"
237 + elog " local6.* /var/log/imapd.log"
238 + elog " auth.debug /var/log/auth.log"
239 + echo
240 +
241 + elog "You have to add user cyrus to the sasldb2. Do this with:"
242 + elog " saslpasswd2 cyrus"
243 + fi
244 +}
245 +
246 +pkg_postinst() {
247 + # do not install server.{key,pem) if they exist
248 + if use ssl ; then
249 + if [[ ! -f "${ROOT}"/etc/ssl/cyrus/server.key ]]; then
250 + install_cert /etc/ssl/cyrus/server
251 + chown cyrus:mail "${ROOT}"/etc/ssl/cyrus/server.{key,pem}
252 + fi
253 + fi
254 +
255 + einfo "Please see https://www.cyrusimap.org/imap/download/upgrade.html"
256 + einfo "for upgrade instructions."
257 +}