2
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3
"/usr/share/sgml/docbook/dtd/xml/4.3/docbookx.dtd" [
4
<!ENTITY % included SYSTEM "included.ent">
8
<title>The OCaml CDBS class</title>
10
To help maintainers of OCaml-related packages in adhering to this policy, a
11
class for the <ulink url="http://build-common.alioth.debian.org/">CDBS
12
build system</ulink> has been made available and is shipped as part of
13
the <filename>ocaml-nox</filename> package. Please consider using it in your
14
packages at it will both ease your work and permit to perform changes to a
15
wide range of packages acting on a single piece of software (the CDBS class
20
To use the class in your package it is enough to include the file
21
<filename>/usr/share/cdbs/1/rules/ocaml.mk</filename> from your
22
<filename>debian/rules</filename>. If you use debhelper (please do) you
23
should include the OCaml class after the debhelper on. A typical
24
<filename>debian/rules</filename> heading for a package using plain Makefile
25
(i.e. no autotools) and dpatch is as follows:
28
include /usr/share/cdbs/1/rules/dpatch.mk
29
include /usr/share/cdbs/1/rules/debhelper.mk
30
include /usr/share/cdbs/1/class/makefile.mk
31
include /usr/share/cdbs/1/rules/ocaml.mk
33
For an example of such a package see the <filename>pcre-ocaml</filename>
34
Debian source package.
38
A detailed description of how to use the OCaml CDBS class should be provided
39
in this section, but at the time of writing is a future work :-). In the
40
meantime if you know CDBS, the .mk files which compose the OCaml
41
class are well commented and they should give you enough information to
42
customize the build process of your package. The latest version of them is
43
available in the repository of the &ocaml-force; and can be browsed on the
48
<term><filename><ulink url="http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=blob;f=debian/cdbs/ocaml-vars.mk;hb=HEAD">ocaml-vars.mk</ulink></filename></term>
51
contains (Makefile) convenience variables which can be used in
52
<filename>debian/rules</filename>
58
<term><filename><ulink url="http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=blob;f=debian/cdbs/ocaml.mk;hb=HEAD">ocaml.mk</ulink></filename></term>
61
implements the class logic