caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anton Bachin <antronbachin@gmail.com>
To: Helmut Brandl <helmut.brandl@gmx.net>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Preparing a project for opam
Date: Sat, 7 Jan 2017 17:46:34 -0600	[thread overview]
Message-ID: <4252F3DC-04EF-4445-8705-1E3B6B3FC6F4@gmail.com> (raw)
In-Reply-To: <e9293b65-fc37-153b-22a8-86cc56018ac8@gmx.net>

Helmut,

When publishing to OPAM, you can create an install file that lists what should be installed. I am linking to the example from Bisect_ppx (the question marks mean “if the file exists,” don’t use them if your file will always be built). Bisect_ppx installs a binary called bisect-ppx-report:

  https://github.com/ocaml/opam-repository/blob/master/packages/bisect_ppx/bisect_ppx.1.2.0/files/bisect_ppx.install

The overall published structure looks like this:

  https://github.com/ocaml/opam-repository/tree/master/packages/bisect_ppx/bisect_ppx.1.2.0

If you are working locally, you can create your .install file next to the opam file.

In general, it is also possible to get various OPAM paths for the current switch:

  opam config var lib
  opam config var doc
  opam config var bin

Best,
Anton

> El ene 7, 2017, a las 17:38, Helmut Brandl <helmut.brandl@gmx.net> escribió:
> 
> Hello list,
> 
> I am trying to prepare my project to being published via opam. I have pinned my project to a local version on my harddisk and generated and opam file which opam can build successfully.
> 
> Now I am struggling with the "install" section of the opam file.
> 
> For building I use ocamlbuild which builds a native executable file in the source directory (to be precise in the _build subdirectory of the source directory). Installing just means copying this executable into a directory which is in the search path. I have achieved this by copying the executable directly to ".opam/system/bin". However I am not sure if this is the recommended way since somebody else might have chosen another directory name and path on where to store ".opam".
> 
> Is there a portable way to do this? Thanks for any hint.
> 
> Regards
> Helmut
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


      parent reply	other threads:[~2017-01-07 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07 23:38 Helmut Brandl
2017-01-07 23:46 ` Petter A. Urkedal
2017-01-07 23:46 ` Anton Bachin [this message]

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=4252F3DC-04EF-4445-8705-1E3B6B3FC6F4@gmail.com \
    --to=antronbachin@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=helmut.brandl@gmx.net \
    /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).