Lines 1-6
Link Here
|
1 |
# Copyright 1999-2006 Gentoo Foundation |
1 |
# Copyright 1999-2006 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rc14.ebuild,v 1.1 2006/11/12 20:35:23 uberlord Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rcXX.ebuild,v 1.3 2006/09/05 13:18:39 sieve Exp $ |
4 |
|
4 |
|
5 |
inherit autotools eutils |
5 |
inherit autotools eutils |
6 |
|
6 |
|
Lines 8-20
Link Here
|
8 |
HOMEPAGE="http://dovecot.org/" |
8 |
HOMEPAGE="http://dovecot.org/" |
9 |
MY_P="${P/_/.}" |
9 |
MY_P="${P/_/.}" |
10 |
S="${WORKDIR}/${MY_P}" |
10 |
S="${WORKDIR}/${MY_P}" |
11 |
SRC_URI="http://dovecot.org/releases/${MY_P}.tar.gz" |
11 |
SIEVE="dovecot-sieve-1.0.tar.gz" |
|
|
12 |
SIEVE_S="${WORKDIR}/${SIEVE}" |
13 |
SRC_URI="http://dovecot.org/releases/${MY_P}.tar.gz sieve? ( http://dovecot.org/releases/sieve/${SIEVE} )" |
12 |
|
14 |
|
13 |
SLOT="0" |
15 |
SLOT="0" |
14 |
LICENSE="LGPL-2.1" |
16 |
LICENSE="LGPL-2.1" |
15 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" |
17 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" |
16 |
|
18 |
|
17 |
IUSE="debug doc ipv6 kerberos ldap mbox mysql pop3d pam postgres ssl vpopmail" |
19 |
IUSE="debug doc ipv6 kerberos ldap mbox mysql pop3d pam postgres sieve ssl vpopmail" |
18 |
|
20 |
|
19 |
# Developer documentation, controlled by the doc USE flag |
21 |
# Developer documentation, controlled by the doc USE flag |
20 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
22 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
Lines 54-59
Link Here
|
54 |
$(use_with vpopmail) \ |
56 |
$(use_with vpopmail) \ |
55 |
${myconf} || die "configure failed" |
57 |
${myconf} || die "configure failed" |
56 |
emake || die "make failed" |
58 |
emake || die "make failed" |
|
|
59 |
|
60 |
if use sieve ; then |
61 |
cd "${SIEVE_S}" |
62 |
econf --localstatedir=/var \ |
63 |
--with-dovecot="${S}" \ |
64 |
$(use_enable debug) \ |
65 |
$(use_enable ipv6) \ |
66 |
$(use_with kerberos gssapi) \ |
67 |
$(use_with ldap) \ |
68 |
$(use_with mysql) \ |
69 |
$(use_with pam) \ |
70 |
$(use_with pop3d) \ |
71 |
$(use_with postgres pgsql) \ |
72 |
$(use_with vpopmail) \ |
73 |
${myconf} || die "configure failed" |
74 |
emake || die "make failed" |
75 |
fi |
57 |
} |
76 |
} |
58 |
|
77 |
|
59 |
src_install () { |
78 |
src_install () { |
Lines 81-94
Link Here
|
81 |
fperms 0600 /etc/dovecot/dovecot.conf |
100 |
fperms 0600 /etc/dovecot/dovecot.conf |
82 |
|
101 |
|
83 |
# .maildir is the Gentoo default, but we need to support mbox to |
102 |
# .maildir is the Gentoo default, but we need to support mbox to |
84 |
local mail_location="maildir:~/.maildir" |
103 |
local mailenv="maildir:%h/.maildir" |
85 |
if use mbox ; then |
104 |
if use mbox ; then |
86 |
mail_loctation="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
105 |
mailenv="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
87 |
keepdir /var/dovecot |
106 |
keepdir /var/dovecot |
88 |
sed -i -e 's|#mail_extra_groups =|mail_extra_groups = mail|' "${conf}" |
107 |
sed -i -e 's|#mail_extra_groups =|mail_extra_groups = mail|' "${conf}" |
89 |
fi |
108 |
fi |
90 |
sed -i -e \ |
109 |
sed -i -e \ |
91 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" || die |
110 |
"s|#default_mail_env =|default_mail_env = ${mailenv}|" "${conf}" || die |
92 |
|
111 |
|
93 |
# We're using pam files (imap and pop3) provided by mailbase |
112 |
# We're using pam files (imap and pop3) provided by mailbase |
94 |
if use pam ; then |
113 |
if use pam ; then |
Lines 105-111
Link Here
|
105 |
if use mysql || use postgres ; then |
124 |
if use mysql || use postgres ; then |
106 |
cp doc/dovecot-sql.conf "${D}"/etc/dovecot |
125 |
cp doc/dovecot-sql.conf "${D}"/etc/dovecot |
107 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
126 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
108 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" |
127 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot/dovecot-sql.conf|' "${conf}" |
109 |
dodoc doc/dovecot-sql.conf |
128 |
dodoc doc/dovecot-sql.conf |
110 |
fi |
129 |
fi |
111 |
|
130 |
|
Lines 113-119
Link Here
|
113 |
if use ldap ; then |
132 |
if use ldap ; then |
114 |
cp doc/dovecot-ldap.conf "${D}"/etc/dovecot |
133 |
cp doc/dovecot-ldap.conf "${D}"/etc/dovecot |
115 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
134 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
116 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" |
135 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot/dovecot-ldap.conf|' "${conf}" |
117 |
dodoc doc/dovecot-ldap.conf |
136 |
dodoc doc/dovecot-ldap.conf |
118 |
fi |
137 |
fi |
119 |
|
138 |
|
Lines 133-138
Link Here
|
133 |
dodoc doc/*.cnf doc/mkcert.sh |
152 |
dodoc doc/*.cnf doc/mkcert.sh |
134 |
fi |
153 |
fi |
135 |
|
154 |
|
|
|
155 |
# Install sieve plugin |
156 |
if use sieve ; then |
157 |
cd "${SIEVE_S}" |
158 |
make DESTDIR="${D}" install || die "make install failed" |
159 |
fi |
160 |
|
136 |
dodir /var/run/dovecot |
161 |
dodir /var/run/dovecot |
137 |
fowners root:0 /var/run/dovecot |
162 |
fowners root:0 /var/run/dovecot |
138 |
fperms 0700 /var/run/dovecot |
163 |
fperms 0700 /var/run/dovecot |