commit 2d77048c5459c9a25c59e712f3ef2bbef5b6ff1e Author: Jon Ludlam Date: Tue Aug 30 17:15:07 2011 +0100 Latest patch for the ocaml build diff --git a/trunk/xen/debian/libxen-ocaml-dev.install b/trunk/xen/debian/libxen-ocaml-dev.install new file mode 100644 index 0000000..f228b45 --- /dev/null +++ b/trunk/xen/debian/libxen-ocaml-dev.install @@ -0,0 +1 @@ +usr/lib/ocaml/{xl,xb,xc,xs,eventchn,mmap,uuid} diff --git a/trunk/xen/debian/libxen-ocaml.install b/trunk/xen/debian/libxen-ocaml.install new file mode 100644 index 0000000..8aede4b --- /dev/null +++ b/trunk/xen/debian/libxen-ocaml.install @@ -0,0 +1,10 @@ +usr/lib/ocaml/stublibs/dlleventchn_stubs.so +usr/lib/ocaml/stublibs/dlleventchn_stubs.so.owner +usr/lib/ocaml/stublibs/dllmmap_stubs.so +usr/lib/ocaml/stublibs/dllmmap_stubs.so.owner +usr/lib/ocaml/stublibs/dllxb_stubs.so +usr/lib/ocaml/stublibs/dllxb_stubs.so.owner +usr/lib/ocaml/stublibs/dllxc_stubs.so +usr/lib/ocaml/stublibs/dllxc_stubs.so.owner +usr/lib/ocaml/stublibs/dllxl_stubs.so +usr/lib/ocaml/stublibs/dllxl_stubs.so.owner diff --git a/trunk/xen/debian/rules.real b/trunk/xen/debian/rules.real index 1252ec2..ecb6c7b 100644 --- a/trunk/xen/debian/rules.real +++ b/trunk/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)$(OCAML_STDLIB_DIR) \ PYTHON=$(shell pyversions -r) $(STAMPS_DIR)/build-utils_$(ARCH): DIR=$(BUILD_DIR)/build-utils_$(ARCH) @@ -81,6 +88,7 @@ $(STAMPS_DIR)/install-utils_$(ARCH): DIR = $(BUILD_DIR)/build-utils_$(ARCH) $(STAMPS_DIR)/install-utils_$(ARCH): INSTALL_DIR = $(BUILD_DIR)/install-utils_$(ARCH) $(STAMPS_DIR)/install-utils_$(ARCH): $(STAMPS_DIR)/build-utils_$(ARCH) @rm -rf $(INSTALL_DIR) + mkdir -p $(INSTALL_DIR)$(OCAML_DLL_DIR) +$(MAKE_CLEAN) -C $(DIR)/tools install DESTDIR=$(CURDIR)/$(INSTALL_DIR) $(CONFIG) # hvmloader #strip --remove-section=.comment --remove-section=.note $(INSTALL_DIR)/usr/lib/xen*/boot/* @@ -92,6 +100,7 @@ install-base: dh_compress dh_fixperms dh_installdeb + dh_ocaml dh_gencontrol -- $(GENCONTROL_ARGS) dh_md5sums dh_builddeb @@ -131,6 +140,30 @@ install-lib-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) dh_shlibdeps +$(MAKE_SELF) install-base +install-lib-ocaml_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) +install-lib-ocaml_$(ARCH): PACKAGE_NAME = libxen-ocaml +install-lib-ocaml_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) +install-lib-ocaml_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) + dh_testdir + dh_testroot + dh_prep + dh_install --sourcedir=$(DIR) + dh_strip + dh_shlibdeps + +$(MAKE_SELF) install-base + +install-lib-ocaml-dev_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) +install-lib-ocaml-dev_$(ARCH): PACKAGE_NAME = libxen-ocaml-dev +install-lib-ocaml-dev_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) +install-lib-ocaml-dev_$(ARCH): $(STAMPS_DIR)/install-utils_$(ARCH) + dh_testdir + dh_testroot + dh_prep + dh_install --sourcedir=$(DIR) + dh_strip + dh_shlibdeps + +$(MAKE_SELF) install-base + install-libxenstore_$(ARCH): DIR = $(BUILD_DIR)/install-utils_$(ARCH) install-libxenstore_$(ARCH): PACKAGE_NAME = libxenstore3.0 install-libxenstore_$(ARCH): DH_OPTIONS = -p$(PACKAGE_NAME) diff --git a/trunk/xen/debian/templates/control.main.in b/trunk/xen/debian/templates/control.main.in index 2dff1dd..9f0fde9 100644 --- a/trunk/xen/debian/templates/control.main.in +++ b/trunk/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 +Architecture: any +Section: libs +Depends: ocaml-base-nox-${F:OCamlABI}, ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends} +Provides: ${ocaml:Provides} +Description: OCaml libraries for controlling Xen + This package contains the runtime libraries required for the ocaml bindings + to the Xen control libraries. + +Package: libxen-ocaml-dev +Architecture: any +Section: libdevel +Depends: ocaml-nox-${F:OCamlABI}, libxen-ocaml (= ${binary:Version}), ${shlibs:Depends}, ocaml-findlib (>= 1.1), ${misc:Depends}, ${ocaml:Depends} +Provides: ${ocaml:Provides} +Description: OCaml libraries for controlling Xen (devel package) + This package contains the ocaml findlib packages for compiling applications + that are designed to control the Xen hypervisor. + diff --git a/trunk/xen/debian/templates/control.source.in b/trunk/xen/debian/templates/control.source.in index 9511b86..050a8e7 100644 --- a/trunk/xen/debian/templates/control.source.in +++ b/trunk/xen/debian/templates/control.source.in @@ -4,6 +4,7 @@ Maintainer: Debian Xen Team Uploaders: Julien Danjou , Guido Trotter , Bastian Blank Build-Depends: debhelper (>> 7), lsb-release, + dh-ocaml, python-dev, bcc, gcc-multilib, @@ -15,7 +16,9 @@ Build-Depends: libncurses5-dev, libpci-dev, uuid-dev, - zlib1g-dev + zlib1g-dev, + ocaml-nox, + ocaml-findlib Build-Depends-Indep: graphviz, ghostscript,