Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/bincimap/
Date: Fri, 03 Jun 2016 17:12:16
Message-Id: 1464973941.228185de1d3dc7c550a0e3e0917cac826fd65a55.blueness@gentoo
1 commit: 228185de1d3dc7c550a0e3e0917cac826fd65a55
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 17:12:21 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 17:12:21 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=228185de
7
8 net-mail/bincimap: bump to EAPI=5
9
10 Package-Manager: portage-2.2.28
11
12 net-mail/bincimap/bincimap-1.2.13-r1.ebuild | 99 +++++++++++++++++++++++++++++
13 1 file changed, 99 insertions(+)
14
15 diff --git a/net-mail/bincimap/bincimap-1.2.13-r1.ebuild b/net-mail/bincimap/bincimap-1.2.13-r1.ebuild
16 new file mode 100644
17 index 0000000..c01e065
18 --- /dev/null
19 +++ b/net-mail/bincimap/bincimap-1.2.13-r1.ebuild
20 @@ -0,0 +1,99 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit eutils
28 +
29 +DESCRIPTION="IMAP server for Maildir"
30 +SRC_URI="http://www.bincimap.org/dl/tarballs/1.2/${P}final.tar.bz2"
31 +HOMEPAGE="http://freshmeat.net/projects/bincimap/"
32 +LICENSE="GPL-2"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~hppa ~ppc ~x86"
35 +IUSE="ssl"
36 +
37 +DEPEND="ssl? ( dev-libs/openssl )"
38 +
39 +RDEPEND="${DEPEND}
40 + virtual/daemontools
41 + sys-apps/ucspi-tcp
42 + net-mail/checkpassword"
43 +
44 +# get rid of old style virtual - bug 350792
45 +# all blockers really needed?
46 +RDEPEND="${RDEPEND}
47 + !mail-mta/courier
48 + !net-mail/courier-imap
49 + !net-mail/cyrus-imapd
50 + !net-mail/uw-imap"
51 +
52 +S="${WORKDIR}/${P}final"
53 +
54 +src_prepare() {
55 + epatch "${FILESDIR}"/${P}-gentoo.diff
56 + epatch "${FILESDIR}"/${PN}-1.2-gcc43.patch
57 + epatch "${FILESDIR}"/${P}-glibc-2.10.patch
58 +}
59 +
60 +src_configure() {
61 + econf $(use_enable ssl) --sysconfdir=/etc/bincimap
62 +}
63 +
64 +src_compile() {
65 + emake localstatedir=/etc/bincimap
66 +}
67 +
68 +src_install () {
69 + emake DESTDIR="${D}" localstatedir=/etc/bincimap prefix=/usr install
70 + keepdir /var/log/bincimap || die
71 + use ssl && keepdir /var/log/bincimap-ssl || die
72 +
73 + dodoc AUTHORS ChangeLog INSTALL \
74 + NEWS README README.SSL TODO
75 + dohtml doc/*.{html,css}
76 + rm -rf "${D}"/usr/share/doc/"${PN}"
77 +
78 + # backward compatibility
79 + dosym /etc/bincimap/service/bincimap /etc/bincimap/service/imap
80 + dosym /etc/bincimap/service/bincimaps /etc/bincimap/service/imaps
81 +}
82 +
83 +pkg_postinst() {
84 + elog "To start bicimap at boot you have to enable the /etc/init.d/svscan rc file"
85 + elog "and create the following link:"
86 + elog "ln -s /etc/bincimap/service/bincimap /service/bincimap"
87 + elog
88 +
89 + if use ssl; then
90 + elog "If you want to use ssl connections, create the following link:"
91 + elog "ln -s /etc/bincimap/service/bincimaps /service/bincimaps"
92 + elog
93 + elog "And this command will setup bincimap-ssl on your system."
94 + elog "emerge --config =${CATEGORY}/${PF}"
95 + elog
96 + fi
97 +
98 + elog "NOTE: Default Maildir path is '~/.maildir'. If you want to modify it,"
99 + elog "edit /etc/bincimap/bincimap.conf"
100 + elog
101 +}
102 +
103 +pkg_config() {
104 + if use ssl; then
105 + local pemfile=/etc/bincimap/bincimap.pem
106 + if [ ! -f $pemfile ]; then
107 + echo "Creating a self-signed ssl-cert:"
108 + /usr/bin/openssl req -new -x509 -nodes -out $pemfile -days 366 -keyout $pemfile
109 + chmod 640 $pemfile
110 +
111 + einfo "If You want to have a signed cert, do the following:"
112 + einfo "openssl req -new -nodes -out req.pem \\"
113 + einfo "-keyout $pemfile"
114 + einfo "chmod 640 $pemfile"
115 + einfo "Send req.pem to your CA to obtain signed_req.pem, and do:"
116 + einfo "cat signed_req.pem >> $pemfile"
117 + fi
118 + fi
119 +}