[Pkg-xen-devel] [patch] Packages ocaml libraries

Thomas Goirand zigo at debian.org
Wed Aug 31 15:31:19 UTC 2011


On 08/30/2011 09:44 PM, Ian Campbell wrote:
> I still don't think this can be right. Surely every Ocaml packages
> doesn't open code a bunch of install runes like this (not to mention the
> corresponding "find ... -delete" like you have below). It'd be a
> maintenance nightmare.
> 
> Looking at the ocaml-taglib source (picked at random) it appears that at
> least one viable option for doing this properly is to use the dh_install
> functionality which lets you specify a different target directory to
> where the file is found in the staging dir. i.e.
> debian/libtaglib-ocaml.install.in contains:
> 	@OCamlStdlibDir@/taglib/dlltaglib_stubs.so @OCamlDllDir@
> 
> In any case I think whatever solution you come up with should be
> reviewed by the pkg-ocaml team as well as this list.

Hi,

I have asked for help from the Ocaml team, in #debian-ocaml. Mehdi has
been of great help, and he explained me lots of things. I think I got it
a lot better this time.

I have attached a new patch against the current Xen in SID (eg:
4.1.1-2). What I did is that in the debian folder, once Xen is built
once, you can do: cd debian && ./find_ocaml_libs, and it will print the
content that we should put in debian/libxen-ocam[dev].install.in. That
small shell script is just a hackish helper that I used to make sure I
wouldn't forget any file, so I didn't feel comfortable setting it up at
build time, but I think it's ok to ship it in our source package for
later reference (in case a new OCaml lib is later added in upstream source).

Then, once we got debian/libxen-ocaml.install.in and
debian/libxen-ocaml-dev.install.in, we have dh_ocamlinit that does the
magic of the variable substitutions using sed, and finally dh_install
does the rest.

"dh_ocamlinit -d" takes care of deleting leftovers from dh_ocamlinit.

Altogether, the patch looks a lot cleaner. Thanks for insisting so that
I would do it right, and thanks to Medhi for his help yesterday evening.

> Isn't there supposed to be a new Build-Depends on some ocaml stuff
> somewhere?

Yup, I forgot these. This patch also add them.

I have set debian-ocaml-maint at lists.debian.org as Cc: to this email, in
the hope that the Debian OCaml task force can have a last look on my
work. I'd appreciate comments, and I hope I didn't do mistakes this
time. Please keep in mind that I don't know much about OCaml...

Thomas Goirand (zigo)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ocaml_2.diff
Type: text/x-diff
Size: 13626 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20110831/b5e89487/attachment.diff>


More information about the Pkg-xen-devel mailing list