[Pkg-mozext-maintainers] Bug#866997: Packaging WebExtensions

Ximin Luo infinity0 at debian.org
Thu Dec 28 17:27:00 UTC 2017


Ximin Luo:
> I think it's best to have a debhelper "--with webext --buildsystem webext" to standardise this, just to maintain some consistency across different packages, and to avoid newbies getting confused. I'll have a go at doing this in mozilla-devscripts.
> 
> Perhaps we can have a debian/install-webext file to list the $applications, to install symlinks under /usr/share/$applications/extensions/.
>
Here's my attempt:
https://anonscm.debian.org/cgit/pkg-mozext/mozilla-devscripts.git/commit/?h=pu/webext

It can be used like this (only --with, no --buildsystem is needed):
https://anonscm.debian.org/cgit/pkg-mozext/tree-style-tab.git/commit/?h=pu/webext

Extensions are installed into /usr/share/webext then symlinked into relevant application directories.

It reads manifest.json to determine which apps are supported, as described in [3][4]. Chromium support is currently detected using "minimum_chrome_version", if your extension doesn't have this then you need to echo "chromium" > debian/install-webext.

It will write ${webext:Enhances} and ${webext:Provides} but not yet Depends/Recommends/Breaks.

More "fancy" stuff like auto-dropping configs in /etc (as what install-xpi does) are not yet supported.

[3] https://developer.chrome.com/extensions/manifest
[4] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications

>> * What is about extensions that support both browsers, but with different
>> builds?

This is not yet supported, one would have to write a custom debian/rules file for that.

But the current functionality should already be enough to support [2], keeping its existing layout.

>> [1]: https://developer.mozilla.org/en-US/Add-ons/Install_Manifests
>> [2]: https://github.com/snoack/mypass/tree/master/debian
> 
override_dh_webext:
	dh_webext extension/

Please let me know how this fits with your plans, and if there are no objections I'll do an upload to Debian unstable so packages can start using it.

X

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



More information about the Pkg-mozext-maintainers mailing list