# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="2" inherit mozextension multilib DESCRIPTION="Extension required for play on www.quakelive.com" HOMEPAGE="http://www.quakelive.com/" #SRC_URI="http://cdn-assets.quakelive.com/cdn/quakelive2009081802/${PN}.xpi?v=0,1,0,256" SRC_URI="http://cdn-assets.quakelive.com/cdn/quakelive2009081802/${PN}.xpi" #LICENSE="?" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RDEPEND="|| ( >=www-client/mozilla-firefox-1.5.0.7 >=www-client/mozilla-firefox-bin-1.5.0.7 ) x11-libs/libXxf86dga virtual/opengl" DEPEND="${RDEPEND}" S=${WORKDIR} src_unpack() { xpi_unpack "${PN}".xpi } src_install() { local MOZILLA_FIVE_HOME xpiname x mozillas="" xpiname="${PN}" # FIXME: Hard-coded MOZILLA_FIVE_HOME dirs if has_version '>=www-client/mozilla-firefox-1.5.0.7'; then MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox" xpi_install "${S}/${xpiname}" mozillas="$(best_version www-client/mozilla-firefox) ${mozillas}" fi if has_version '>=www-client/mozilla-firefox-bin-1.5.0.7'; then MOZILLA_FIVE_HOME="/opt/firefox" xpi_install "${S}/${xpiname}" mozillas="$(best_version www-client/mozilla-firefox-bin) ${mozillas}" fi x=$(xpi_get_id "${S}/${xpiname}/install.rdf") if [ -f "${MOZILLA_FIVE_HOME}/extensions/${x})/chrome.manifest" ]; then einfo "chrome.manifest not present, touching..." touch "${MOZILLA_FIVE_HOME}/extensions/${x})/chrome.manifest" else einfo "chrome.manifest detected, continue..." fi } pkg_postinst() { ewarn "This plugin is in beta stage" ewarn "Report bugs at" ewarn "http://www.quakelive.com/forum/forumdisplay.php?f=27" elog "To use QuakeLivePlugin, you have to get an account at http://www.quakelive.com/" elog "QuakeLivePlugin has been installed for the following packages:" for i in ${mozillas}; do elog " $i" done }