2010-10-11 23:56:04 +02:00
|
|
|
# Copyright 1999-2010 Gentoo Foundation
|
2010-10-11 22:17:05 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI="2"
|
|
|
|
|
|
|
|
PHP_EXT_NAME="mapi"
|
|
|
|
PHP_EXT_INI="yes"
|
|
|
|
PHP_EXT_ZENDEXT="no"
|
|
|
|
|
|
|
|
inherit eutils php-ext-base-r1 autotools
|
|
|
|
|
|
|
|
DESCRIPTION="Open Source Groupware Solution"
|
|
|
|
HOMEPAGE="http://zarafa.com/"
|
2010-10-11 23:56:04 +02:00
|
|
|
SRC_URI="http://download.zarafa.com/zarafa/drupal/ondemand.php?version=${PV}&src=zarafa-${PV} -> ${P}.tar.gz
|
2010-10-12 08:00:14 +02:00
|
|
|
licensed? (
|
2010-10-11 23:56:04 +02:00
|
|
|
amd64? ( http://download.zarafa.com/zarafa/drupal/beta/ondemand.php?version=${PV}&distro=ubuntu&distroversion=10.04&arch=x86_64&type=1 -> zarafa-${PV}-ubuntu10.04-x86_64.tar.gz )
|
2010-10-12 08:00:14 +02:00
|
|
|
x86? ( http://download.zarafa.com/zarafa/drupal/beta/ondemand.php?version=${PV}&distro=ubuntu&distroversion=10.04&arch=i386&type=1 -> zarafa-${PV}-ubuntu10.04-i386.tar.gz ) )"
|
2010-10-11 22:17:05 +02:00
|
|
|
|
|
|
|
LICENSE="AGPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
2010-10-11 23:56:04 +02:00
|
|
|
RESTRICT=""
|
2010-10-11 22:17:05 +02:00
|
|
|
IUSE="debug ldap logrotate licensed static tcmalloc kerberos"
|
|
|
|
|
|
|
|
RDEPEND=">=dev-libs/libical-0.44
|
|
|
|
dev-cpp/libvmime:0.7
|
|
|
|
>=dev-lang/php-5.2.0
|
|
|
|
app-text/catdoc
|
|
|
|
app-text/poppler
|
|
|
|
dev-cpp/clucene
|
|
|
|
dev-db/mysql
|
|
|
|
dev-libs/libxml2
|
|
|
|
dev-libs/openssl
|
|
|
|
net-misc/curl
|
|
|
|
sys-libs/e2fsprogs-libs
|
|
|
|
sys-libs/zlib
|
|
|
|
virtual/httpd-php
|
|
|
|
kerberos? ( || ( app-crypt/mit-krb5 app-crypt/heimdal ) )
|
|
|
|
ldap? ( net-nds/openldap )
|
|
|
|
logrotate? ( app-admin/logrotate )
|
|
|
|
tcmalloc? ( dev-util/google-perftools )"
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
dev-util/pkgconfig
|
|
|
|
sys-devel/gettext"
|
|
|
|
|
2010-10-12 08:00:14 +02:00
|
|
|
src_unpack() {
|
|
|
|
unpack ${A}
|
|
|
|
if use licensed; then
|
|
|
|
cd "${WORKDIR}"
|
|
|
|
if use x86; then
|
|
|
|
unpack $(find ./zarafa-${PV}-ubuntu10.04-i386 -name "zarafa-licensed*")
|
|
|
|
fi
|
|
|
|
if use amd64; then
|
|
|
|
unpack $(find ./zarafa-${PV}-ubuntu10.04-x86_64 -name "zarafa-licensed*")
|
|
|
|
fi
|
|
|
|
mkdir licensed
|
|
|
|
cd licensed
|
|
|
|
unpack ./../data.tar.gz
|
|
|
|
cd "${S}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2010-10-11 22:17:05 +02:00
|
|
|
src_prepare() {
|
|
|
|
EPATCH_SOURCE="${FILESDIR}/patches" EPATCH_SUFFIX="patch" \
|
|
|
|
EPATCH_FORCE="yes" epatch
|
2010-10-12 08:00:14 +02:00
|
|
|
edos2unix php-webclient-ajax/config.php.dist
|
2010-10-11 22:17:05 +02:00
|
|
|
eautoreconf
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
econf \
|
|
|
|
--enable-oss \
|
|
|
|
--disable-perl \
|
|
|
|
--disable-testtools \
|
|
|
|
--enable-release \
|
|
|
|
--with-userscript-prefix=/etc/zarafa/userscripts \
|
|
|
|
--with-quotatemplate-prefix=/etc/zarafa/quotamails \
|
|
|
|
--with-indexerscripts-prefix=/etc/zarafa/indexerscripts \
|
|
|
|
$(use_enable static) \
|
|
|
|
$(use_enable tcmalloc) \
|
|
|
|
$(use_enable debug)
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
make DESTDIR="${D}" install || die "make install failed"
|
|
|
|
make DESTDIR="${D}" install-ajax-webaccess || die "make install-ajax-webaccess failed"
|
|
|
|
make DESTDIR="${D}" install-mobile-webaccess || die "make install-mobile-webaccess failed"
|
|
|
|
|
|
|
|
insinto /etc/apache2/modules.d
|
|
|
|
newins "${FILESDIR}/50_mailman.conf-r1" 50_mailman.conf
|
|
|
|
newins "${FILESDIR}/50_zarafa-webaccess-mobile.conf" 50_zarafa-webaccess-mobile.conf
|
|
|
|
newins "${FILESDIR}/50_zarafa-webaccess.conf" 50_zarafa-webaccess.conf
|
|
|
|
|
|
|
|
rm "${D}"/usr/share/zarafa-webaccess/*.conf
|
|
|
|
rm "${D}"/usr/share/zarafa-webaccess-mobile/*.conf
|
|
|
|
|
|
|
|
php-ext-base-r1_src_install
|
|
|
|
|
|
|
|
if use logrotate; then
|
|
|
|
insinto /etc/logrotate.d
|
|
|
|
newins "${FILESDIR}"/zarafa.logrotate zarafa || die "Failed to install logrotate"
|
|
|
|
fi
|
|
|
|
|
|
|
|
insinto /etc/zarafa
|
|
|
|
doins "${S}"/installer/linux/*.cfg || die "Failed to install config files"
|
|
|
|
|
|
|
|
dodir /var/log/zarafa
|
|
|
|
keepdir /var/log/zarafa
|
|
|
|
|
|
|
|
if use licensed; then
|
|
|
|
newinitd ${FILESDIR}/zarafa-licensed.rc6 zarafa-licensed
|
|
|
|
fi
|
|
|
|
|
|
|
|
newinitd ${FILESDIR}/zarafa-gateway.rc6 zarafa-gateway
|
|
|
|
newinitd ${FILESDIR}/zarafa-ical.rc6 zarafa-ical
|
|
|
|
newinitd ${FILESDIR}/zarafa-indexer.rc6 zarafa-indexer
|
|
|
|
newinitd ${FILESDIR}/zarafa-monitor.rc6 zarafa-monitor
|
|
|
|
newinitd ${FILESDIR}/zarafa-server.rc6 zarafa-server
|
|
|
|
newinitd ${FILESDIR}/zarafa-spooler.rc6 zarafa-spooler
|
|
|
|
}
|