caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Anthony Tavener <anthony.tavener@gmail.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Library installation procedure (for use with OPAM)?
Date: Mon, 9 Dec 2013 16:04:53 +0100	[thread overview]
Message-ID: <CC8DB0C8B46F43988F40917503E6DC54@erratique.ch> (raw)
In-Reply-To: <CAN=ouMTAy5naYKR3aNSqT_k1q5vpN=Mxf-VDrSed2bpjeO2DuQ@mail.gmail.com>

Le dimanche, 8 décembre 2013 à 21:55, Anthony Tavener a écrit :
> 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, but different for each project. Is findlib still applicable? Or some other means to query the system install directory?


For my packages I now generate an opam .install file at the root of the distribution. This .install file indicates the type of build artefacts you generated and where they are located. This lets opam figure out where it should put that. The advantage over using `findlib install` is that it also support installing binaries, man pages, documentation, configuration files, etc. Note that you still want your users to be able to use findlib for using your package so be sure to also install a META file (no need to use `findlib install` for that).  
  
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 with ocamlbuild and generates a corresponding .install file. The resulting opam file for this example is here [4] (the pkg-git invocation is for massaging the checkout when you pin the package).

Best,

Daniel

[1] See section 2.2.3 in https://github.com/OCamlPro/opam/raw/master/doc/dev-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


  parent reply	other threads:[~2013-12-09 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08 20:55 Anthony Tavener
2013-12-09  9:23 ` Stéphane Glondu
2013-12-09 11:13 ` John Whitington
2013-12-09 15:04 ` Daniel Bünzli [this message]
2013-12-09 15:23   ` Sebastien Mondet
2013-12-09 15:57     ` Daniel Bünzli
2013-12-09 16:39       ` Sebastien Mondet
2013-12-09 17:37         ` Daniel Bünzli
2013-12-09 19:41           ` Stéphane Glondu
2013-12-09 20:04             ` Daniel Bünzli
2013-12-09 20:22               ` Stéphane Glondu
2013-12-09 21:04                 ` Daniel Bünzli
2013-12-09 21:36                   ` Anthony Tavener
2013-12-10  1:12                     ` Francois Berenger
2013-12-10 14:50       ` Daniel Bünzli
2013-12-10 16:49         ` [Caml-list] [ANN] opam-installer (beta) (was Re: Library installation procedure (for use with OPAM)?) Louis Gesbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CC8DB0C8B46F43988F40917503E6DC54@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=anthony.tavener@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).