makedeb


webext-localcdn-firefox 2.6.76-0


Emulates remote frameworks and delivers them as local resource, extension for Firefox.

Click here to go back to the commit logs for webext-localcdn-firefox.

Commit:


Hash: 2ff5e4c302c7ff28e0df3bf95e39eb3cb630a355

Message: 2.6.75

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 980a888..47c4548 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,17 +3,14 @@ pkgname = webext-localcdn-firefox
 pkgbase = webext-localcdn-firefox
 pkgdesc = Emulates remote frameworks and delivers them as local resource, extension for Firefox.
 pkgrel = 0
-pkgver = 2.6.74
+pkgver = 2.6.75
 url = https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes/
 arch = all
 license = MPL2
-noextract = localcdn_fork_of_decentraleyes-2.6.74.xpi
+noextract = localcdn_fork_of_decentraleyes-2.6.75.xpi
 optdepends = firefox
 optdepends = firefox-esr
-options = !strip
-source = https://addons.mozilla.org/firefox/downloads/file/4364493/localcdn_fork_of_decentraleyes-2.6.74.xpi
-b2sums = f63e9b18188eeae289a567f5b2268aa34d8b30935134cfd62e4be72b4c0d58ecaf943d4485411e185543e22263280276dd1f98f7ac1bbc7bd16959ea69928b45
+source = https://addons.mozilla.org/firefox/downloads/file/4380944/localcdn_fork_of_decentraleyes-2.6.75.xpi
+b2sums = f2fe0fcedb7b8eb2e4059debc04fb366f48c296329746d5fb4c227f5970d88b6ac9813d89002623a0875b7ae0c12c8f6b4a2eed7216c844808dc9ca35e722fc1
 optdepends = firefox
 optdepends = firefox-esr
-optmakedepends = unzip: to uncompress the webextention
-optmakedepends = unzip: to uncompress the webextention
diff --git a/PKGBUILD b/PKGBUILD
index 05f376c..d230e92 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,28 @@
 #_UNCOMPRESS=0
 pkgname=webext-localcdn-firefox
 _download_name="localcdn_fork_of_decentraleyes"
-pkgver=2.6.74
-_fileid=('4364493')
+pkgver="2.6.75"
+_fileid=('4380944')
 pkgrel=0
 pkgdesc='Emulates remote frameworks and delivers them as local resource, extension for Firefox.'
 arch=('all')
 url='https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes/'
 license=('MPL2')
-optmakedepends=("unzip: to uncompress the webextention")
 optdepends=('firefox' 'firefox-esr')
 source=("https://addons.mozilla.org/firefox/downloads/file/$_fileid/localcdn_fork_of_decentraleyes-${pkgver}.xpi")
 noextract=("${_download_name}-${pkgver}.xpi")
-options=('!strip')
-b2sums=('f63e9b18188eeae289a567f5b2268aa34d8b30935134cfd62e4be72b4c0d58ecaf943d4485411e185543e22263280276dd1f98f7ac1bbc7bd16959ea69928b45')
+extensions=()
+b2sums=('f2fe0fcedb7b8eb2e4059debc04fb366f48c296329746d5fb4c227f5970d88b6ac9813d89002623a0875b7ae0c12c8f6b4a2eed7216c844808dc9ca35e722fc1')
 
 prepare() {
- [ -z "$_UNCOMPRESS" ] && unzip -u "$_download_name-${pkgver}.xpi" -d "${srcdir}/$pkgname-${pkgver}" || :
+  if [ -z "$_UNCOMPRESS" ];
+  then
+    # clean
+    rm -Rf "${pkgname}-${pkgver}"
+    # extract
+    install -dm755 "${srcdir}/$pkgname-${pkgver}"
+    bsdtar -xf "$_download_name-${pkgver}.xpi" -C "${srcdir}/$pkgname-${pkgver}"
+  fi
 }
 
 package() {
diff --git a/update b/update
new file mode 100755
index 0000000..f9bad54
--- /dev/null
+++ b/update
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+versionfile="$(wget  -o /dev/null -O- https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes | grep -m 1 xpi | sed 's!.*/firefox/downloads/file/!!;s!\.xpi.*!!;s!/.*-!|!')"
+
+version="$(echo "$versionfile" | cut -d '|' -f 2)"
+echo "$version"
+
+fileid="$(echo "$versionfile" | cut -d '|' -f 1)"
+echo "$fileid"
+
+wget -c "https://addons.mozilla.org/firefox/downloads/file/$fileid/localcdn_fork_of_decentraleyes-${version}.xpi"
+hash="$(b2sum "localcdn_fork_of_decentraleyes-${version}.xpi" | cut -d ' ' -f 1)"
+echo "$hash"
+
+sed -i "s!pkgver=.*!pkgver=\"$version\"!;""s!_fileid=.*!_fileid=\(\'$fileid\'\)!;s!b2sums=.*!b2sums=\(\'$hash\'\)!" PKGBUILD
+