From 7568bdfddb37356bf38abbd0ea89d751ef222bbd Mon Sep 17 00:00:00 2001 From: grimmlin Date: Mon, 26 Jan 2009 14:58:37 +0000 Subject: [PATCH] * Added custom mozextension eclass to provide support with id being email adresses * Added firebug --- eclass/mozextension-2.eclass | 54 ++++++++++++++++++++++++ x11-plugins/firebug/Manifest | 2 + x11-plugins/firebug/firebug-1.3.0.ebuild | 43 +++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 eclass/mozextension-2.eclass create mode 100644 x11-plugins/firebug/Manifest create mode 100644 x11-plugins/firebug/firebug-1.3.0.ebuild diff --git a/eclass/mozextension-2.eclass b/eclass/mozextension-2.eclass new file mode 100644 index 000000000..0b70579a1 --- /dev/null +++ b/eclass/mozextension-2.eclass @@ -0,0 +1,54 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/mozextension.eclass,v 1.4 2007/12/20 15:43:14 armin76 Exp $ +# +# mozextention.eclass: installing firefox extensions and language packs + +inherit eutils + +DEPEND="app-arch/unzip" + +xpi_unpack() { + local xpi xpiname srcdir + + # Not gonna use ${A} as we are looking for a specific option being passed to function + # You must specify which xpi to use + [[ -z "$*" ]] && die "Nothing passed to the $FUNCNAME command. please pass which xpi to unpack" + + for xpi in "$@"; do + einfo "Unpacking ${xpi} to ${PWD}" + xpiname=$(basename ${xpi%.*}) + + if [[ "${xpi:0:2}" != "./" ]] && [[ "${xpi:0:1}" != "/" ]] ; then + srcdir="${DISTDIR}/" + fi + + [[ -s "${srcdir}${xpi}" ]] || die "${xpi} does not exist" + + case "${xpi##*.}" in + ZIP|zip|jar|xpi) + mkdir "${WORKDIR}/${xpiname}" && \ + cd "${WORKDIR}/${xpiname}" && \ + unzip -qo "${srcdir}${xpi}" || die "failed to unpack ${xpi}" + ;; + *) + einfo "unpack ${xpi}: file format not recognized. Ignoring." + ;; + esac + done +} + + +xpi_install() { + local emid + + # You must tell xpi_install which xpi to use + [[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one argument, please specify an xpi to unpack" + + x="${1}" + cd ${x} + # determine id for extension + emid=$(sed -n -e '/<\?em:id>\?/!d; s/.*\([\"{].*[}\"]\).*/\1/; s/\"//g; s/.*\(.*\)<\/em:id>/\1/; p; q' ${x}/install.rdf) || die "failed to determine extension id" + insinto "${MOZILLA_FIVE_HOME}"/extensions/${emid} + doins -r "${x}"/* || die "failed to copy extension" +} diff --git a/x11-plugins/firebug/Manifest b/x11-plugins/firebug/Manifest new file mode 100644 index 000000000..3928fbd7b --- /dev/null +++ b/x11-plugins/firebug/Manifest @@ -0,0 +1,2 @@ +DIST firebug-1.3.0-fx.xpi 531598 RMD160 abd3f9529237e246752b6d552c52bfb1d89720c5 SHA1 9abb9f24e637db995fc3e3e0b65a6e2af371f8b0 SHA256 3961f4ad9898348b224afbe65764be94002a511000c8c0e057cb115c07527575 +EBUILD firebug-1.3.0.ebuild 1085 RMD160 5210071f919ed59ab49595267939afc78e8d5075 SHA1 4f6fabba74c4d8dc8ddfb19faaca097c76b847e3 SHA256 9656c32d95390b5fb5adce14893651162c59ad9b56ce44e42e7fbc70d7af6b1a diff --git a/x11-plugins/firebug/firebug-1.3.0.ebuild b/x11-plugins/firebug/firebug-1.3.0.ebuild new file mode 100644 index 000000000..745beac56 --- /dev/null +++ b/x11-plugins/firebug/firebug-1.3.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit mozextension-2 multilib eutils + +MY_P="${P}-fx" +DESCRIPTION="A Firefox extensions from the firecat framework." +HOMEPAGE="http://www.security-database.com/toolswatch/FireCAT-Firefox-Catalog-of,302.html" +SRC_URI="https://addons.mozilla.org/en-US/firefox/downloads/file/44490/${MY_P}.xpi" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="|| ( + >=www-client/mozilla-firefox-bin-3.0.0 + >=www-client/mozilla-firefox-3.0.0 +)" +DEPEND="${RDEPEND}" + +S="${WORKDIR}" + +src_unpack() { + xpi_unpack $A +# epatch "${FILESDIR}/${MY_P}.patch" +} + +src_compile () { + einfo "Nothing to compile" +} + +src_install () { + declare MOZILLA_FIVE_HOME + if has_version '>=www-client/mozilla-firefox-1.5.0.7'; then + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox" + xpi_install "${S}/${MY_P}" + fi + if has_version '>=www-client/mozilla-firefox-bin-1.5.0.7'; then + MOZILLA_FIVE_HOME="/opt/firefox" + emid="firebug@software.joehewitt.com" xpi_install "${S}/${MY_P}" + fi +}