summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranck STAUFFER2020-08-06 18:04:26 +0200
committerFranck STAUFFER2020-08-06 18:04:26 +0200
commit9ed8595af70f66e1d2bb4da486d79a526212cc5f (patch)
tree6d69f0878773b1e1b749b03bc90844cb8c27259b
parent14030cee90416e53cf76d6d071d5c5bfc88574ca (diff)
downloadaur-9ed8595af70f66e1d2bb4da486d79a526212cc5f.tar.gz
Build from source
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD30
2 files changed, 28 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e766ebc729b..b9ebf87c9fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = firefox-extension-cookie-autodelete
pkgdesc = Firefox extension that automatically deletes cookies.
pkgver = 3.4.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Cookie-AutoDelete/Cookie-AutoDelete
arch = any
groups = firefox-addons
license = MIT
depends = firefox
- noextract = firefox-extension-cookie-autodelete-3.4.0.xpi
- source = firefox-extension-cookie-autodelete-3.4.0.xpi::https://github.com/Cookie-AutoDelete/Cookie-AutoDelete/releases/download/v3.4.0/Cookie-AutoDelete_v3.4.0_Firefox.xpi
- b2sums = af8eb3ea51363e5e132dfaa95b0e36e5bac1b87e8f085adee6493196e00591b2821e3f67a09f0454c8f5293df057d4f2d896bf374139eb5b732b046becaa2c8b
+ source = https://github.com/Cookie-AutoDelete/Cookie-AutoDelete/archive/v3.4.0.tar.gz
+ b2sums = 09fb14d9950982ab503c6f8489e6acd7435e1bc1a2f3815adde891021c17ffe243bb56687a8a940d1c08a66a273a965d4e0397c2c9940d10218751c317976494
pkgname = firefox-extension-cookie-autodelete
diff --git a/PKGBUILD b/PKGBUILD
index a737b509a40..d5b0e24c5f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,17 +2,37 @@
pkgname='firefox-extension-cookie-autodelete'
pkgver=3.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="Firefox extension that automatically deletes cookies."
license=('MIT')
arch=('any')
url="https://github.com/Cookie-AutoDelete/Cookie-AutoDelete"
depends=('firefox')
groups=('firefox-addons')
-source=("$pkgname-$pkgver.xpi::https://github.com/Cookie-AutoDelete/Cookie-AutoDelete/releases/download/v${pkgver}/Cookie-AutoDelete_v${pkgver}_Firefox.xpi")
-noextract=("$pkgname-$pkgver.xpi")
-b2sums=('af8eb3ea51363e5e132dfaa95b0e36e5bac1b87e8f085adee6493196e00591b2821e3f67a09f0454c8f5293df057d4f2d896bf374139eb5b732b046becaa2c8b')
+source=("https://github.com/Cookie-AutoDelete/Cookie-AutoDelete/archive/v$pkgver.tar.gz")
+b2sums=('09fb14d9950982ab503c6f8489e6acd7435e1bc1a2f3815adde891021c17ffe243bb56687a8a940d1c08a66a273a965d4e0397c2c9940d10218751c317976494')
+
+prepare() {
+ msg "Install npm dependencies"
+ npm --silent -C "Cookie-AutoDelete-$pkgver" install
+
+ msg "Fix vulnerabilities found in installed npm dependencies"
+ npm --silent -C "Cookie-AutoDelete-$pkgver" audit fix
+
+ # Force to build release for $pkgver
+ sed -i "s/let versionTag = process.env.GITHUB_REF || process.env.TRAVIS_TAG || '';/let versionTag = '$pkgver'/" "Cookie-AutoDelete-$pkgver/tools/buildFilesDev.js"
+ sed -i "s/let versionTag = process.env.GITHUB_REF || process.env.TRAVIS_TAG || '';/let versionTag = '$pkgver'/" "Cookie-AutoDelete-$pkgver/tools/replaceVersionNumber.js"
+ sed -i "s/3.999.999/$pkgver/" "Cookie-AutoDelete-$pkgver/extension/manifest.json"
+}
+
+build() {
+ npm --silent -C "Cookie-AutoDelete-$pkgver" run build
+}
package() {
- install -Dm644 "$pkgname-$pkgver.xpi" "$pkgdir/usr/lib/firefox/browser/extensions/CookieAutoDelete@kennydo.com.xpi"
+ cd "Cookie-AutoDelete-$pkgver"
+ install -Dm644 LICENSE "$pkgver/usr/share/licenses/$pkgname/LICENSE"
+
+ cd builds
+ install -Dm644 "Cookie-AutoDelete_${pkgver}_Firefox.xpi" "$pkgdir/usr/lib/firefox/browser/extensions/CookieAutoDelete@kennydo.com.xpi"
}