[Pkg-xen-devel] [PATCH 9/9] Create 2 ocaml packages, libxen-ocaml-4.1 and libxen-ocaml-dev.

Bastian Blank waldi at debian.org
Wed Oct 26 12:34:35 UTC 2011


On Tue, Oct 25, 2011 at 01:37:29PM +0100, Jon Ludlam wrote:
> diff --git a/xen/debian/libxen-dev.install b/xen/debian/libxen-dev.install
> index 9d00a07..5e05540 100644
> --- a/xen/debian/libxen-dev.install
> +++ b/xen/debian/libxen-dev.install
> @@ -2,4 +2,6 @@ usr/lib/{libxenctrl.a,libxenguest.a}
>  usr/lib/libxenstore.{a,so}
>  usr/include/{xenctrl.h,xenguest.h}
>  usr/include/{xs.h,xs_lib.h}
> +usr/include/xentoollog.h
> +usr/include/xenctrlosdep.h
>  usr/include/xen

I think this is unrelated.

> diff --git a/xen/debian/libxen-ocaml-dev.install b/xen/debian/libxen-ocaml-dev.install
> new file mode 100644
> index 0000000..a9f22f6
> --- /dev/null
> +++ b/xen/debian/libxen-ocaml-dev.install
> @@ -0,0 +1,2 @@
> +/usr/lib/xen-4.1/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/*.cm{i,x,xa}
> +/usr/lib/xen-4.1/lib/ocaml/{xenlight,xenbus,xenctrl,xenstore,xeneventchn,xenmmap}/*.a

Brace-expansion, don't use it.

> diff --git a/xen/debian/rules.real b/xen/debian/rules.real
> index 1252ec2..0711dad 100644
> --- a/xen/debian/rules.real
> +++ b/xen/debian/rules.real
> @@ -1,7 +1,11 @@
> +include /usr/share/ocaml/ocamlvars.mk
> +
>  DEB_HOST_ARCH     := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_ARCH)
>  DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -a$(ARCH) -qDEB_HOST_GNU_TYPE)
>  DEB_BUILD_ARCH    := $(shell dpkg-architecture -a$(ARCH) -qDEB_BUILD_ARCH)
>  
> +GENCONTROL_ARGS   := -VF:OCamlABI="$(OCAML_ABI)"
> +
>  export DH_OPTIONS
>  
>  setup_env := env -u ARCH -u FLAVOUR -u VERSION -u MAKEFLAGS
> @@ -17,6 +21,8 @@ binary-arch-arch: install-lib-dev_$(ARCH)
>  binary-arch-arch: install-libxenstore_$(ARCH)
>  binary-arch-arch: install-utils_$(ARCH)
>  binary-arch-arch: install-xenstore-utils_$(ARCH)
> +binary-arch-arch: install-lib-ocaml-dev_$(ARCH)
> +binary-arch-arch: install-lib-ocaml_$(ARCH)
>  binary-arch-flavour: install-hypervisor_$(ARCH)_$(FLAVOUR)
>  
>  binary-indep: install-docs
> @@ -70,6 +76,7 @@ $(STAMPS_DIR)/install-utils_$(ARCH): CONFIG = \
>  		XEN_COMPILE_ARCH=$(XEN_ARCH) \
>  		XEN_TARGET_ARCH=$(XEN_ARCH) \
>  		XEN_VERSION=$(VERSION) \
> +		OCAMLDESTDIR=$(CURDIR)/$(BUILD_DIR)/install-utils_$(ARCH)/usr/lib/xen-$(VERSION)/lib/ocaml \

You may use
| OCAMLDESTDIR=$(CURDIR)/$(BUILD_DIR)/install-utils_$(ARCH)_ocaml/usr/lib/xen-$(VERSION)/lib/ocaml
to separate them at this level.

> +	mkdir -p $(INSTALL_DIR)/usr/lib/xen-$(VERSION)/lib/ocaml/stublibs

Why?

> +	dh_ocaml

This package should not include any ocaml stuff.

> diff --git a/xen/debian/templates/control.main.in b/xen/debian/templates/control.main.in
> index 2dff1dd..423009d 100644
> --- a/xen/debian/templates/control.main.in
> +++ b/xen/debian/templates/control.main.in
> @@ -30,3 +30,21 @@ Replaces: xen-utils-common (<= 3.1.0-1)
>  Description: Xenstore utilities for Xen
>   This package contains the Xenstore utilities.
>  
> +Package: libxen-ocaml- at version@
> +Architecture: any
> +Section: libs
> +Depends: ocaml-base-nox-${F:OCamlABI}, ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}

How does it get the needed xen-utils-* dependency?

Bastian

-- 
Only a fool fights in a burning house.
		-- Kank the Klingon, "Day of the Dove", stardate unknown



More information about the Pkg-xen-devel mailing list