mail-client/roundcube: arm stable, bug #564476
[gentoo.git] / mail-client / roundcube / roundcube-1.0.5.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit webapp
8
9 MY_PN=${PN}mail
10 MY_P=${MY_PN}-${PV/_/-}
11
12 DESCRIPTION="A browser-based multilingual IMAP client with an application-like user interface"
13 HOMEPAGE="http://roundcube.net"
14 SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"
15
16 # roundcube is GPL-licensed, the rest of the licenses here are
17 # for bundled PEAR components, googiespell and utf8.class.php
18 LICENSE="GPL-3 BSD PHP-2.02 PHP-3 MIT public-domain"
19 KEYWORDS="amd64 arm ~hppa ppc ~ppc64 ~sparc x86"
20 IUSE="ldap +mysql postgres sqlite ssl spell"
21
22 # this function only sets DEPEND so we need to include that in RDEPEND
23 need_httpd_cgi
24
25 RDEPEND="
26         ${DEPEND}
27         >=dev-lang/php-5.3[crypt,filter,gd,iconv,json,ldap?,pdo,postgres?,session,sockets,ssl?,unicode,xml]
28         >=dev-php/PEAR-Auth_SASL-1.0.3
29         >=dev-php/PEAR-Crypt_GPG-1.3.2
30         >=dev-php/PEAR-Mail_Mime-1.8.1
31         >=dev-php/PEAR-Net_IDNA2-0.1.1
32         >=dev-php/PEAR-Net_SMTP-1.4.2
33         >=dev-php/PEAR-Net_Sieve-1.3.2
34         >=dev-php/PEAR-Net_Socket-1.0.14
35         mysql? ( || ( dev-lang/php[mysql] dev-lang/php[mysqli] ) )
36         spell? ( dev-lang/php[curl,spell] )
37         sqlite? ( dev-lang/php[sqlite] )
38         virtual/httpd-php
39 "
40
41 S=${WORKDIR}/${MY_P}
42
43 src_prepare() {
44         # Remove bundled PEAR packages
45         rm -r program/lib/{Auth,Crypt,Mail,Net,PEAR*} || die
46 }
47
48 src_install() {
49         webapp_src_preinst
50         dodoc CHANGELOG INSTALL README.md UPGRADING
51
52         insinto "${MY_HTDOCSDIR}"
53         doins -r [[:lower:]]* SQL
54         doins .htaccess
55
56         webapp_serverowned "${MY_HTDOCSDIR}"/logs
57         webapp_serverowned "${MY_HTDOCSDIR}"/temp
58
59         webapp_configfile "${MY_HTDOCSDIR}"/config/defaults.inc.php
60         webapp_postupgrade_txt en UPGRADING
61         webapp_src_install
62 }
63
64 pkg_postinst() {
65         ewarn "When upgrading from <= 0.9, note that the old configuration files"
66         ewarn "named main.inc.php and db.inc.php are deprecated and should be"
67         ewarn "replaced with one single config.inc.php file."
68         ewarn "Run the ./bin/update.sh script to convert those"
69         ewarn "or manually merge the files."
70         ewarn "The new config.inc.php should only contain options that"
71         ewarn "differ from the ones listed in defaults.inc.php."
72 }