# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit versionator KEYWORDS="~x86 ~amd64" MY_P=open-xchange-$(replace_version_separator 3 -) MY_P=${MY_P/beta/BETA} DESCRIPTION="A Collaboration and Integration Server Environment" HOMEPAGE="http://www.open-xchange.org/" SRC_URI="http://www.open-xchange.com/fileadmin/community/${MY_P}-WebAccessPack.tar.gz http://dev.gentoo.org/~dev-zero/distfiles/${MY_P}-webpack_umin.tar.bz2" LICENSE="Artistic" SLOT="0" IUSE="" BASE_URI="http://www.open-xchange.com/oxcms/opencms/misc/developer-zone/archive/i18n/" available_packs=" es:ES/OX-ES-Groupware_0.8.2.tar.gz;ES/OX-ES-WEBMAIL_0.8.2.tar.gz br:BR/OX-BR-Groupware-0.8.2.tar.gz;BR/OX-BR-Webmail.0.8.2.tar.gz fr:FR/OX-FR-Groupware_0.8.2-RC2.tar.gz;FR/OX-FR-Webmail_0.8.2-RC2.tar.gz ru:RU/OX-RU-Groupware.0.8.2.tar.gz;RU/OX-RU-Webmail.0.8.2.tar.gz cz:CZ/OX-CZ-Groupware.0.8.1-2.gz;CZ/OX-CZ-Webmail.0.8.1-2.gz ve:VE/OX-VE-Groupware_0.8.0-6.tar.gz;VE/OX-VE-Webmail_0.8.0-6.tar.gz it:IT/OX-IT-Groupware.0.8.2.tar.gz;IT/OX-IT-Webmail.0.8.2.tar.gz hu:HU/OX-HU-Groupware.0.8.0-6.tar.gz;HU/OX-HU-Webmail.0.8.0-6.tar.gz no:NO/OX-NO-Groupware.0.8.0-5.tar.gz;NO/OX-NO-Webmail.0.8.0-5.tar.gz nl:NL/OX-NL-Groupware.0.8.0-5.tar.gz;NL/OX-NL-Webmail.0.8.0-5.tar.gz " for pack in ${available_packs[*]}; do lang=${pack%:*} sources=${pack#*:} IUSE="${IUSE} linguas_${lang}" SRC_URI="${SRC_URI} linguas_${lang}? ( ${BASE_URI}${sources%;*} ${BASE_URI}${sources#*;} )" done DEPEND="" RDEPEND="" S=${WORKDIR}/${MY_P} pkg_setup() { TOMCAT_CONF=${TOMCAT_CONF:-$(ls -1 /etc/conf.d/tomcat* | sort -r | head -n 1)} einfo "Using tomcat configuration file: '${TOMCAT_CONF}'" einfo "You can change this by doing 'export TOMCAT_CONF=/etc/conf.d/tomcat-MYVERSION' before starting the merge." . ${TOMCAT_CONF} } src_unpack() { unpack ${MY_P}-WebAccessPack.tar.bz2 ${MY_P}-webpack_umin.tar.bz2 cd "${S}" # We get those icons with one of the icon-packages rm system/www/groupware/images/top/{DE,EN}/* mkdir groupware_locales webmail_locales for lang in ${LINGUAS} ; do for pack in ${available_packs} ; do if [[ "${pack%:*}" == "${lang}" ]] ; then sources=${pack#*:} groupware=${sources%;*} webmail=${sources#*;} unpack ${groupware#*/} mv opt/html/* groupware mv opt/locales/* groupware_locales unpack ${webmail#*/} mv opt/html/* webmail mv opt/locales/* webmail_locales fi done done find . -name logout.htm \ | xargs sed -i -e 's#/cgi-bin/#/open-xchange/cgi-bin/#' find -iname "*.htm" -or -iname "*.lang" -or -iname "*.js" \ | xargs sed -i "s|/cfintranet/|/open-xchange/cfintranet/|g" sed -i -e "s|/cfintranet/|/open-xchange/cfintranet/|g" system/www/webmail/css/main.css } src_install() { insinto /usr/share/open-xchange/groupware/data/templates/ doins -r groupware/* insinto /usr/share/open-xchange/webmail/data/templates/ doins -r webmail/* insinto /usr/share/open-xchange/www/cfintranet/ doins -r system/www/groupware/* insinto /usr/share/open-xchange/www/cfintranet/webmail/ doins -r system/www/webmail/* insinto /etc/open-xchange/groupware/locales/ doins -r groupware_locales/* insinto /etc/open-xchange/webmail/locales/ doins -r webmail_locales/* insinto ${CATALINA_BASE}/webapps/umin/WEB-INF/classes doins -r umin/i18n/* insinto ${CATALINA_BASE}/webapps/umin/web/templates/ doins -r umin/html/* insinto ${CATALINA_BASE}/webapps/umin/web/images/ doins -r system/www/umin/images/* }