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