summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-04-12 19:27:08 +0300
committerBlackNoxis <steven.darklight@gmail.com>2015-04-12 19:27:08 +0300
commit903ff82fb42eda2857f47657c37bdbb911986cbe (patch)
treefe15839a0c4946d2620bddb30a286ab89453fdc8 /eclass
parenta7d46835589d6f8d584f40ac191c50edd11ebb96 (diff)
[eclass] fixed syntaxes from eclasses
Diffstat (limited to 'eclass')
-rw-r--r--eclass/libreoffice-l10n-2.eclass68
-rw-r--r--eclass/rogentos-artwork.eclass6
2 files changed, 44 insertions, 30 deletions
diff --git a/eclass/libreoffice-l10n-2.eclass b/eclass/libreoffice-l10n-2.eclass
index e57c83ce..cea31107 100644
--- a/eclass/libreoffice-l10n-2.eclass
+++ b/eclass/libreoffice-l10n-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 2004-2012 Sabayon Linux
+# Copyright 2004-2014 Sabayon Linux
# Distributed under the terms of the GNU General Public License v2
# $
@@ -11,13 +11,13 @@ OO_EXTENSIONS=(
"b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt"
)
-inherit base rpm multilib versionator office-ext-r1
+inherit base rpm multilib versionator
MY_LANG=${PN/libreoffice-l10n-/}
MY_LANG=${MY_LANG/_/-}
# export all the available functions here
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst pkg_prerm
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
# @ECLASS-VARIABLE: L10N_LANG
# @DESCRIPTION:
@@ -36,22 +36,48 @@ LANGPACK_AVAIL="${LANGPACK_AVAIL:-1}"
DESCRIPTION="LibreOffice.org ${L10N_LANG} localisation"
HOMEPAGE="http://www.documentfoundation.org"
-RESTRICT="nomirror"
+RESTRICT="mirror"
L10N_VER="$(get_version_component_range 1-3)"
-L10N_RC_VERSION="rc2"
+L10N_RC_VERSION="$(get_version_component_range 4)"
LO_BRANCH=$(get_version_component_range 1-2)
-BASE_SRC_URI="http://download.documentfoundation.org/libreoffice/stable/${L10N_VER}/rpm"
+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
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
+
+# remove "name_part" when not needed
+if [[ ${PV} = 4.2.6.* || ${PV} = 4.2.6 ]]; then
+ name_part=-secfix
+else
+ name_part=
+fi
+
# try guessing
if [ "${LANGPACK_AVAIL}" = "1" ]; then
- SRC_URI+="${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_langpack-rpm_${MY_LANG}.tar.gz"
+ SRC_URI+="${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}${name_part}_Linux_x86_${RPM_SUFFIX_LANG}_${MY_LANG}.tar.gz"
fi
if [ "${HELPPACK_AVAIL}" = "1" ]; then
- SRC_URI+=" ${BASE_SRC_URI}/x86/LibO_${L10N_VER}_Linux_x86_helppack-rpm_${MY_LANG}.tar.gz"
+ SRC_URI+=" ${BASE_SRC_URI}/x86/${URI_PREFIX}_${TARBALL_VERSION}${name_part}_Linux_x86_${RPM_SUFFIX_HELP}_${MY_LANG}.tar.gz"
fi
+unset name_part
+
IUSE=""
EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
@@ -83,22 +109,20 @@ 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="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_langpack-rpm_${dir}/RPMS/"
- [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
+ rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_LANG}_${dir}/RPMS/"
# 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="LibO_${L10N_VER}${L10N_RC_VERSION}_Linux_x86_helppack-rpm_${dir}/RPMS/"
- [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
+ rpmdir="${URI_PREFIX}_${TARBALL_VERSION}"*"_Linux_x86_${RPM_SUFFIX_HELP}_${dir}/RPMS/"
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}" )
@@ -107,8 +131,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
}
@@ -126,14 +150,4 @@ libreoffice-l10n-2_src_install() {
fi
# remove extensions that are in the l10n for some weird reason
rm -rf "${ED}"/usr/$(get_libdir)/libreoffice/share/extensions/
-
- echo "${OO_EXTENSIONS[@]}"
- office-ext_src_install
-}
-
-libreoffice-l10n-2_pkg_postinst() {
- office-ext_pkg_postinst
-}
-libreoffice-l10n-2_pkg_prerm() {
- office-ext_pkg_prerm
}
diff --git a/eclass/rogentos-artwork.eclass b/eclass/rogentos-artwork.eclass
index 6a74a673..33a84601 100644
--- a/eclass/rogentos-artwork.eclass
+++ b/eclass/rogentos-artwork.eclass
@@ -44,14 +44,14 @@ update_kernel_initramfs_splash() {
}
-# @FUNCTION: update_sabayon_kernel_initramfs_splash
-# @USAGE: update_sabayon_kernel_initramfs_splash
+# @FUNCTION: _update_kogaionkernel_initramfs_splash
+# @USAGE: _update_kogaionkernel_initramfs_splash
#
# @AUTHOR:
# Fabio Erculiani
# @MAINTAINER:
# Brindusa Stefan Cristian
-update_sabayon_kernel_initramfs_splash() {
+_update_kogaionkernel_initramfs_splash() {
local splash_name="${GFX_SPLASH_NAME}"
local override_splash_file="${ROOT}etc/${splash_name}"
if [ -f "${override_splash_file}" ]; then