summaryrefslogtreecommitdiff
path: root/eclass/libreoffice-l10n-2.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/libreoffice-l10n-2.eclass')
-rw-r--r--eclass/libreoffice-l10n-2.eclass42
1 files changed, 14 insertions, 28 deletions
diff --git a/eclass/libreoffice-l10n-2.eclass b/eclass/libreoffice-l10n-2.eclass
index 05a912e8..79d74359 100644
--- a/eclass/libreoffice-l10n-2.eclass
+++ b/eclass/libreoffice-l10n-2.eclass
@@ -36,36 +36,20 @@ LANGPACK_AVAIL="${LANGPACK_AVAIL:-1}"
DESCRIPTION="LibreOffice.org ${L10N_LANG} localisation"
HOMEPAGE="http://www.documentfoundation.org"
-RESTRICT="mirror"
+RESTRICT="nomirror"
L10N_VER="$(get_version_component_range 1-3)"
-L10N_RC_VERSION="$(get_version_component_range 4)"
+L10N_RC_VERSION="rc2"
LO_BRANCH=$(get_version_component_range 1-2)
-if [ -n "${L10N_RC_VERSION}" ]; then
- # this is a RC, thus testing
- BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/testing/${L10N_VER}/rpm"
- TARBALL_VERSION="${L10N_VER}.${L10N_RC_VERSION}"
-else
- BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${L10N_VER}/rpm"
- TARBALL_VERSION="${L10N_VER}"
-fi
+BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${L10N_VER}/rpm"
SRC_URI=""
-if [ "$(get_version_component_range 1)" = "3" ]; then
- URI_PREFIX="LibO"
- RPM_SUFFIX_LANG="langpack-rpm"
- RPM_SUFFIX_HELP="helppack-rpm"
-else
- URI_PREFIX="LibreOffice"
- RPM_SUFFIX_LANG="rpm_langpack"
- RPM_SUFFIX_HELP="rpm_helppack"
-fi
# try guessing
if [ "${LANGPACK_AVAIL}" = "1" ]; then
- SRC_URI+="${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}_Linux_x86_${RPM_SUFFIX_LANG}_${MY_LANG}.tar.gz"
+ SRC_URI+="${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_langpack-rpm_${MY_LANG}.tar.gz"
fi
if [ "${HELPPACK_AVAIL}" = "1" ]; then
- SRC_URI+=" ${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}_Linux_x86_${RPM_SUFFIX_HELP}_${MY_LANG}.tar.gz"
+ SRC_URI+=" ${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_helppack-rpm_${MY_LANG}.tar.gz"
fi
IUSE=""
@@ -99,20 +83,22 @@ libreoffice-l10n-2_src_unpack() {
local dir=${lang/_/-}
# for english we provide just helppack, as translation is always there
if [[ "${LANGPACK_AVAIL}" == "1" ]]; then
- rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_LANG}_${dir}/RPMS/"
+ rpmdir="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_langpack-rpm_${dir}/RPMS/"
+ [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
# First remove dictionaries, we want to use system ones.
rm -rf "${S}/${rpmdir}/"*dict*.rpm
einfo "Unpacking Langpack"
- rpm_unpack ./${rpmdir}/*.rpm
+ rpm_unpack "./${rpmdir}/"*.rpm
fi
if [[ "${HELPPACK_AVAIL}" == "1" ]]; then
- rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_HELP}_${dir}/RPMS/"
+ rpmdir="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_helppack-rpm_${dir}/RPMS/"
+ [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
einfo "Unpacking Helppack"
- rpm_unpack ./${rpmdir}/*.rpm
+ rpm_unpack ./"${rpmdir}/"*.rpm
fi
if [[ -n "${TDEPEND}" ]]; then
if use templates; then
- for i in "${OO_EXTENSIONS[@]}"; do
+ for i in ${OO_EXTENSIONS[@]}; do
if [[ ! -f "${S}/${i}" ]]; then
cp -v "${DISTDIR}/${i}" "${S}"
ooextused+=( "${i}" )
@@ -121,8 +107,8 @@ libreoffice-l10n-2_src_unpack() {
fi
fi
OO_EXTENSIONS=()
- for i in "${ooextused[@]}"; do
- OO_EXTENSIONS+=( "${i}" )
+ for i in ${ooextused[@]}; do
+ OO_EXTENSIONS+=( ${i} )
done
}