INSTALL.md 2.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Belenios compilation instructions
=================================

Command-line tool
-----------------

To compile the command-line tool, you will need:

 * [OCaml](http://caml.inria.fr/)
 * [Findlib](http://projects.camlcity.org/projects/findlib.html)
 * [Zarith](https://forge.ocamlcore.org/projects/zarith/)
 * [Calendar](http://calendar.forge.ocamlcore.org/)
 * [Uuidm](http://erratique.ch/software/uuidm)
 * [Cryptokit](https://forge.ocamlcore.org/projects/cryptokit/)
 * [Atdgen](http://mjambon.com/atdgen)
 * [Yojson](http://mjambon.com/yojson.html)

If you use [OPAM](http://opam.ocamlpro.com/), these dependencies can
be installed with the following command:

    opam install atdgen zarith cryptokit uuidm calendar

On [Debian](http://www.debian.org)-based systems, they can be
installed with the following command:

26 27 28 29 30 31 32
    sudo apt-get install libatdgen-ocaml-dev libzarith-ocaml-dev libcryptokit-ocaml-dev libuuidm-ocaml-dev libcalendar-ocaml-dev

On [Ubuntu](http://www.ubuntu.com), you need to enable the "Universe"
repository. This can be done with the following command-line (run it
before running the command above):

    sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
33 34 35 36 37 38 39 40 41 42 43 44 45

Once all the dependencies have been installed, the command-line tool
can be compiled with:

    make

It produces a single executable, `belenios-tool`, in the `_build/`
directory. You can install it in your `PATH` (which we will assume in
the guides), or refer to it with a full path.

Web server
----------

46
The web server has the following additional dependencies:
47

48 49
 * [Eliom](http://ocsigen.org/eliom/), version 3
 * [Csv](https://forge.ocamlcore.org/projects/csv/)
50

51 52 53
With OPAM, you can install them with:

    opam install eliom csv
54 55 56

On Debian-based systems, you can install it with:

57
    sudo apt-get install ocsigenserver eliom libcsv-ocaml-dev
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

But keep in mind that Belenios needs a very recent version of these
packages (in particular, eliom version 3 which is not in Debian stable
at the time of writing), so the ones available on your system might be
too old. If you are in this case, and want to run the server, we
advise you to use OPAM.

Once all the dependencies have been installed, the Eliom module can be
compiled with:

    make all

It will produce a single Eliom module, `server.cma`, in the
`_build/src/web` directory. See `demo/ocsigenserver.conf.in` for an
ocsigenserver configuration template, and the _Server administrator's
guide_ for more information on how to use it.

Documentation
-------------

To generate HTML files from `.md` ones, you will need:

 * [Markdown](http://daringfireball.net/projects/markdown/)

Additionnaly, you will need LaTeX to compile the specification.

On Debian-based systems, you can install the dependencies needed to
compile the documentation with:

87
    sudo apt-get install markdown texlive
88 89 90 91 92

Once all the dependencies have been installed, the documentation can
be compiled with:

    make doc