2010-04-22

Revision 2 as of 2010-04-28 20:31:03

Clear message

   1 [19:00] <bdrung> hello
   2 [19:04] <bdrung> this session is about packaging xul extensions - that's extensions for firefox, thunderbird, etc.
   3 [19:05] <bdrung> we use mozilla-devscripts to package the extension.
   4 [19:05] <bdrung> i take libnotify-mozilla as example
   5 [19:06] <bdrung> you can find it on https://launchpad.net/libnotify-mozilla
   6 [19:07] <bdrung> the first thing we need to do is to get the source
   7 [19:07] <bdrung> you can find libnotify-mozilla-0.1.4-beta.xpi on the page. we will use this as source.
   8 [19:08] <bdrung> a xpi file is just a zip file.
   9 [19:09] <bdrung> we extract the xpi file with xpi-unpack (from mozilla-devscripts)
  10 [19:09] <bdrung> xpi-unpack libnotify-mozilla-0.1.4-beta.xpi libnotify-mozilla
  11 [19:10] <bdrung> now we create the orig source tarball:
  12 [19:10] <bdrung> tar -acf libnotify-mozilla_0.1.4.orig.tar.gz libnotify-mozilla
  13 === yofel_ is now known as yofel
  14 [19:11] <bdrung> now we switch into the libnotify-mozilla directory and create a debian directory in there
  15 [19:11] <bdrung> now we create a changelog file
  16 [19:11] <bdrung> dch --create --package libnotify-mozilla --newversion 0.1.4-0ubuntu1 "Initial release."
  17 [19:12] <bdrung> we create a compat file: echo 7 > debian/compat
  18 [19:14] <bdrung> in the realworld we have to write a debian/copyright file. for this example we just create a empty file
  19 [19:14] <bdrung> can you follow me?
  20 [19:15] <bdrung> now we come to the interesting part
  21 [19:16] <bdrung> we create a debian/control file with this content: http://paste.ubuntu.com/420579/
  22 [19:17] <bdrung> the explanation to this file:
  23 [19:17] <bdrung> the binary package name is created by stripping mozilla from the source name and to prepend xul-ext-
  24 [19:18] <bdrung> which version of mozilla-devscripts you need is described in http://wiki.debian.org/mozilla-devscripts
  25 [19:18] <bdrung> ${xpi:Recommends}, ${xpi:Provides}, ${xpi:Enhances} is generated by dh_xul-ext
  26 [19:18] <bdrung> question to this file?
  27 [19:23] <bdrung> now we create debian/rules: one target called % with this command "dh --with xul-ext --buildsystem=xul_ext $@"
  28 [19:23] <bdrung> it look like this: http://paste.ubuntu.com/420586/
  29 [19:25] <bdrung> what does this rule do?
  30 [19:26] <bdrung> --with xul-ext is responsible to call dh_xul-ext after installation
  31 [19:27] <bdrung> --buildsystem=xul_ext creates the xpi file and installs this xpi file
  32 [19:27] <bdrung> on build "xpi-pack . xul-ext-libnotify.xpi" will be called
  33 [19:27] <bdrung> on install "install-xpi xul-ext-libnotify.xpi"  will be called
  34 [19:28] <bdrung> on clean "rm -f xul-ext-libnotify.xpi" will be called
  35 [19:29] <bdrung> now we build the package with debuild
  36 [19:30] <bdrung> questions?
  37 [19:34] <bdrung> no questions?
  38 [19:36] <bdrung> you can find more examples on http://wiki.debian.org/mozilla-devscripts
  39 [19:38] <bdrung> and in the man pages from xpi-pack, xpi-unpack, xpi-repack, dh_xul-ext, install-xpi
  40 [19:40] <bdrung> if you will have questions later, you can find me on various ubuntu channel, for example #ubuntu-mozillateam
  41 [19:41] <bdrung> thanks for listening


CategoryPackaging