From: Ralf Treinen Date: Mon, 3 Jul 2006 20:14:29 +0000 (+0000) Subject: add a section on bytecode packages X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~632 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b5adb6ce3beb30549c833151315cd1eed38f7abf;p=ocaml.git add a section on bytecode packages --- diff --git a/debian/policy/chapter-progpack.xml b/debian/policy/chapter-progpack.xml index 3adeeede..b58b0ef7 100644 --- a/debian/policy/chapter-progpack.xml +++ b/debian/policy/chapter-progpack.xml @@ -1,5 +1,5 @@
- Creating a package for an OCaml program + Creating Packages for OCaml Programs Any package providing executables built from OCaml source should conform to the following guidelines. @@ -10,12 +10,18 @@ - Programs which are not particularly CPU hungry should be compiled in - bytecode form and the corresponding binary packages should be - Architecture: all in order to minimize archive usage and - avoid the need of rebuilding them on all architectures. Other programs - should be compiled in native form on architectures where the native - compiler is available, and in bytecode on other architectures. + Programs which are not particularly CPU hungry should be + compiled into bytecode form, and the corresponding binary packages + should be Architecture: all in order to minimize + archive usage and avoid the need of rebuilding them on all + architectures. See for details on + this kind of packages. + + + + Other programs + should be compiled into native form on architectures where the native + compiler is available, and into bytecode on other architectures. See for details on how to achieve this. The corresponding binary packages should be Architecture: any and will need to be built on any architecture. @@ -31,6 +37,44 @@
+
+Bytecode Packages + +A bytecode package has all +its binaries compiled into bytecode. It depends on a package +containing the OCaml runtime system. By consequence, such a package +has its architecture field set to all. + + + +A bytecode package must depend on +ocaml-base-nox-&ocaml-version; (or +ocaml-base-&ocaml-version; if the program either +uses the Graphics or the LablTk module). In +order for the package to be able to be rebuilt or even binNMUed +without a change in the packaging, this version should not +be hardcoded in the debian/control +file. Instead, the package should depend on +ocaml-base-nox-${F:OCamlABI} and use OCAMLABI +:= $(shell ocamlc -version) and dh_gencontrol -- +-VF:OCamlABI="$(OCAMLABI)" in the +debian/rules file. + + + +A bytecode package must build-depend-indep on +ocaml-nox-&ocaml-version; (or +ocaml-&ocaml-version; if the program either uses +the Graphics or the LablTk module). The +current version number of OCaml should not be hardcoded +into the build-dependency (this is a deviation from a practice which +used be recommended but is depreciated now). Of course, if it is +necessary to ensure that the version of OCaml has a certain value then +version constraints can be used. However, this should be justified by +the requirements of the compilation of the program. + +
+
Bytecode and native versions of programs