diff options
author | Eray Aslan <eras@gentoo.org> | 2016-02-12 06:29:38 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2016-02-12 06:30:07 +0000 |
commit | ba624b2c4deaa92eb703ea723ee7b0266300cf13 (patch) | |
tree | 138557764f33537ca4fc692558763409021b4001 | |
parent | 6896e59694a3baef06c9211e176afd2dcd421257 (diff) | |
download | gentoo-ba624b2c4deaa92eb703ea723ee7b0266300cf13.tar.gz gentoo-ba624b2c4deaa92eb703ea723ee7b0266300cf13.tar.xz |
net-mail/dovecot: sieve version bump to 0.4.12
Package-Manager: portage-2.2.27
-rw-r--r-- | net-mail/dovecot/Manifest | 1 | ||||
-rw-r--r-- | net-mail/dovecot/dovecot-2.2.21-r2.ebuild | 308 |
2 files changed, 309 insertions, 0 deletions
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index 17c83aebb66..fb4ea066963 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -1,5 +1,6 @@ DIST dovecot-2.2-pigeonhole-0.4.10.tar.gz 1605634 SHA256 e9dfe7160fd3b465d6d5068f219122626ef790cce507e290cd09852c7d90726f SHA512 3e864727fc2bd346a7212135a3dd8759f9a5c27abd938c4d6b805c784c5c2c5aa401dd49cfa90951348a00202b85f91d86a2fa17ccab9a983a6faf2d0add48e8 WHIRLPOOL d97cb3111a8de17bcaf3c2cba63063bd45cee7578f826a14441d4568154bcd3520f4d43354411247c8a4ed168c01181718689cb94cb6ae9a15cfb705d7c9c2fd DIST dovecot-2.2-pigeonhole-0.4.11.tar.gz 1660922 SHA256 5168b4ac4e173b563dd71f4024452da5a578aa8d5d047d98903489ab4d84ad72 SHA512 c01b23e90431da8c57f8e384d52bee0a608ce5de5a2e8cc304ab482b17473d637126704d549fbd3bc1ffffdeb41eff94e2587d1e6707a9249c15fff65631814d WHIRLPOOL d901c2b9e4fa2d7b59d77fae42beb42e51d12999a937979aed6b6b705238d2a3d8fad4243f3bee7bbe954e4c033861d9d5f731a9793899d211842627e71009a0 +DIST dovecot-2.2-pigeonhole-0.4.12.tar.gz 1681327 SHA256 98a2fd79b0d9effd08c0caf04d483b1caa5e4503dae811e6d436948557bfb702 SHA512 68b2bcc8bd2a8c039ff116a441ff8795917b280f89ad60819638d5903010611bbd5966567d0d33ae305f9ae4db9f6756b2a72ccd8305124cfe846d64bbdd08c5 WHIRLPOOL 7e5bca584219ed2c9dbfe7056c137ced7a1a56cfa7eb6940fa882d3683ef67ec103e9cf5788f0869175c5d4bf4804fb979951836f70755d4752af441d50afbbc DIST dovecot-2.2-pigeonhole-0.4.9.tar.gz 1577127 SHA256 82892f876d26008a076973dfddf1cffaf5a0451825fd44e06287e94b89078649 SHA512 9e7a18b43d59ed955b142d16696ca221822a547ea59ac70c1bb374eedb28b6ed99ea49f34ead1f9a16ded4573605e410a5cc8e038e1bdf5f943a65588b5d3af2 WHIRLPOOL be309436b43af82a7cb8eff205e1638b2c59751927fdab187e6fde72330e4abd99878cbfa94ca50440ec8de1f9b569bf334d426891ddc73d5f647ee2040c193f DIST dovecot-2.2.19.tar.gz 5256627 SHA256 759e1e3f9d907cdaabad1f5fbacc793ca191d234c084bec3bba42966952a4e9f SHA512 1b9d605a6a5862ade9d1ca634a9e0171b7c212ab025fc2059051c3795470685b66516fa9fbe5ad91d84388268ea15795f2dcd70ffdf81736ce4d80fd284835e9 WHIRLPOOL 30dbe70bfeef10dbe414ebf3f091041ad66926a8748cd401ecaf9ed5c7602939e86943d98bfb839f32c0aa1d0081ab71adacf23bb4adba34e828ee296e9a7278 DIST dovecot-2.2.21.tar.gz 4985686 SHA256 7ab7139e59e1f0353bf9c24251f13c893cf1a6ef4bcc47e2d44de437108d0b20 SHA512 0d246d44e0c908ea40d324982fb279b19424ddcb642e51796078f600fc5bf530898d2fa387fcfd971d43758cff22590e5ea6918c31e9f4a63f13a8c525a23d9b WHIRLPOOL 242026e876a12b9ecd50a76849cb16161f625791bc9d1a54270f38f24e66bc31b6ddf90acf119af2bd4c94e392c875a0c29be08b84a5f25d080a7e1b13d52175 diff --git a/net-mail/dovecot/dovecot-2.2.21-r2.ebuild b/net-mail/dovecot/dovecot-2.2.21-r2.ebuild new file mode 100644 index 00000000000..873ae7de74c --- /dev/null +++ b/net-mail/dovecot/dovecot-2.2.21-r2.ebuild @@ -0,0 +1,308 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils multilib ssl-cert systemd user versionator + +MY_P="${P/_/.}" +major_minor="$(get_version_component_range 1-2)" +sieve_version="0.4.12" +if [[ ${PV} == *_rc* ]] ; then + rc_dir="rc/" +else + rc_dir="" +fi +SRC_URI="http://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz + sieve? ( + http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) + managesieve? ( + http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) " +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" +HOMEPAGE="http://www.dovecot.org/" + +SLOT="0" +LICENSE="LGPL-2.1 MIT" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~x86" + +IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail" +IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox" +IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib" +IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat" + +IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" + +DEPEND="bzip2? ( app-arch/bzip2 ) + caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lucene? ( >=dev-cpp/clucene-2.3 ) + lzma? ( app-arch/xz-utils ) + lz4? ( app-arch/lz4 ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) + selinux? ( sec-policy/selinux-dovecot ) + solr? ( net-misc/curl dev-libs/expat ) + sqlite? ( dev-db/sqlite:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + tcpd? ( sys-apps/tcp-wrappers ) + textcat? ( app-text/libexttextcat ) + vpopmail? ( net-mail/vpopmail ) + zlib? ( sys-libs/zlib ) + virtual/libiconv + dev-libs/icu:=" + +RDEPEND="${DEPEND} + net-mail/mailbase" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use managesieve && ! use sieve; then + ewarn "managesieve USE flag selected but sieve USE flag unselected" + ewarn "sieve USE flag will be turned on" + fi + # default internal user + enewgroup dovecot 97 + enewuser dovecot 97 -1 /dev/null dovecot + # default login user + enewuser dovenull -1 -1 /dev/null + # add "mail" group for suid'ing. Better security isolation. + if use suid; then + enewgroup mail + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-10-ssl.patch" + epatch_user +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + local storages="" + for storage in ${IUSE_DOVECOT_STORAGE//+/}; do + use ${storage} && storages="${storage} ${storages}" + done + [ "${storages}" ] || storages="maildir" + + # turn valgrind tests off. Bug #340791 + VALGRIND=no econf \ + --localstatedir="${EPREFIX}/var" \ + --runstatedir="${EPREFIX}/run" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + --without-stemmer \ + --with-storages="${storages}" \ + --disable-rpath \ + --with-icu \ + $( systemd_with_unitdir ) \ + $( use_with bzip2 bzlib ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with ldap ) \ + $( use_with lucene ) \ + $( use_with lz4 ) \ + $( use_with lzma ) \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with solr ) \ + $( use_with ssl ) \ + $( use_with tcpd libwrap ) \ + $( use_with textcat ) \ + $( use_with vpopmail ) \ + $( use_with zlib ) \ + $( use_enable static-libs static ) \ + ${conf} + + if use sieve || use managesieve ; then + # The sieve plugin needs this file to be build to determine the plugin + # directory and the list of libraries to link to. + emake dovecot-config + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --with-dovecot="../${MY_P}" \ + $( use_with managesieve ) + fi +} + +src_compile() { + default + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + fi +} + +src_test() { + default + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default + fi +} + +src_install () { + default + + # insecure: + # use suid && fperms u+s /usr/libexec/dovecot/deliver + # better: + if use suid;then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r4 dovecot + + rm -rf "${ED}"/usr/share/doc/dovecot + + dodoc AUTHORS NEWS README TODO + dodoc doc/*.{txt,cnf,xml,sh} + docinto example-config + dodoc doc/example-config/*.{conf,ext} + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.{conf,ext} + docinto wiki + dodoc doc/wiki/* + doman doc/man/*.{1,7} + + # Create the dovecot.conf file from the dovecot-example.conf file that + # the dovecot folks nicely left for us.... + local conf="${ED}/etc/dovecot/dovecot.conf" + local confd="${ED}/etc/dovecot/conf.d" + + insinto /etc/dovecot + doins doc/example-config/*.{conf,ext} + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/*.{conf,ext} + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext + rm -f "${confd}/../README" + + # .maildir is the Gentoo default + local mail_location="maildir:~/.maildir" + if ! use maildir; then + if use mbox; then + mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" + keepdir /var/dovecot + sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \ + "${confd}/10-mail.conf" || die "sed failed" + elif use mdbox ; then + mail_location="mdbox:~/.mdbox" + elif use sdbox ; then + mail_location="sdbox:~/.sdbox" + fi + fi + sed -i -e \ + "s|#mail_location =|mail_location = ${mail_location}|" \ + "${confd}/10-mail.conf" \ + || die "failed to update mail location settings in 10-mail.conf" + + # We're using pam files (imap and pop3) provided by mailbase + if use pam; then + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ + "${confd}/auth-system.conf.ext" \ + || die "failed to update PAM settings in auth-system.conf.ext" + # mailbase does not provide a sieve pam file + use managesieve && dosym imap /etc/pam.d/sieve + sed -i -e \ + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update PAM settings in 10-auth.conf" + fi + + # Disable ipv6 if necessary + if ! use ipv6; then + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ + || die "failed to update listen settings in dovecot.conf" + fi + + # Update ssl cert locations + if use ssl; then + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ + || die "ssl conf failed" + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" + fi + + # Install SQL configuration + if use mysql || use postgres; then + sed -i -e \ + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ + "${confd}/10-auth.conf" || die "failed to update SQL settings in \ + 10-auth.conf" + fi + + # Install LDAP configuration + if use ldap; then + sed -i -e \ + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update ldap settings in 10-auth.conf" + fi + + if use vpopmail; then + sed -i -e \ + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update vpopmail settings in 10-auth.conf" + fi + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake DESTDIR="${ED}" install + sed -i -e \ + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ + || die "failed to update sieve settings in 15-lda.conf" + rm -rf "${ED}"/usr/share/doc/dovecot + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.conf + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf + docinto sieve/rfc + dodoc doc/rfc/*.txt + docinto sieve/devel + dodoc doc/devel/DESIGN + docinto plugins + dodoc doc/plugins/*.txt + docinto extensions + dodoc doc/extensions/*.txt + docinto locations + dodoc doc/locations/*.txt + doman doc/man/*.{1,7} + fi + + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete +} + +pkg_postinst() { + if use ssl; then + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then + einfo "Creating SSL certificate" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + install_cert /etc/ssl/dovecot/server + fi + fi + + elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes." +} |