PKGBUILD 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Maintainer (arch): Eli Schwartz <eschwartz@archlinux.org>
  2. # Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
  3. # Maintainer: Freemor <freemor@freemor.ca>
  4. # Contributor: Theo von Arx <theova@member.fsf.org>
  5. _pkgname=https-everywhere
  6. pkgname=iceweasel-${_pkgname}
  7. pkgver=2020.5.20
  8. pkgrel=1
  9. pkgdesc="Plugin for iceweasel which ensures you are using https whenever it's possible."
  10. arch=('any')
  11. url="https://www.eff.org/https-everywhere"
  12. license=('GPL3')
  13. groups=('iceweasel-addons')
  14. makedepends=("unzip")
  15. replaces=(firefox-extension-${_pkgname})
  16. source=("${_pkgname}-${pkgver}.xpi::https://www.eff.org/files/https-everywhere-${pkgver}-eff.xpi"
  17. "${_pkgname}-${pkgver}.xpi.sig::https://www.eff.org/files/https-everywhere-${pkgver}-eff.xpi.sig")
  18. noextract=("${_pkgname}-${pkgver}.xpi")
  19. sha256sums=('86b33a1e76ce369656f7a19ec930a0fb8c6d8828721cd8798c4d4f07931fb4a6'
  20. 'SKIP')
  21. b2sums=('f1ea90cc90e4ea148b396db81968ab4fc5ae8e13f1ba56a0da5ef7ae4e067d65f732db3886a847f0831c3588d7b9ec6b80368f56eb268c1ba44360ee3485e25f'
  22. 'SKIP')
  23. validpgpkeys=('1073E74EB38BD6D19476CBF8EA9DBF9FB761A677' # William Budington <bill@eff.org>
  24. 'CE340E9D077F1DC0F4FA7B030D16CFA2BA1F7420') # Alexis <alexis@eff.org>
  25. prepare() {
  26. cd "$srcdir"
  27. unzip -qqo "${_pkgname}-${pkgver}.xpi" -d "${_pkgname}-${pkgver}"
  28. }
  29. package() {
  30. depends=("iceweasel")
  31. cd "${srcdir}"
  32. if [[ -f ${_pkgname}-${pkgver}/install.rdf ]]; then
  33. _extension_id="$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' ${_pkgname}-${pkgver}/install.rdf)"
  34. else
  35. _extension_id="$(sed -n 's/.*"id": "\(.*\)".*/\1/p' ${_pkgname}-${pkgver}/manifest.json)"
  36. fi
  37. _extension_dest="${pkgdir}/usr/lib/iceweasel/browser/extensions/${_extension_id}"
  38. # Should this extension be unpacked or not?
  39. if grep -q '<em:unpack>true</em:unpack>' ${_pkgname}-${pkgver}/install.rdf 2>/dev/null; then
  40. install -dm755 "${_extension_dest}"
  41. cp -R ${_pkgname}-${pkgver}/* "${_extension_dest}"
  42. chmod -R ugo+rX "${_extension_dest}"
  43. else
  44. install -Dm644 ${_pkgname}-${pkgver}.xpi "${_extension_dest}.xpi"
  45. fi
  46. }