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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 543757F706 for ; Mon, 9 Dec 2013 16:04:59 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail2-smtp-roc.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: AkQDAKrbpVJKN1ZKfmdsb2JhbABZgz+DUrYWgUUOAQEJCwwIFCiCJgEDAiNWEAsaAiYCAkcQBhuHegQJsgKPLhMEgSmLboFGMweCazWBEwOeQheOeA X-IPAS-Result: AkQDAKrbpVJKN1ZKfmdsb2JhbABZgz+DUrYWgUUOAQEJCwwIFCiCJgEDAiNWEAsaAiYCAkcQBhuHegQJsgKPLhMEgSmLboFGMweCazWBEwOeQheOeA X-IronPort-AV: E=Sophos;i="4.93,858,1378850400"; d="scan'208";a="47841246" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail2-smtp-roc.national.inria.fr with ESMTP; 09 Dec 2013 16:04:58 +0100 Received: from [172.20.10.2] (232-225.197-178.cust.bluewin.ch [178.197.225.232]) by smtp.webfaction.com (Postfix) with ESMTP id 1F92766EA2F4; Mon, 9 Dec 2013 15:04:55 +0000 (UTC) Date: Mon, 9 Dec 2013 16:04:53 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Anthony Tavener Cc: "=?utf-8?Q?caml-list=40inria.fr?=" Message-ID: 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] Library installation procedure (for use with OPAM)? Le dimanche, 8 d=C3=A9cembre 2013 =C3=A0 21:55, Anthony Tavener a =C3=A9cri= t : > Is there a simple example of an appropriate install process suitable for = use with OPAM? I've tried looking at a few existing packages and the build+= install process, as usual, is convoluted... not as obscure as autotools, bu= t different for each project. Is findlib still applicable? Or some other me= ans to query the system install directory? For my packages I now generate an opam .install file at the root of the dis= tribution. This .install file indicates the type of build artefacts you gen= erated and where they are located. This lets opam figure out where it shoul= d put that. The advantage over using `findlib install` is that it also supp= ort installing binaries, man pages, documentation, configuration files, etc= . Note that you still want your users to be able to use findlib for using y= our package so be sure to also install a META file (no need to use `findlib= install` for that).=20=20 =20=20 At the moment for achieving this I use a very simple build script [2] that = allows you to describe what you want (see [3]), builds what you describe wi= th ocamlbuild and generates a corresponding .install file. The resulting op= am file for this example is here [4] (the pkg-git invocation is for massagi= ng the checkout when you pin the package). Best, Daniel [1] See section 2.2.3 in https://github.com/OCamlPro/opam/raw/master/doc/de= v-manual/dev-manual.pdf [2] https://github.com/dbuenzli/xmlm/blob/master/pkg/pkg-builder [3] https://github.com/dbuenzli/xmlm/blob/master/pkg/build [4] https://github.com/dbuenzli/xmlm/blob/master/opam