/[gentoo-x86]/eclass/mozextension.eclass
Gentoo

Diff of /eclass/mozextension.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.9
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.8 2013/04/05 15:27:40 floppym Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.9 2013/05/28 03:29:50 anarchy Exp $
4# 4#
5# @ECLASS: mozextension.eclass 5# @ECLASS: mozextension.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Mozilla team <mozilla@gentoo.org> 7# Mozilla team <mozilla@gentoo.org>
8# @BLURB: Install extensions for use in mozilla products. 8# @BLURB: Install extensions for use in mozilla products.
9 9
10 10
11inherit eutils 11inherit eutils
12 12
13DEPEND="app-arch/unzip" 13DEPEND="app-arch/unzip"
14
15mozversion_extension_location() {
16 case ${PN} in
17 firefox|firefox-bin)
18 if [[ $(get_version_component_range 1) -ge 21 ]] ; then
19 return 0
20 fi
21 ;;
22 esac
23
24 return 1
25}
14 26
15xpi_unpack() { 27xpi_unpack() {
16 local xpi xpiname srcdir 28 local xpi xpiname srcdir
17 29
18 # Not gonna use ${A} as we are looking for a specific option being passed to function 30 # Not gonna use ${A} as we are looking for a specific option being passed to function
51 x="${1}" 63 x="${1}"
52 cd ${x} 64 cd ${x}
53 # determine id for extension 65 # determine id for extension
54 emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \ 66 emid="$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${x}"/install.rdf)" \
55 || die "failed to determine extension id" 67 || die "failed to determine extension id"
68 if $(mozversion_extension_location) ; then
69 insinto "${MOZILLA_FIVE_HOME}"/browser/extensions/${emid}
70 else
56 insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid} 71 insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid}
72 fi
57 doins -r "${x}"/* || die "failed to copy extension" 73 doins -r "${x}"/* || die "failed to copy extension"
58} 74}

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20