summaryrefslogtreecommitdiff
path: root/libre/icedove-extension-enigmail/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/icedove-extension-enigmail/PKGBUILD')
-rw-r--r--libre/icedove-extension-enigmail/PKGBUILD47
1 files changed, 33 insertions, 14 deletions
diff --git a/libre/icedove-extension-enigmail/PKGBUILD b/libre/icedove-extension-enigmail/PKGBUILD
index 974f23652..fde4788f8 100644
--- a/libre/icedove-extension-enigmail/PKGBUILD
+++ b/libre/icedove-extension-enigmail/PKGBUILD
@@ -8,12 +8,20 @@
# Contributor (Arch): Hinrich Harms <arch hinrich de>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+# parabola changes and rationale:
+# * allow building arch-dependent versioned packages
+# * apply dependency version constraints
+
+
_pkgname=thunderbird-extension-enigmail
pkgname=icedove-extension-enigmail
-pkgver=2.0.9
+_pkgver_x86_64=2.1.3 # this is actually an 'any' package
+_pkgver_i686=2.0.9 # but our different arches do not always roll at the same speed
+_pkgver_armv7h=2.0.9
+eval "pkgver=\$_pkgver_${CARCH}"
pkgrel=1
pkgdesc="OpenPGP message encryption and authentication for Icedove"
-arch=('any')
+arch=('armv7h' 'i686' 'x86_64')
url="https://www.enigmail.net/"
license=('MPL' 'GPL3')
makedepends=('zip' 'python2' 'perl')
@@ -22,11 +30,22 @@ conflicts=($_pkgname)
provides=($_pkgname)
source=("https://www.enigmail.net/download/source/enigmail-${pkgver}.tar.gz"{,.asc}
"0001-preferences-disable-pEpAutoDownload-by-default.patch")
-sha512sums=('2053148b0e5e763dfc1f8decff0fea2a40ebd306e4844440bd9a3ced4e1f7ff2f16bccf72f85e73b7c51b40629489ad125b9bc166558e3b4144038ba45fcb197'
+sha512sums=('270c46c282af9e8770ea509c55b0bc315ce715839b1751aa1a0b1ed8374e7ec93333bf8a6d4112adcbacc526d481ad2b276dc12099c48cc9c22fc8409de8d6d0'
'SKIP'
- '4307c7b6bce7febba7a8186467c3bc93ec3428e1cd75cddad659e4d4a71832f1c8d46e4c811da38ff1dc38b1961a82bd84e7c90b7c63ce080be49ce69571c016')
+ 'baebd963400574db89be747a4419534f945bdc64136d4014656ff98a9615a23984bca724da3f3840670979aab08ce441eee067921e21d0cb216938a20ed785b2')
validpgpkeys=('4F9F89F5505AC1D1A260631CDB1187B9DD5F693B') # Patrick Brunschwig <patrick@enigmail.net>
+
+_version_constraint() # (dep_pkgname)
+{
+ local dep_pkgname=$1
+ local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
+ version=${version%-*}
+ local version_inc=${version%.*}.$(( ${version##*.} + 1 ))
+
+ echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
+}
+
prepare() {
cd "${srcdir}"/enigmail
@@ -39,26 +58,26 @@ build() {
cd "${srcdir}"/enigmail
./configure
- # https://gitlab.com/enigmail/enigmail/merge_requests/34
- make -j1 XPI_MODULE_VERS=${pkgver} # fails with -j greater than 1
+ make -j1 # fails with -j greater than 1
}
package() {
- depends=('icedove' 'gnupg')
cd "${srcdir}"/enigmail
- if [[ -f package/install.rdf ]]; then
- _extension_id="$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' build/dist/install.rdf)"
- else
- _extension_id="$(sed -n 's/.*"id": "\(.*\)".*/\1/p' build/dist/manifest.json)"
+ depends+=( $(_version_constraint 'icedove') \
+ $(_version_constraint 'gnupg' ) )
+
+ if ! _extension_id="$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' build-tb/dist/install.rdf 2>/dev/null)" ||
+ [[ -z $_extension_id ]]; then
+ _extension_id="$(sed -n 's/.*"id": "\(.*\)".*/\1/p' build-tb/dist/manifest.json)"
fi
_extension_dest="${pkgdir}/usr/lib/icedove/extensions/${_extension_id}"
# Should this extension be unpacked or not?
- if grep -q '<em:unpack>true</em:unpack>' build/dist/install.rdf 2>/dev/null; then
+ if grep -q '<em:unpack>true</em:unpack>' build-tb/dist/install.rdf 2>/dev/null; then
install -dm755 "${_extension_dest}"
- cp -R build/dist/* "${_extension_dest}"
+ cp -R build-tb/dist/* "${_extension_dest}"
chmod -R ugo+rX "${_extension_dest}"
else
- install -Dm644 build/enigmail-${pkgver}.xpi "${_extension_dest}.xpi"
+ install -Dm644 build-tb/enigmail-${pkgver}.xpi "${_extension_dest}.xpi"
fi
}