zarafa/www-apps/zarafa-webapp-plugins/zarafa-webapp-plugins-1.5.43477.ebuild

58 lines
1.4 KiB
Bash
Raw Normal View History

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit eutils rpm versionator
MY_PV=$(replace_version_separator 2 '-' )
MY_PVV=$(replace_version_separator 3 'beta' $MY_PV )
MY_PVM=$(get_version_component_range 1-2 )
MY_PVR=$(get_version_component_range 1-3 )
DESCRIPTION="Zarafa WebApp plugins"
HOMEPAGE="http://zarafa.com/"
if [[ ${ZARAFA_WEBAPP_BUILD} == "final" ]] ; then
SRC_URI="http://download.zarafa.com/community/${ZARAFA_WEBAPP_BUILD}/WebApp/${MY_PVM}/rhel/zarafa-webapp-${MY_PV}.noarch.rpm"
else
SRC_URI="http://download.zarafa.com/community/${ZARAFA_WEBAPP_BUILD}/WebApp/zarafa-webapp-${MY_PV}.noarch.rpm"
fi
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="plugin_extbox plugin_pdfbox plugin_xmpp"
RESTRICT="mirror"
DEPEND="www-apps/zarafa-webapp"
RDEPEND="${DEPEND}"
S="${WORKDIR}/usr/share/zarafa-webapp"
src_configure() {
return
}
src_compile() {
return
}
src_install() {
einfo "Installing plugins..."
dodir "/var/lib/zarafa-webapp/plugins"
for plugin in extbox pdfbox xmpp; do
if use "plugin_${plugin}"; then
einfo " ${plugin}"
rm "${S}/plugins/${plugin}/config.php"
cp "${WORKDIR}/etc/zarafa/webapp/config-${plugin}.php" "${S}/plugins/${plugin}/config.php"
cp -R "${S}/plugins/${plugin}" "${D}/var/lib/zarafa-webapp/plugins/"
fowners -R apache:apache "/var/lib/zarafa-webapp/plugins/${plugin}"
fi
done
}