package opam-repository

  1. Overview
  2. Docs

Description

This library includes repository and remote sources handling, including curl/wget, rsync, git, mercurial, darcs backends.

Published: 02 Dec 2017

README

opam - A package manager for OCaml

Opam is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

Opam was created and is maintained by OCamlPro.

To get started, checkout the Install and Usage guides.

Compiling this repo

Either from an existing opam installation, use opam pin add opam-devel --dev, or:

  • Make sure you have the required dependencies installed:

    • GNU make

    • OCaml >= 4.02.3 (or see below)

    • The glpk library (or see below)

  • Run ./configure

  • Run make lib-ext as advertised by ./configure if you don't have the dependencies installed. This will locally take care of all OCaml dependencies for you (downloading them, unless you used the inclusive archive we provide for each release).

  • Run make

  • Run make install

This is all you need for installing and using opam, but if you want to use the opam-lib (to work on opam-related tools), you need to link it to installed libraries, rather than use make lib-ext which would cause conflicts. It's easier to already have a working opam installation in this case, so you can do it as a second step.

  • Make sure to have ocamlfind, ocamlgraph, cmdliner >= 0.9.8, cudf >= 0.7, dose3 >= 5, re >= 1.5.0, opam-file-format installed. Or run opam install opam-lib --deps-only if you already have a working instance. Re-run ./configure once done

  • Run make libinstall at the end

Developer mode

If you are developing OPAM, you may enable developer features by including the --enable-developer-mode parameter with ./configure.

Compiling without OCaml

make cold is provided as a facility to compile OCaml, then bootstrap opam. You don't need need to run ./configure in that case, but you may specify CONFIGURE_ARGS if needed, e.g.:

make cold CONFIGURE_ARGS="--prefix ~/local"
make cold-install

NOTE: You'll still need GNU make.

Integrated solver

Having the glpk library and headers installed enables compilation of opam with a built-in solver. Without it, the compiled opam will require an external solver, such as aspcud, at runtime.

You can compile glpk locally and install it to a custom prefix, then run ./configure LIB_PREFIX=custom_prefix. To avoid dynamically depending on it, some options need to be specified at link-time, which can be done through file src/client/linking.sexp. See release/Makefile for examples.

Bug tracker

Have a bug or a feature request ? Please open an issue on our bug-tracker. Please search for existing issues before posting, and include the output of opam config report and any details that may help track down the issue.

Documentation

User Manual

The main documentation entry point to opam is the user manual, available using opam --help. To get help for a specific command, use opam <command> --help.

Guides and Tutorials

A collection of guides and tutorials is available online. They are generated from the files in doc/pages.

API, Code Documentation and Developer Manual

A more thorough technical document describing opam and specifying the package description format is available in the developer manual. make doc will otherwise make the API documentation available under doc/.

Community

Keep track of development and community news.

  • Have a question that's not a feature request or bug report? Ask on the mailing list.

  • Chat with fellow opamers on IRC. On the irc.freenode.net server, in the #ocaml or the #opam channel.

Contributing

We welcome contributions ! Please use Github's pull-request mechanism against the master branch of the opam repository. If that's not an option for you, you can use git format-patch and email us.

Versioning

The release cycle respects Semantic Versioning.

Related repositories

  • ocaml/opam-repository is the official repository for opam packages and compilers. A number of non-official repositories are also available on the interwebs, for instance on Github.

  • opam2web generates a collection of browsable HTML files for a given repository. It is used to generate http://opam.ocaml.org.

  • opam-rt is the regression framework for opam.

  • opam-publish is a tool to facilitate the creation, update and publication of opam packages.

Copyright and license

The version comparison function in src/core/opamVersionCompare.ml is part of the Dose library and Copyright 2011 Ralf Treinen.

All other code is:

Copyright 2012-2016 OCamlPro Copyright 2012 INRIA

All rights reserved. Opam is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in the file LICENSE.

Opam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Dependencies (3)

  1. jbuilder >= "1.0+beta12"
  2. opam-format = "2.0.0~beta5"
  3. ocaml >= "4.02.3"

Dev Dependencies

None

Used by (1)

  1. opam-state = "2.0.0~beta5"

Conflicts

None