Gentoo Archives: gentoo-commits

From: "Tobias Scherbaum (dertobi123)" <dertobi123@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/cyrus-imapd: cyrus-imapd-2.3.13-r1.ebuild metadata.xml ChangeLog
Date: Mon, 29 Dec 2008 18:02:20
Message-Id: E1LHMRU-0005BW-Tl@stork.gentoo.org
1 dertobi123 08/12/29 18:02:16
2
3 Modified: metadata.xml ChangeLog
4 Added: cyrus-imapd-2.3.13-r1.ebuild
5 Log:
6 Make sieve support optional (though enabled per default), #110218
7 (Portage version: 2.2_rc20/cvs/Linux 2.6.25-gentoo-r7 x86_64)
8
9 Revision Changes Path
10 1.4 net-mail/cyrus-imapd/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/metadata.xml?rev=1.4&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/metadata.xml?rev=1.4&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/metadata.xml?r1=1.3&r2=1.4
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/metadata.xml,v
19 retrieving revision 1.3
20 retrieving revision 1.4
21 diff -u -r1.3 -r1.4
22 --- metadata.xml 23 Aug 2008 06:36:24 -0000 1.3
23 +++ metadata.xml 29 Dec 2008 18:02:16 -0000 1.4
24 @@ -11,5 +11,6 @@
25 <flag name="drac">Enable dynamic relay support in the cyrus imap server</flag>
26 <flag name="idled">Enable idled vs poll IMAP IDLE method</flag>
27 <flag name="replication">Enable replication support in the cyrus imap server</flag>
28 + <flag name="sieve">Enable sieve support</flag>
29 </use>
30 </pkgmetadata>
31
32
33
34 1.127 net-mail/cyrus-imapd/ChangeLog
35
36 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/ChangeLog?rev=1.127&view=markup
37 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/ChangeLog?rev=1.127&content-type=text/plain
38 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/ChangeLog?r1=1.126&r2=1.127
39
40 Index: ChangeLog
41 ===================================================================
42 RCS file: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v
43 retrieving revision 1.126
44 retrieving revision 1.127
45 diff -u -r1.126 -r1.127
46 --- ChangeLog 27 Oct 2008 19:02:43 -0000 1.126
47 +++ ChangeLog 29 Dec 2008 18:02:16 -0000 1.127
48 @@ -1,6 +1,12 @@
49 # ChangeLog for net-mail/cyrus-imapd
50 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
51 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.126 2008/10/27 19:02:43 dertobi123 Exp $
52 +# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.127 2008/12/29 18:02:16 dertobi123 Exp $
53 +
54 +*cyrus-imapd-2.3.13-r1 (29 Dec 2008)
55 +
56 + 29 Dec 2008; Tobias Scherbaum <dertobi123@g.o>
57 + +cyrus-imapd-2.3.13-r1.ebuild:
58 + Make sieve support optional (though enabled per default), #110218
59
60 *cyrus-imapd-2.3.13 (27 Oct 2008)
61
62
63
64
65 1.1 net-mail/cyrus-imapd/cyrus-imapd-2.3.13-r1.ebuild
66
67 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.13-r1.ebuild?rev=1.1&view=markup
68 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.13-r1.ebuild?rev=1.1&content-type=text/plain
69
70 Index: cyrus-imapd-2.3.13-r1.ebuild
71 ===================================================================
72 # Copyright 1999-2008 Gentoo Foundation
73 # Distributed under the terms of the GNU General Public License v2
74 # $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.13-r1.ebuild,v 1.1 2008/12/29 18:02:16 dertobi123 Exp $
75
76 EAPI=1
77
78 inherit autotools eutils ssl-cert fixheadtails pam
79
80 MY_P=${P/_/}
81
82 DESCRIPTION="The Cyrus IMAP Server."
83 HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/"
84 SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${MY_P}.tar.gz"
85 LIBWRAP_PATCH_VER="2.2"
86
87 LICENSE="as-is"
88 SLOT="0"
89 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
90 IUSE="drac idled kerberos kolab nntp pam replication +sieve snmp ssl tcpd"
91
92 PROVIDE="virtual/imapd"
93 RDEPEND=">=sys-libs/db-3.2
94 >=dev-libs/cyrus-sasl-2.1.13
95 pam? (
96 virtual/pam
97 >=net-mail/mailbase-1
98 )
99 kerberos? ( virtual/krb5 )
100 snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
101 ssl? ( >=dev-libs/openssl-0.9.6 )
102 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
103 drac? ( >=mail-client/drac-1.12-r1 )
104 nntp? ( !net-nntp/leafnode )
105 kolab? ( net-nds/openldap )"
106
107 DEPEND="$RDEPEND
108 sys-devel/libtool
109 >=sys-devel/autoconf-2.58
110 sys-devel/automake"
111
112 RDEPEND="$RDEPEND
113 !virtual/imapd"
114
115 new_net-snmp_check() {
116 # tcpd USE flag check. Bug #68254.
117 if use tcpd ; then
118 if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then
119 eerror "You are emerging this package with USE=\"tcpd\""
120 eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\""
121 fail_msg
122 fi
123 else
124 if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then
125 eerror "You are emerging this package with USE=\"-tcpd\""
126 eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\""
127 fail_msg
128 fi
129 fi
130 # DynaLoader check. Bug #67411
131
132 if [ -x "$(type -p net-snmp-config)" ]; then
133 einfo "$(type -p net-snmp-config) is found and executable."
134 NSC_AGENTLIBS="$(net-snmp-config --agent-libs)"
135 einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\""
136 if [ -z "$NSC_AGENTLIBS" ]; then
137 eerror "NSC_AGENTLIBS is null"
138 einfo "please report this to bugs.gentoo.org"
139 fi
140 for i in ${NSC_AGENTLIBS}; do
141 # check for the DynaLoader path.
142 if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then
143 DYNALOADER_PATH="$i"
144 einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\""
145 if [[ ! -f "${DYNALOADER_PATH}" ]]; then
146 eerror "\""${DYNALOADER_PATH}"\" is not found."
147 einfo "Have you upgraded \"perl\" after"
148 einfo "you emerged \"net-snmp\". Please re-emerge"
149 einfo "\"net-snmp\" then try again. Bug #67411."
150 die "\""${DYNALOADER_PATH}"\" is not found."
151 fi
152 fi
153 done
154 else
155 eerror "\"net-snmp-config\" not found or not executable!"
156 die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!"
157 fi
158 }
159
160 fail_msg() {
161 eerror "enable "snmp" USE flag for this package requires"
162 eerror "that net-analyzer/net-snmp and this package both build with"
163 eerror "\"tcpd\" or \"-tcpd\". Bug #68254"
164 die "sanity check failed."
165 }
166
167 pkg_setup() {
168 use snmp && new_net-snmp_check
169 enewuser cyrus -1 -1 /usr/cyrus mail
170 }
171
172 S=${WORKDIR}/${MY_P}
173
174 src_unpack() {
175 unpack ${A} && cd "${S}"
176
177 ht_fix_file "${S}"/imap/xversion.sh
178
179 # Fix prestripped binaries
180 epatch "${FILESDIR}/${PN}-strip.patch"
181
182 if use drac ; then
183 epatch "${S}/contrib/drac_auth.patch"
184 fi
185
186 # KOLAB support
187 if use kolab ; then
188 EPATCH_SOURCE="${FILESDIR}/kolab/${PV}" EPATCH_SUFFIX="patch" \
189 EPATCH_FORCE="yes" epatch
190 # These files are being created automatically and need to be updated
191 # # after the patches used above
192 rm -f lib/imapopts.h lib/imapopts.c
193 fi
194
195 # Add libwrap defines as we don't have a dynamicly linked library.
196 use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch"
197
198 # Fix master(8)->cyrusmaster(8) manpage.
199 for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
200 sed -i -e 's:master\.8:cyrusmaster.8:g' \
201 -e 's:master(8):cyrusmaster(8):g' \
202 "${i}" || die "sed failed" || die "sed failed"
203 done
204 mv man/master.8 man/cyrusmaster.8 || die "mv failed"
205 sed -i -e "s:MASTER:CYRUSMASTER:g" \
206 -e "s:Master:Cyrusmaster:g" \
207 -e "s:master:cyrusmaster:g" \
208 man/cyrusmaster.8 || die "sed failed"
209
210 # Recreate configure.
211 WANT_AUTOCONF="2.5"
212 AT_M4DIR="cmulocal" eautoreconf
213
214 # When linking with rpm, you need to link with more libraries.
215 sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed"
216
217 if use kolab ; then
218 sed -i -e "s/{LIB_SASL}/{LIB_SASL} -lldap -llber /" configure || die "sed failed"
219 fi
220 }
221
222 src_compile() {
223 local myconf
224 myconf="${myconf} $(use_with ssl openssl)"
225 myconf="${myconf} $(use_with snmp ucdsnmp)"
226 myconf="${myconf} $(use_with tcpd libwrap)"
227 myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)"
228 myconf="${myconf} $(use_enable idled)"
229 myconf="${myconf} $(use_enable nntp nntp)"
230 myconf="${myconf} $(use_enable replication)"
231
232 if use drac; then
233 myconf="${myconf} --with-drac=/usr/$(get_libdir)"
234 else
235 myconf="${myconf} --without-drac"
236 fi
237
238 if use kerberos; then
239 myconf="${myconf} --with-auth=krb5"
240 else
241 myconf="${myconf} --with-auth=unix"
242 fi
243
244 econf \
245 --enable-murder \
246 --enable-listext \
247 --enable-netscapehack \
248 --with-extraident=Gentoo \
249 --with-service-path=/usr/lib/cyrus \
250 --with-cyrus-user=cyrus \
251 --with-cyrus-group=mail \
252 --with-com_err=yes \
253 --without-perl \
254 --disable-cyradm \
255 ${myconf} || die "econf failed"
256
257 # needed for parallel make. Bug #72352.
258 cd "${S}"/imap
259 emake xversion.h || die "emake xversion.h failed"
260
261 # -j1 for #222529
262 cd "${S}"
263 emake -j1 || die "compile problem"
264 }
265
266 src_install() {
267 local SUBDIRS
268
269 if use sieve; then
270 SUBDIRS="master imap imtest timsieved notifyd sieve"
271 else
272 SUBDIRS="master imap imtest"
273 fi
274
275 dodir /usr/bin /usr/lib
276 for subdir in ${SUBDIRS}; do
277 make -C "${subdir}" DESTDIR="${D}" install || die "make install failed"
278 done
279
280 # Link master to cyrusmaster (postfix has a master too)
281 dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster
282
283 if ! use nntp ; then
284 rm man/fetchnews.8 man/syncnews.8 man/nntpd.8 man/nntptest.1
285 rm "${D}"/usr/bin/nntptest
286 fi
287
288 doman man/*.[0-8]
289 dodoc COPYRIGHT README*
290 dohtml doc/*.html doc/murder.png
291 cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
292 cp -r contrib tools "${D}/usr/share/doc/${PF}"
293 find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf
294
295 insinto /etc
296 doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
297
298 newinitd "${FILESDIR}/cyrus.rc6" cyrus
299 newconfd "${FILESDIR}/cyrus.confd" cyrus
300 newpamd "${FILESDIR}/cyrus.pam-include" sieve
301
302 for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
303 keepdir "/var/${subdir}"
304 fowners cyrus:mail "/var/${subdir}"
305 fperms 0750 "/var/${subdir}"
306 done
307 for subdir in imap/{user,quota,sieve} spool/imap ; do
308 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
309 keepdir "/var/${subdir}/${i}"
310 fowners cyrus:mail "/var/${subdir}/${i}"
311 fperms 0750 "/var/${subdir}/${i}"
312 done
313 done
314 }
315
316 pkg_postinst() {
317 # do not install server.{key,pem) if they are exist.
318 use ssl && {
319 if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then
320 install_cert /etc/ssl/cyrus/server
321 chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem}
322 fi
323 }
324
325 if df -T /var/imap | grep -q ' ext2 ' ; then
326 ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous."
327 chattr +S /var/imap/{user,quota}{,/*}
328 eend $?
329 fi
330
331 if df -T /var/spool/imap | grep -q ' ext2 ' ; then
332 ebegin "Making /var/spool/imap/* synchronous."
333 chattr +S /var/spool/imap{,/*}
334 eend $?
335 fi
336
337 ewarn "If the queue directory of the mail daemon resides on an ext2"
338 ewarn "filesystem you need to set it manually to update"
339 ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'."
340 echo
341
342 elog "For correct logging add the following to /etc/syslog.conf:"
343 elog " local6.* /var/log/imapd.log"
344 elog " auth.debug /var/log/auth.log"
345 echo
346
347 elog "You have to add user cyrus to the sasldb2. Do this with:"
348 elog " saslpasswd2 cyrus"
349 }