# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.1 2011/09/05 08:25:58 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.2 2011/11/12 12:03:05 scarabeus Exp $
# @ECLASS: office-ext.eclass
# @AUTHOR:
*) die "EAPI=${EAPI} is not supported" ;;
esac
-EXPORT_FUNCTIONS ${OEXT_EXPORTED_FUNCTIONS}
-unset OEXT_EXPORTED_FUNCTIONS
-
inherit eutils multilib
UNOPKG_BINARY="${EPREFIX}/usr/bin/unopkg"
local tmpdir=$(mktemp -d --tmpdir="${T}")
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} add --shared \"${ext}\""
- ebegin "Adding extension: \"${ext}\""
+ ebegin "Adding office extension: \"${ext}\""
${UNOPKG_BINARY} add --shared "${ext}" \
"-env:UserInstallation=file:///${tmpdir}" \
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
local tmpdir=$(mktemp -d --tmpdir="${T}")
debug-print "${FUNCNAME}: ${UNOPKG_BINARY} remove --shared \"${ext}\""
- ebegin "Removing extension: \"${ext}\""
+ ebegin "Removing office extension: \"${ext}\""
${UNOPKG_BINARY} remove --shared "${ext}" \
"-env:UserInstallation=file:///${tmpdir}" \
"-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1"
eend $?
- flush_unopkg_cache
+ office-ext_flush_unopkg_cache
rm -rf "${tmpdir}"
}
# Install the extension source to the proper location.
office-ext_src_install() {
debug-print-function ${FUNCNAME} "$@"
+ debug-print "Extensions: ${OO_EXTENSIONS[@]}"
local i
# subshell to not pollute rest of the env with the insinto redefinition
(
- insinto $(openoffice-ext_get_implementation)/share/extension/install/
- for i in "${OO_EXTENSIONS[@]}"; do
+ dodir $(office-ext_get_implementation)/share/extension/install/
+ insinto $(office-ext_get_implementation)/share/extension/install/
+ for i in ${OO_EXTENSIONS[@]}; do
doins "${i}"
done
)
einfo "Remember that if you replace your office implementation,"
einfo "you need to recompile all the extensions."
einfo "Your current implementation location is: "
- einfo " $(openoffice-ext_get_implementation)"
+ einfo " $(office-ext_get_implementation)"
}
# @FUNCTION: office-ext_pkg_postinst
# Add the extensions to the libreoffice/openoffice.
office-ext_pkg_postinst() {
debug-print-function ${FUNCNAME} "$@"
+ debug-print "Extensions: ${OO_EXTENSIONS[@]}"
local i
- for i in "${OO_EXTENSIONS[$@]}"; do
- openoffice-ext_add_extension "${i}"
+ for i in ${OO_EXTENSIONS[@]}; do
+ office-ext_add_extension "$(office-ext_get_implementation)/share/extension/install/${i}"
done
}
# Remove the extensions from the libreoffice/openoffice.
office-ext_pkg_prerm() {
debug-print-function ${FUNCNAME} "$@"
+ debug-print "Extensions: ${OO_EXTENSIONS[@]}"
local i
- for i in "${OO_EXTENSIONS[@]}"; do
- openoffice-ext_remove_extension "${i}"
+ for i in ${OO_EXTENSIONS[@]}; do
+ office-ext_remove_extension "${i}"
done
}
+
+EXPORT_FUNCTIONS ${OEXT_EXPORTED_FUNCTIONS}
+unset OEXT_EXPORTED_FUNCTIONS