# Maintainer: Joseph Benden pkgname=thunderbird-extension-enigmail pkgver=2.0.12 pkgrel=0 pkgdesc="OpenPGP message encryption and authentication for Thunderbird" url="https://www.enigmail.net/" arch="x86_64" license="MPL-2.0 AND GPL-3.0-or-later" depends="thunderbird gnupg" makedepends="zip python2 perl" options="!check" source="https://www.enigmail.net/download/source/enigmail-${pkgver}.tar.gz 0001-preferences-disable-pEpAutoDownload-by-default.patch" builddir="${srcdir}/enigmail" build() { ./configure make -j1 # fails with -j greater than 1 } package() { if [[ -f package/install.rdf ]]; then _extension_id="$(sed -n '/.*\(.*\)<\/em:id>.*/{s//\1/p;q}' build/dist/install.rdf)" else _extension_id="$(sed -n 's/.*"id": "\(.*\)".*/\1/p' build/dist/manifest.json)" fi _extension_dest="${pkgdir}/usr/lib/thunderbird/extensions/${_extension_id}" # Should this extension be unpacked or not? if grep -q 'true' build/dist/install.rdf 2>/dev/null; then install -dm755 "${_extension_dest}" cp -R build/dist/* "${_extension_dest}" chmod -R ugo+rX "${_extension_dest}" else install -Dm644 build/enigmail-${pkgver}.xpi "${_extension_dest}.xpi" fi } sha512sums="f9f4f1ed4c7244280be2fade0ccb2f4b5e7075dd60f53953478ffb84012e687b7ac7bad489c0b0cb2d8937916c783fe9e1841174bf1e5bdb9ab8cb58b415db74 enigmail-2.0.12.tar.gz 4307c7b6bce7febba7a8186467c3bc93ec3428e1cd75cddad659e4d4a71832f1c8d46e4c811da38ff1dc38b1961a82bd84e7c90b7c63ce080be49ce69571c016 0001-preferences-disable-pEpAutoDownload-by-default.patch"