2011-01-29 05:42:35 +01:00
|
|
|
# Copyright 1999-2011 Gentoo Foundation
|
2010-11-11 20:32:41 +01: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"
|
2011-01-29 05:42:35 +01:00
|
|
|
USE_PHP="php5-3"
|
2010-11-11 20:32:41 +01:00
|
|
|
|
2011-01-29 05:42:35 +01:00
|
|
|
inherit php-ext-source-r2 eutils autotools rpm5 versionator
|
|
|
|
|
|
|
|
MY_PV=$(replace_version_separator 3 '-' )
|
|
|
|
MY_PVM=$(get_version_component_range 1-2 )
|
|
|
|
MY_PVR=$(get_version_component_range 1-3 )
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
DESCRIPTION="Open Source Groupware Solution"
|
|
|
|
HOMEPAGE="http://zarafa.com/"
|
2011-01-29 05:42:35 +01:00
|
|
|
SRC_URI="http://download.zarafa.com/community/final/${MY_PVM}/${MY_PV}/zcp-source-${MY_PV}.tgz
|
2010-11-11 20:32:41 +01:00
|
|
|
!arm? ( licensed? (
|
2011-01-29 05:42:35 +01:00
|
|
|
amd64? ( http://download.zarafa.com/community/final/${MY_PVM}/${MY_PV}/zcp-${MY_PV}-sles-11-x86_64-free.tgz )
|
|
|
|
x86? ( http://download.zarafa.com/community/final/${MY_PVM}/${MY_PV}/zcp-${MY_PV}-sles-11-i586-free.tgz ) ) )"
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
LICENSE="AGPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~arm ~x86"
|
|
|
|
RESTRICT=""
|
2011-01-29 05:42:35 +01:00
|
|
|
IUSE="debug ldap logrotate licensed static tcmalloc perl kerberos sparsehash"
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
RDEPEND=">=dev-libs/libical-0.44
|
|
|
|
dev-cpp/libvmime:0.7
|
|
|
|
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
|
|
|
|
sys-libs/ncurses
|
|
|
|
sys-libs/pam
|
|
|
|
kerberos? ( || ( app-crypt/mit-krb5 app-crypt/heimdal ) )
|
|
|
|
ldap? ( net-nds/openldap )
|
|
|
|
logrotate? ( app-admin/logrotate )
|
|
|
|
tcmalloc? ( dev-util/google-perftools )
|
2011-01-29 05:42:35 +01:00
|
|
|
sparsehash? ( dev-cpp/sparsehash )
|
2010-11-11 20:32:41 +01:00
|
|
|
perl? ( dev-lang/perl )
|
|
|
|
!arm? ( licensed? (
|
|
|
|
dev-libs/openssl:0.9.8
|
|
|
|
>=sys-libs/zlib-1.2.4
|
|
|
|
) )"
|
|
|
|
|
2011-01-29 05:42:35 +01:00
|
|
|
S="${WORKDIR}"/zcp-source-${MY_PV}/src
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
dev-util/pkgconfig
|
2011-01-29 05:42:35 +01:00
|
|
|
sys-devel/gettext
|
|
|
|
dev-lang/php"
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
QA_PRESTRIPPED="
|
|
|
|
usr/bin/zarafa-restore
|
|
|
|
usr/bin/zarafa-report
|
|
|
|
usr/bin/zarafa-backup
|
|
|
|
usr/bin/zarafa-licensed
|
|
|
|
usr/lib/zarafa/ldapmsplugin.so
|
|
|
|
usr/lib64/zarafa/ldapmsplugin.so"
|
|
|
|
|
|
|
|
QA_DT_HASH="
|
|
|
|
usr/bin/zarafa-restore
|
|
|
|
usr/bin/zarafa-report
|
|
|
|
usr/bin/zarafa-backup
|
|
|
|
usr/bin/zarafa-licensed
|
|
|
|
usr/lib/zarafa/ldapmsplugin.so
|
|
|
|
usr/lib64/zarafa/ldapmsplugin.so"
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
unpack ${A}
|
|
|
|
if ! use arm; then
|
|
|
|
if use licensed; then
|
|
|
|
cd "${WORKDIR}"
|
|
|
|
mkdir licensed
|
|
|
|
cd licensed
|
|
|
|
if use x86; then
|
2011-01-29 05:42:35 +01:00
|
|
|
rpm5_unpack $(find ./../ -name "zarafa-licensed*")
|
|
|
|
# rpm5_unpack $(find ./../ -name "zarafa-webaccess-muc*")
|
2010-11-11 20:32:41 +01:00
|
|
|
fi
|
|
|
|
if use amd64; then
|
2011-01-29 05:42:35 +01:00
|
|
|
rpm5_unpack $(find ./../ -name "zarafa-licensed*")
|
|
|
|
# rpm5_unpack $(find ./../ -name "zarafa-webaccess-muc*")
|
2010-11-11 20:32:41 +01:00
|
|
|
fi
|
|
|
|
cd "${S}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
EPATCH_SOURCE="${FILESDIR}/patches" EPATCH_SUFFIX="patch" \
|
|
|
|
EPATCH_FORCE="yes" epatch
|
|
|
|
edos2unix php-webclient-ajax/config.php.dist
|
2011-01-29 05:42:35 +01:00
|
|
|
AT_M4DIR="autoconf" eautoreconf
|
2010-11-11 20:32:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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 perl) \
|
|
|
|
$(use_enable static) \
|
2011-01-29 05:42:35 +01:00
|
|
|
$(use_enable sparsehash) \
|
2010-11-11 20:32:41 +01:00
|
|
|
$(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_zarafa-webaccess-mobile.conf" 50_zarafa-webaccess-mobile.conf || die "Failed to install apache config files"
|
|
|
|
newins "${FILESDIR}/50_zarafa-webaccess.conf" 50_zarafa-webaccess.conf || die "Failed to install apache config files"
|
|
|
|
|
|
|
|
rm "${D}"/usr/share/zarafa-webaccess/*.conf || die "Failed to remove apache config files"
|
|
|
|
rm "${D}"/usr/share/zarafa-webaccess-mobile/*.conf || die "Failed to remove apache config files"
|
|
|
|
|
2011-01-29 05:42:35 +01:00
|
|
|
# Use only some parts of PHP eclass
|
|
|
|
php-ext-source-r2_buildinilist php${slot}
|
|
|
|
php-ext-source-r2_addextension "${PHP_EXT_NAME}.so"
|
|
|
|
|
|
|
|
# Symlink the <ext>.ini files from ext/ to ext-active/
|
|
|
|
for inifile in ${PHPINIFILELIST} ; do
|
|
|
|
inidir="${inifile/${PHP_EXT_NAME}.ini/}"
|
|
|
|
inidir="${inidir/ext/ext-active}"
|
|
|
|
dodir "/${inidir}"
|
|
|
|
dosym "/${inifile}" "/${inifile/ext/ext-active}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install PHP module
|
|
|
|
php-ext-source-r2_addtoinifiles ";mapi.cache_max_sessions" "128"
|
|
|
|
php-ext-source-r2_addtoinifiles ";mapi.cache_lifetime" "300"
|
2010-11-11 20:32:41 +01:00
|
|
|
|
|
|
|
if use logrotate; then
|
|
|
|
insinto /etc/logrotate.d
|
|
|
|
newins "${FILESDIR}"/zarafa.logrotate zarafa || die "Failed to install logrotate"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# install ldap files
|
|
|
|
if use ldap; then
|
|
|
|
insinto /etc/openldap/schema
|
|
|
|
doins installer/ldap/zarafa.* || die "Failed to install ldap schema files"
|
|
|
|
fi
|
|
|
|
|
|
|
|
insinto /etc/zarafa
|
|
|
|
doins installer/linux/*.cfg || die "Failed to install config files"
|
|
|
|
|
|
|
|
dodir /var/log/zarafa
|
|
|
|
keepdir /var/log/zarafa
|
|
|
|
|
|
|
|
if ! use arm; then
|
|
|
|
if use licensed; then
|
|
|
|
dobin "${WORKDIR}"/licensed/usr/bin/* || die "Failed to install licensed binaries"
|
|
|
|
exeinto /usr/$(get_libdir)/zarafa/
|
|
|
|
doexe "${WORKDIR}"/licensed/usr/$(get_libdir)/zarafa/*.so || die "Failed to install licensed lib"
|
|
|
|
doman "${WORKDIR}"/licensed/usr/share/man/*/*.gz || die "Failed to install man files"
|
|
|
|
exeinto /usr/share/zarafa/zarafa-backup-helpers/
|
|
|
|
doexe "${WORKDIR}"/licensed/usr/share/zarafa/zarafa-backup-helpers/* || die "Failed to install helper scripts"
|
|
|
|
dodoc "${WORKDIR}"/licensed/usr/share/doc/packages/zarafa-licensed/* || die "Failed to install docs"
|
|
|
|
insinto /etc/zarafa
|
|
|
|
doins -r "${WORKDIR}"/licensed/etc/zarafa/* || die "Failed to install config files"
|
|
|
|
insinto /etc/cron.d
|
|
|
|
doins "${WORKDIR}"/licensed/etc/cron.d/* || die "Failed to install cron files"
|
2011-01-29 05:42:35 +01:00
|
|
|
# insinto /usr/share/zarafa-webaccess/
|
|
|
|
# doins -r "${WORKDIR}"/licensed/usr/share/zarafa-webaccess/* || die "Failed to install webapp files"
|
2010-11-11 20:32:41 +01:00
|
|
|
newinitd "${FILESDIR}"/zarafa-licensed.rc6 zarafa-licensed || die "Failed to install init.d files"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
newinitd "${FILESDIR}"/zarafa-gateway.rc6 zarafa-gateway || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-ical.rc6 zarafa-ical || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-indexer.rc6 zarafa-indexer || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-monitor.rc6 zarafa-monitor || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-server.rc6 zarafa-server || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-spooler.rc6 zarafa-spooler || die "Failed to install init.d files"
|
|
|
|
newinitd "${FILESDIR}"/zarafa-dagent.rc6 zarafa-dagent || die "Failed to install init.d files"
|
|
|
|
}
|