[Pkg-mozext-maintainers] Bug#866997: Bug#866997: Sample script

Ximin Luo infinity0 at debian.org
Thu Dec 28 15:22:00 UTC 2017


Hey, thanks for your contribution. I think it's a bit untidy to add to mozilla-devscripts as-is, but I'll take the ideas for it and work on new patches to mozilla-devscripts.

Some more ideas are being discussed in this thread:

http://lists.alioth.debian.org/pipermail/pkg-mozext-maintainers/2017-December/006414.html

X

Amon Ott:
> This bash script puts Webextension .xpi files into the correct path for
> use with firefox, tested with noscript and adblock-plus so far:
> 
> #!/bin/bash
> if test -z "$1"
> then
>         echo "use: $0 packagebasename"
>         echo "e.g. adblock_plus to build package webext-adblock-plus
> from adblock_plus*.xpi"
>         exit 1
> fi
> 
> rm -rf debian/tmp
> xpi-unpack "${1}"*.xpi debian/tmp || exit 2
> IDSTRING="$(grep '\"id\"' debian/tmp/manifest.json |cut -d '"' -f 4)"
> test -n "$IDSTRING" || exit 3
> mkdir -p "debian/webext-${1//_/-}/usr/lib/firefox/browser/extensions" ||
> exit 4
> cp -a "${1}"*.xpi
> "debian/webext-${1//_/-}/usr/lib/firefox/browser/extensions/${IDSTRING}.xpi"
> || exit 5
> #rm -rf debian/tmp
> exit 0
> 
> 
> debian/rules example:
> 
> #!/usr/bin/make -f
> 
> override_dh_install:
>         mp_install_webex adblock_plus
> 
> %:
>         dh $@
> 
> 
> Amon Ott
> 


-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Pkg-mozext-maintainers mailing list