www-plugins/passff: fix installation method.
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Fri, 15 Feb 2019 16:15:36 +0000 (17:15 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Sat, 16 Feb 2019 22:29:18 +0000 (23:29 +0100)
Closes: https://bugs.gentoo.org/677984
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
www-plugins/passff/metadata.xml
www-plugins/passff/passff-1.6.3.ebuild

index 234e183d237e8858d0e65531ecc25e70ba90f3f6..af94d61a3425bb5aaadd951e337f68be7add5d37 100644 (file)
@@ -8,10 +8,6 @@
        <email>proxy-maint@gentoo.org</email>
        <name>Proxy Maintainers</name>
 </maintainer>
-<use>
-       <flag name="firefox">Install plugin for <pkg>www-client/firefox</pkg></flag>
-       <flag name="firefox-bin">Install plugin for <pkg>www-client/firefox-bin</pkg></flag>
-</use>
 <upstream>
        <remote-id type="github">passff/passff</remote-id>
 </upstream>
index 884acd904a9573a68cd8c0330aac51bd13d9509c..80c02c29368a24967d70be464a4c564903957a4d 100644 (file)
@@ -3,8 +3,6 @@
 
 EAPI=7
 
-inherit mozextension
-
 MY_XPINAME="${P}-fx"
 
 DESCRIPTION="zx2c4 pass manager extension for Firefox"
@@ -14,26 +12,19 @@ SRC_URI="https://addons.mozilla.org/firefox/downloads/file/1681210/${MY_XPINAME}
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="firefox firefox-bin"
+IUSE=""
 
 RDEPEND="www-plugins/passff-host[firefox]"
-REQUIRED_USE="|| ( firefox firefox-bin )"
 
 S="${WORKDIR}"
 
 src_unpack() {
-       xpi_unpack "${MY_XPINAME}.xpi"
+       cp "${DISTDIR}/${MY_XPINAME}.xpi" . || die
 }
 
 src_install() {
-       local MOZILLA_FIVE_HOME
-       if use firefox; then
-               MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox"
-               xpi_install "${MY_XPINAME}"
-       fi
-
-       if use firefox-bin; then
-               MOZILLA_FIVE_HOME="/opt/firefox"
-               xpi_install "${MY_XPINAME}"
-       fi
+       # See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Distribution_options/Sideloading_add-ons#Installation_using_the_standard_extension_folders
+       insinto "/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/"
+       # passff@invicem.pro is the extension id found in the manifest.json
+       newins "${MY_XPINAME}.xpi" "passff@invicem.pro.xpi"
 }