makedeb
Selectively disable javascript on Firefox.
Viewing /PKGBUILD
.
Click here to go back to the Git tree for webext-noscript-security-suite-firefox.
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# If your Firefox version doesn't support extracted webextentions
#_UNCOMPRESS=0
pkgname=webext-noscript-security-suite-firefox
_download_name="noscript"
pkgver=11.5.2
_fileid=('4379558')
pkgrel=0
pkgdesc='Selectively disable javascript on Firefox.'
arch=('all')
url='https://addons.mozilla.org/en-US/firefox/addon/noscript/'
license=('GPL2')
optdepends=('firefox' 'firefox-esr')
source=("https://addons.mozilla.org/firefox/downloads/file/$_fileid/noscript-${pkgver}.xpi")
noextract=("${_download_name}-${pkgver}.xpi")
extensions=()
b2sums=('00db74b11623133a657866b6aa93f61394ba683f51aa595ddc351aadda6ccede67e8cacd24c76cd4884391628c27820358699db7dc4449c3082f2f3e7fe6a3dd')
prepare() {
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() {
_mozilla_id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
_ext_id="{73a6fe31-595d-460b-a920-fcc0f8843232}"
_license_path="/usr/share/common-licenses/GPL-2"
install -dm755 "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id"
if [ -z "$_UNCOMPRESS" ];
then
mv "${srcdir}/$pkgname-${pkgver}" "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id/$_ext_id"
else
install -Dm644 "$_download_name-${pkgver}.xpi" "${pkgdir}/usr/share/mozilla/extensions/$_mozilla_id/$_ext_id.xpi"
fi
# Doc
install -dm755 "${pkgdir}/usr/share/doc/$pkgname"
ln -s "$_license_path" "${pkgdir}/usr/share/doc/$pkgname/"
}