diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2012-05-09 16:12:16 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2012-05-09 16:12:16 +0000 |
commit | 9f099ba6bc9bdd939603ac0986f765abf065cadb (patch) | |
tree | 0de119999832b7904abf93d4d94adfde033ffaa1 /eclass/office-ext.eclass | |
parent | unmask useflags depending on gnome-keyring and mask gnome-base/libgnome-keyri... (diff) | |
download | gentoo-2-9f099ba6bc9bdd939603ac0986f765abf065cadb.tar.gz gentoo-2-9f099ba6bc9bdd939603ac0986f765abf065cadb.tar.bz2 gentoo-2-9f099ba6bc9bdd939603ac0986f765abf065cadb.zip |
Add the src_unpack phase for office-ext eclass.
Diffstat (limited to 'eclass/office-ext.eclass')
-rw-r--r-- | eclass/office-ext.eclass | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/eclass/office-ext.eclass b/eclass/office-ext.eclass index 6ae9c739279b..153661321c9a 100644 --- a/eclass/office-ext.eclass +++ b/eclass/office-ext.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.2 2011/11/12 12:03:05 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/office-ext.eclass,v 1.3 2012/05/09 16:12:16 scarabeus Exp $ # @ECLASS: office-ext.eclass # @AUTHOR: @@ -12,7 +12,7 @@ # Eclass for easing maitenance of libreoffice/openoffice extensions. case "${EAPI:-0}" in - 4) OEXT_EXPORTED_FUNCTIONS="src_install pkg_postinst pkg_prerm" ;; + 4) OEXT_EXPORTED_FUNCTIONS="src_unpack src_install pkg_postinst pkg_prerm" ;; *) die "EAPI=${EAPI} is not supported" ;; esac @@ -32,6 +32,25 @@ fi DEPEND="virtual/ooo" RDEPEND="virtual/ooo" +# Most projects actually do not provide any workdir and we do not unpack the +# .oxt file at all. +S="${WORKDIR}" + +# @FUNCTION: office-ext_src_unpack +# @DESCRIPTION: +# Flush the cache after removal of an extension. +office-ext_src_unpack() { + debug-print-function ${FUNCNAME} "$@" + local i + + default + + for i in ${OO_EXTENSIONS[@]}; do + debug-print "${FUNCNAME}: cp -v \"${DISTDIR}/${i}\" \"${S}\"" + cp -v "${DISTDIR}/${i}" "${S}" || die + done +} + # @FUNCTION: office-ext_flush_unopkg_cache # @DESCRIPTION: # Flush the cache after removal of an extension. |