diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f92310577a1d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,28 @@ +# +# Based on PKGBUILD firefox-extension-shumway and firefox-extension-adblock-plus + +_plugin_name=self-destructing-cookies +pkgname=firefox-extension-${_plugin_name} +pkgdesc="Gets rid of a site's cookies and LocalStorage as soon as you close its tabs. Protects against trackers and zombie-cookies." +pkgver=0.4.10 +pkgrel=1 +arch=('any') +url="https://mozilla.github.io/${_plugin_name}/" +makedepends=('unzip' ) +depends=("firefox") +license=('GPL2') +source=("${pkgname}-${pkgver}.xpi::https://addons.mozilla.org/firefox/downloads/latest/self-destructing-cookies/addon-415846-latest.xpi" ) +sha1sums=('SKIP') # skip check because this changes rapidly +noextract=("${pkgname}-${pkgver}.xpi") + +pkgver(){ + unzip -p ${pkgname}-${pkgver}.xpi package.json | grep -m1 version | awk -F: '{ print $2 }' | sed 's/[", ]//g' +} + +package(){ + srcxpi="${srcdir}/${pkgname}-${pkgver}.xpi" + emid=$(unzip -p "$srcxpi" install.rdf | sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}') + + + install -Dm644 "$srcxpi" "${pkgdir}/usr/lib/firefox/browser/extensions/$emid.xpi" +} |