[opam-devel] Conditional build instructions for pinned packages

Daniel Bünzli daniel.buenzli at erratique.ch
Tue Jul 2 16:53:43 BST 2013


I'd like to make my released opam packages pinable with their corresponding git repos. 

For that I need to invoke a special script *only whenever* I build from a git checkout. This script prepares the sources, injects the right version number so that ocamlfind correctly identifies the installed version and generates the oasis artefacts:

build: [
["devel/pkg-opam-git-setup" ] { WHAT CAN I WRITE HERE }
["ocaml" "setup.ml" "-configure" "--prefix" "%{prefix}%" ]
["ocaml" "setup.ml" "-build"]
["ocaml" "setup.ml" "-install"]


So for "WHAT CAN I WRITE HERE" is it possible to either test for `devel/pkg-opam-git-setup` existence (it is not in the release tarballs) or is there some kind of special variable to test that indicates a pinned status ? 



More information about the opam-devel mailing list