diff options
Diffstat (limited to 'libre/icedove-extension-enigmail/PKGBUILD')
-rw-r--r-- | libre/icedove-extension-enigmail/PKGBUILD | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/libre/icedove-extension-enigmail/PKGBUILD b/libre/icedove-extension-enigmail/PKGBUILD index 38264e55c..edece235d 100644 --- a/libre/icedove-extension-enigmail/PKGBUILD +++ b/libre/icedove-extension-enigmail/PKGBUILD @@ -18,9 +18,10 @@ pkgname=icedove-extension-enigmail _pkgver_x86_64=2.1.6 _pkgver_i686=2.1.6 _pkgver_armv7h=2.1.6 -_pkgrel_x86_64=2 -_pkgrel_i686=2 +_pkgrel_x86_64=3 +_pkgrel_i686=3 _pkgrel_armv7h=2 +_icedove_epoch=1 eval "pkgver=\$_pkgver_${CARCH}" # this is actually an 'any' package eval "pkgrel=\$_pkgrel_${CARCH}" # but our different arches do not always roll at the same speed pkgdesc="OpenPGP message encryption and authentication for Icedove" @@ -52,15 +53,18 @@ _version_constraint() # (dep_pkgname) local full_version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1) if [[ -z "${full_version}" ]] || [[ "${full_version}" =~ ' ' ]] - then echo "ERROR: _version_constraint() full_version='${full_version}'" >&2 + then echo "ERROR: _version_constraint() dep_pkgname=${dep_pkgname} full_version='${full_version}'" >&2 exit 1 else local version=${full_version%-*} local version_inc=${version%.*}.$(( ${version##*.} + 1 )) + local constraint_string="${dep_pkgname}>=${version} ${dep_pkgname}<${version_inc}" - echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}" + echo "applied version constraint: ${constraint_string}" >&2 + echo -n "${constraint_string}" fi } + prepare() { cd "${srcdir}"/enigmail @@ -79,8 +83,18 @@ build() { package() { cd "${srcdir}"/enigmail - depends+=( $(_version_constraint 'icedove') \ - $(_version_constraint 'gnupg' ) ) + # dependency version contraints + local min_max_icedove_vers=( $(grep strict_.*_version build-tb/dist/manifest.json | sed 's|.*: "\([0-9]*\)\..*|\1|g') ) + local min_icedove_ver=${min_max_icedove_vers[0]} + local max_icedove_ver=${min_max_icedove_vers[1]} + local icedove_constraint_string="icedove>=${_icedove_epoch}:${min_icedove_ver} icedove<${_icedove_epoch}:$(( max_icedove_ver + 1 ))" + local gnupg_constraint_string="$(_version_constraint 'gnupg')" + if (( ${min_icedove_ver} + 0 )) && (( ${max_icedove_ver} + 0 )) + then depends+=( ${icedove_constraint_string} ${gnupg_constraint_string} ) + echo "applied version constraint: icedove>=${min_icedove_ver} icedove<$(( max_icedove_ver + 1 ))" + else echo "ERROR: failed to parse icedove version from manifest.json min_icedove_ver='${min_icedove_ver}'" >&2 + return 1 + fi 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 |