opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
OCaml Makefile Shell M4 Python
Latest commit 3717ba5 Feb 28, 2017 @AltGr AltGr committed on GitHub Merge pull request #2861 from OCamlPro/fast-tracking
Fix bug with file tracking, make it faster, and 'switch reinstall' tweaks
Permalink
Failed to load latest commit information.
admin-scripts Get rid of Re_str, Re_pcre Feb 1, 2017
doc Rename 'OPAM' to lowercase 'opam' everywhere Feb 2, 2017
m4 remove caml4boot from the test, as its not used and sometimes (on Deb… Feb 4, 2013
shell Use OCaml 4.04.0 for the cold bootstrap target Feb 22, 2017
src Track installed files based on size+mtime Feb 24, 2017
src_ext Get rid of Re_str, Re_pcre Feb 1, 2017
tests Fix tests for bytecode-only hosts Dec 22, 2016
.gitignore Remove obsolete tools (opam-admin), update some doc Feb 1, 2017
.merlin Fix .merlin Mar 25, 2016
.ocamlinit Add a '.ocamlinit' that runs a toplevel with the current switch loaded Dec 22, 2016
.ocp-indent Make --dry-run a real dry-run, and add --show to check the update Feb 12, 2014
.travis-ci.sh Make travis script more resilient Nov 2, 2016
.travis.yml Travis: try the container-based build Oct 18, 2016
AUTHORS Add note on OpamVersionCompare (from dose) copyright Apr 10, 2015
CHANGES Version 2.0.0~beta2 Feb 14, 2017
CONTRIBUTING.md Rename 'OPAM' to lowercase 'opam' everywhere Feb 2, 2017
LICENSE Fix LICENSE file Jun 3, 2016
Makefile Remove obsolete tools (opam-admin), update some doc Feb 1, 2017
Makefile.config.in Get rid of Re_str, Re_pcre Feb 1, 2017
OCamlMakefile Makefile: fix dependencies calculation Jun 23, 2014
README.md Rename 'OPAM' to lowercase 'opam' everywhere Feb 2, 2017
appveyor.yml appveyor: remove m4 due to upstream package conflict Jan 6, 2017
configure Version 2.0.0~beta2 Feb 14, 2017
configure.ac Version 2.0.0~beta2 Feb 14, 2017
opam-client.opam Version 2.0.0~beta2 Feb 14, 2017
opam-core.opam Version 2.0.0~beta2 Feb 14, 2017
opam-devel.opam Version 2.0.0~beta2 Feb 14, 2017
opam-format.opam Rollback opam-file-format dependency Feb 15, 2017
opam-repository.opam Version 2.0.0~beta2 Feb 14, 2017
opam-solver.opam Version 2.0.0~beta2 Feb 14, 2017
opam-state.opam Version 2.0.0~beta2 Feb 14, 2017

README.md

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

  • Make sure you have OCaml and GNU make installed. If you don't have a recent enough version of OCaml (>= 4.01.0) at hand, see the next section.
  • 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, jsonm, cudf, dose3, re >= 1.2.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

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"

NOTE: You'll still need GNU make.

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. Some code in src/core/opamJson.ml is taken from the documentation of Jsonm and is Copyright 2012 Daniel C. Bünzli. See the specific file for details.

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.