From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 290117F861 for ; Fri, 21 Feb 2014 12:11:26 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsaAGEzB1NKN1ZKlGdsb2JhbABZg0GCOoEgvTaBJw4BAQEBBwsLCRIqgiUBAQQBI1YFCwsaAh8HAgIhJhAZCIdpAwkIBAmrI5ldDYdcF4EpiyaBYjMHFoJZNYEUBJRKBYF4gx+EfxeGGIc2gT8 X-IPAS-Result: AtsaAGEzB1NKN1ZKlGdsb2JhbABZg0GCOoEgvTaBJw4BAQEBBwsLCRIqgiUBAQQBI1YFCwsaAh8HAgIhJhAZCIdpAwkIBAmrI5ldDYdcF4EpiyaBYjMHFoJZNYEUBJRKBYF4gx+EfxeGGIc2gT8 X-IronPort-AV: E=Sophos;i="4.97,518,1389740400"; d="scan'208";a="49933025" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP; 21 Feb 2014 12:11:25 +0100 Received: from [172.20.10.2] (83-225.197-178.cust.bluewin.ch [178.197.225.83]) by smtp.webfaction.com (Postfix) with ESMTP id 128BD20BDD86; Fri, 21 Feb 2014 11:11:21 +0000 (UTC) Date: Fri, 21 Feb 2014 12:11:18 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: mads379@gmail.com Cc: caml-list@inria.fr Message-ID: <1BFC6E68C5814BADBDE735FACE53E815@erratique.ch> In-Reply-To: References: X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] Creating an OPAM package that wraps c functions that can be used in a non-custom utop Le vendredi, 21 f=C3=A9vrier 2014 =C3=A0 11:46, mads379@gmail.com a =C3=A9c= rit : > The next thing I want to do is create an OPAM package for it that my co- > workers and I can use. My question is, will I be able to create the packa= ge in > such a way that the library can be loaded into utop using topfind so we d= on't > have to build a custom top-level in the projects that use this library? Yes. > If it is possible, do you have any pointers to where I might find some > information about how to do it? First for generating the correct artefacts with ocamlbuild you can refer to= these instructions: https://github.com/ocamllabs/ocaml-ctypes/issues/51#issuecomment-307296= 75 It uses ctypes so the stub C files is empty but ignore that, it also uses p= kg-config for getting the cflags but you should be able to read through and= simplify the myocamlbuild.ml if you don't need that.=20=20 For the opam package use or generate a .install file at the toplevel of you= r distribution that will more or less look like this [1]. Feel free to ask further questions if you need to.=20=20 Best, Daniel [1] lib: [ "_build/META" {"META"} "_build/geolocalisation.mli" {"geolocalisation.mli"} "?_build/geolocalisation.cmti" {"geolocalisation.cmti"} "_build/geolocalisation.cmi" {"geolocalisation.cmi"} "_build/geolocalisation.cmx" {"geolocalisation.cmx"} "_build/geolocalisation.cma" {"geolocalisation.cma"} "_build/geolocalisation.a" {"geolocalisation.a"} "_build/geolocalisation.cmxa" {"geolocalisation.cmxa"} "_build/geolocalisation.cmxs" {"geolocalisation.cmxs"} ] stublibs: [ "_build/dllgeolocalisation.so" {"dllgeolocalisation.so"} ]