2014-01-20 14:36:54 +01:00
|
|
|
# Copyright 1999-2014 Gentoo Foundation
|
2013-04-15 23:55:48 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI=2
|
|
|
|
|
2013-04-16 00:17:08 +02:00
|
|
|
inherit webapp eutils rpm depend.php versionator
|
|
|
|
|
2014-12-12 16:41:13 +01:00
|
|
|
MY_PV=$(replace_version_separator 3 '-' )
|
2013-04-16 00:17:08 +02:00
|
|
|
MY_PVV=$(replace_version_separator 3 'beta' $MY_PV )
|
2014-12-12 16:41:13 +01:00
|
|
|
MY_PVM=$(get_version_component_range 1-3 )
|
2013-04-16 00:17:08 +02:00
|
|
|
MY_PVR=$(get_version_component_range 1-3 )
|
2013-04-15 23:55:48 +02:00
|
|
|
|
|
|
|
DESCRIPTION="Open Source Groupware Solution"
|
|
|
|
HOMEPAGE="http://zarafa.com/"
|
|
|
|
|
2014-12-12 16:41:13 +01:00
|
|
|
ZARAFA_WEBAPP_BUILD="final"
|
|
|
|
|
2013-04-15 23:55:48 +02:00
|
|
|
if [[ ${ZARAFA_WEBAPP_BUILD} == "final" ]] ; then
|
2014-01-20 14:36:54 +01:00
|
|
|
SRC_URI="http://download.zarafa.com/community/${ZARAFA_WEBAPP_BUILD}/WebApp/${MY_PVM}/rhel/zarafa-webapp-${MY_PV}.noarch.rpm"
|
2013-04-15 23:55:48 +02:00
|
|
|
else
|
2013-04-16 00:17:08 +02:00
|
|
|
SRC_URI="http://download.zarafa.com/community/${ZARAFA_WEBAPP_BUILD}/WebApp/zarafa-webapp-${MY_PV}.noarch.rpm"
|
2013-04-15 23:55:48 +02:00
|
|
|
fi
|
|
|
|
S="${WORKDIR}/usr/share/zarafa-webapp"
|
|
|
|
|
|
|
|
LICENSE="AGPL-3"
|
2013-04-16 00:17:08 +02:00
|
|
|
KEYWORDS="~amd64 ~arm ~x86"
|
2013-04-15 23:55:48 +02:00
|
|
|
RESTRICT="mirror"
|
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
need_php_httpd
|
|
|
|
|
|
|
|
pkg_setup () {
|
|
|
|
webapp_pkg_setup
|
|
|
|
require_php_with_use iconv session xml
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
webapp_src_preinst
|
|
|
|
|
|
|
|
# rearrange files and remove unneeded ones
|
|
|
|
rm config.php || die "Unexpected source layout; ebuild needs update"
|
|
|
|
rm -r plugins || die "Unexpected source layout; ebuild needs update"
|
|
|
|
cp "${S}/../../../etc/zarafa/webapp/config.php" "${S}/config.php" || die "Unexpected source layout; ebuild needs update"
|
2014-06-26 15:16:08 +02:00
|
|
|
|
2013-04-15 23:55:48 +02:00
|
|
|
dodir "/var/lib/zarafa-webapp/plugins"
|
|
|
|
dosym "/var/lib/zarafa-webapp/plugins" "${MY_HTDOCSDIR}"/plugins
|
|
|
|
dodir "/var/lib/zarafa-webapp/tmp"
|
|
|
|
|
|
|
|
insinto "${MY_HTDOCSDIR}"
|
|
|
|
doins -r "${S}"/*
|
|
|
|
|
|
|
|
webapp_serverowned -R "/var/lib/zarafa-webapp"
|
|
|
|
webapp_serverowned "${MY_HTDOCSDIR}/config.php"
|
|
|
|
webapp_configfile "${MY_HTDOCSDIR}/config.php"
|
|
|
|
|
|
|
|
webapp_src_install
|
|
|
|
}
|