diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2017-11-23 14:33:13 -0500 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2017-11-23 14:33:23 -0500 |
commit | 573341008f21c6d1d406e91b70d541a451fac9cb (patch) | |
tree | 2dc7260df0fba426a21b1fbdc5fd234e34521708 | |
parent | thunderbird-52.5 initial commit (diff) | |
download | mozilla-573341008f21c6d1d406e91b70d541a451fac9cb.tar.gz mozilla-573341008f21c6d1d406e91b70d541a451fac9cb.tar.bz2 mozilla-573341008f21c6d1d406e91b70d541a451fac9cb.zip |
enigmail: make extension installation fully standalone
This change in the installation method allows thunderbird and seamonkey
to load enigmail without the need for any compile-time (and therefore
use-flag) dependency.
-rw-r--r-- | x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild (renamed from x11-plugins/enigmail/enigmail-1.9.8.3.ebuild) | 24 | ||||
-rw-r--r-- | x11-plugins/enigmail/enigmail-9999.ebuild | 19 |
2 files changed, 38 insertions, 5 deletions
diff --git a/x11-plugins/enigmail/enigmail-1.9.8.3.ebuild b/x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild index ff5e7f50..ac2762af 100644 --- a/x11-plugins/enigmail/enigmail-1.9.8.3.ebuild +++ b/x11-plugins/enigmail/enigmail-1.9.8.3-r1.ebuild @@ -24,7 +24,10 @@ RDEPEND="|| ( ) ) =app-crypt/gnupg-1.4* - )" + ) + !<=mail-client/thunderbird-52.5.0 + !<=mail-client/thunderbird-2.49.5.0_p0 + " DEPEND="${RDEPEND} ${PYTHON_DEPS} app-arch/zip @@ -40,8 +43,18 @@ src_compile() { } src_install() { - insinto /usr/share/${PN} - doins -r build/dist/{chrome,components,defaults,modules,wrappers,chrome.manifest,install.rdf} + local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' build/dist/install.rdf) + [[ -n ${emid} ]] || die "Could not scrape EM:ID from install.rdf" + + mv build/enigmail*.xpi build/"${emid}.xpi" || die 'Could not rename XPI to match EM:ID' + + # thunderbird + insinto "/usr/share/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}" + doins build/"${emid}.xpi" + + # seamonkey + insinto "/usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}" + doins build/"${emid}.xpi" } pkg_postinst() { @@ -53,4 +66,9 @@ pkg_postinst() { ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end" ;; esac + if [[ -n ${REPLACING_VERSIONS} ]]; then + elog "" + elog "Please restart thunderbird and/or seamonkey in order for them to use" + elog "the newly installed version of enigmail." + fi } diff --git a/x11-plugins/enigmail/enigmail-9999.ebuild b/x11-plugins/enigmail/enigmail-9999.ebuild index edffcc2d..ec95bc9f 100644 --- a/x11-plugins/enigmail/enigmail-9999.ebuild +++ b/x11-plugins/enigmail/enigmail-9999.ebuild @@ -44,8 +44,18 @@ src_compile() { } src_install() { - insinto /usr/share/${PN} - doins -r build/dist/{chrome,components,defaults,modules,wrappers,chrome.manifest,install.rdf} + local emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' build/dist/install.rdf) + [[ -n ${emid} ]] || die "Could not scrape EM:ID from install.rdf" + + mv build/enigmail*.xpi build/"${emid}.xpi" || die 'Could not rename XPI to match EM:ID' + + # thunderbird + insinto "/usr/share/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}" + doins build/"${emid}.xpi" + + # seamonkey + insinto "/usr/share/mozilla/extensions/{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}" + doins build/"${emid}.xpi" } pkg_postinst() { @@ -57,4 +67,9 @@ pkg_postinst() { ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end" ;; esac + if [[ -n ${REPLACING_VERSIONS} ]]; then + elog + elog "Please restart thunderbird and/or seamonkey in order for them to use" + elog "the newly installed version of enigmail." + fi } |