[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.11.0-3-3-g16c60e1

Stephane Glondu steph at glondu.net
Thu Feb 19 16:29:43 UTC 2009


The following commit has been merged in the master branch:
commit 16c60e19440c4fbd27c6f9dbbf86cf9092cc6846
Author: Stephane Glondu <steph at glondu.net>
Date:   Thu Feb 19 16:00:08 2009 +0100

    Add a script to deal with native modules to install

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..25819cf
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,11 @@
+OCaml Debian source package
+===========================
+
+Dispatching files between binary packages
+-----------------------------------------
+
+The dispatching is done as usual with *.install by dh_install, which
+are generated from *.install.in by ocamlinit.mk (from dh-ocaml), and
+the gen_modules.pl script (in ocaml source package). You should have a
+look at the comments in gen_modules.pl to understand the format of
+*.install.in files.
diff --git a/debian/changelog b/debian/changelog
index 8947b26..84ef1ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
 ocaml (3.11.0-4) UNRELEASED; urgency=low
 
+  [ Samuel Mimram ]
   * Add native versions of ocamldep and ocamldoc in findlib's configuration
     when ocaml-native-compilers is installed, closes: #516085.
 
- -- Samuel Mimram <smimram at debian.org>  Thu, 19 Feb 2009 11:06:02 +0100
+  [ Stephane Glondu ]
+  * Add a script to handle native modules of standard library, and a
+    README.source to document it (fixes FTBFS on sparc and powerpc, which
+    are native, but do not provide .p.cmx files)
+
+ -- Stephane Glondu <steph at glondu.net>  Thu, 19 Feb 2009 17:21:43 +0100
 
 ocaml (3.11.0-3) experimental; urgency=low
 
diff --git a/debian/gen_modules.pl b/debian/gen_modules.pl
new file mode 100755
index 0000000..aa03393
--- /dev/null
+++ b/debian/gen_modules.pl
@@ -0,0 +1,72 @@
+#!/usr/bin/perl -w
+#
+# Description: generating .install files for ocaml binary packages
+#
+# Copyright © 2009 Stéphane Glondu <steph at glondu.net>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+#
+# This script takes on its standard input a .install file with
+# additional lines starting with "STD: ", which denote files that are
+# installed in OCaml library directory, and outputs the same file with
+# the special lines replaced. Special care is taken with native files:
+#
+#  - they are not in the output on bytecode-only architectures
+#  - for each .cmx, .{o,p.cmx,p.o} is added if it exists
+#  - for each .cmxa, .{a,p.cmxa,p.a} is added if it exists
+#
+
+my $opt_arch = $ENV{OCAML_OPT_ARCH};
+my $ocaml_stdlib_dir = $ENV{OCAML_STDLIB_DIR};
+my $destdir = $ENV{DESTDIR};
+
+sub print_if_existing {
+    my $name = shift;
+    if (-f "${destdir}/${name}") {
+        print "${name}\n";
+    }
+}
+
+while (<>) {
+    if (s/^STD: //) {
+        my $base;
+        my $ext;
+        s/\n$//;
+        ($base, $ext) = /^(.*)\.([^.]+)$/;
+        $prefix = "${ocaml_stdlib_dir}/${base}";
+        if ($ext eq "cmx") {
+            if ($opt_arch) {
+                print "${prefix}.cmx\n";
+                print_if_existing("${prefix}.o");
+                print_if_existing("${prefix}.p.cmx");
+                print_if_existing("${prefix}.p.o");
+            }
+        } elsif ($ext eq "cmxa") {
+            if ($opt_arch) {
+                print "${prefix}.cmxa\n";
+                print_if_existing("${prefix}.a");
+                print_if_existing("${prefix}.p.cmxa");
+                print_if_existing("${prefix}.p.a");
+            }
+        } else {
+            print "${prefix}.${ext}\n";
+        }
+    } else {
+        print;
+    }
+}
diff --git a/debian/ocaml-nox.install.in b/debian/ocaml-nox.install.in
index abde8aa..b6c80f2 100644
--- a/debian/ocaml-nox.install.in
+++ b/debian/ocaml-nox.install.in
@@ -36,241 +36,6 @@ OPT: @OCamlStdlibDir@/libasmrunp.a
      @OCamlStdlibDir@/libthreads.a
 OPT: @OCamlStdlibDir@/libthreadsnat.a
      @OCamlStdlibDir@/libunix.a
-     @OCamlStdlibDir@/arg.ml
-     @OCamlStdlibDir@/arg.mli
-OPT: @OCamlStdlibDir@/arg.cmx
-OPT: @OCamlStdlibDir@/arg.p.cmx
-OPT: @OCamlStdlibDir@/arith_flags.cmx
-OPT: @OCamlStdlibDir@/arith_status.cmx
-     @OCamlStdlibDir@/arith_status.mli
-     @OCamlStdlibDir@/arrayLabels.ml
-     @OCamlStdlibDir@/arrayLabels.mli
-OPT: @OCamlStdlibDir@/arrayLabels.cmx
-OPT: @OCamlStdlibDir@/arrayLabels.p.cmx
-     @OCamlStdlibDir@/array.ml
-     @OCamlStdlibDir@/array.mli
-OPT: @OCamlStdlibDir@/array.cmx
-OPT: @OCamlStdlibDir@/array.p.cmx
-OPT: @OCamlStdlibDir@/big_int.cmx
-     @OCamlStdlibDir@/big_int.mli
-OPT: @OCamlStdlibDir@/bigarray.a
-OPT: @OCamlStdlibDir@/bigarray.cmx
-OPT: @OCamlStdlibDir@/bigarray.cmxa
-     @OCamlStdlibDir@/bigarray.mli
-     @OCamlStdlibDir@/buffer.ml
-     @OCamlStdlibDir@/buffer.mli
-OPT: @OCamlStdlibDir@/buffer.cmx
-OPT: @OCamlStdlibDir@/buffer.p.cmx
-     @OCamlStdlibDir@/callback.ml
-     @OCamlStdlibDir@/callback.mli
-OPT: @OCamlStdlibDir@/callback.cmx
-OPT: @OCamlStdlibDir@/callback.p.cmx
-     @OCamlStdlibDir@/camlinternalLazy.cmi
-OPT: @OCamlStdlibDir@/camlinternalLazy.cmx
-     @OCamlStdlibDir@/camlinternalLazy.ml
-     @OCamlStdlibDir@/camlinternalLazy.mli
-OPT: @OCamlStdlibDir@/camlinternalLazy.p.cmx
-     @OCamlStdlibDir@/camlinternalMod.cmi
-OPT: @OCamlStdlibDir@/camlinternalMod.cmx
-     @OCamlStdlibDir@/camlinternalMod.ml
-     @OCamlStdlibDir@/camlinternalMod.mli
-OPT: @OCamlStdlibDir@/camlinternalMod.p.cmx
-     @OCamlStdlibDir@/camlinternalOO.ml
-     @OCamlStdlibDir@/camlinternalOO.mli
-OPT: @OCamlStdlibDir@/camlinternalOO.cmx
-OPT: @OCamlStdlibDir@/camlinternalOO.p.cmx
-     @OCamlStdlibDir@/char.ml
-     @OCamlStdlibDir@/char.mli
-OPT: @OCamlStdlibDir@/char.cmx
-OPT: @OCamlStdlibDir@/char.p.cmx
-     @OCamlStdlibDir@/complex.ml
-     @OCamlStdlibDir@/complex.mli
-OPT: @OCamlStdlibDir@/complex.cmx
-OPT: @OCamlStdlibDir@/complex.p.cmx
-     @OCamlStdlibDir@/condition.mli
-OPT: @OCamlStdlibDir@/dbm.a
-     @OCamlStdlibDir@/dbm.cmi
-OPT: @OCamlStdlibDir@/dbm.cmx
-OPT: @OCamlStdlibDir@/dbm.cmxa
-     @OCamlStdlibDir@/dbm.mli
-     @OCamlStdlibDir@/digest.ml
-     @OCamlStdlibDir@/digest.mli
-OPT: @OCamlStdlibDir@/digest.cmx
-OPT: @OCamlStdlibDir@/digest.p.cmx
-OPT: @OCamlStdlibDir@/dynlink.a
-OPT: @OCamlStdlibDir@/dynlink.cmx
-OPT: @OCamlStdlibDir@/dynlink.cmxa
-     @OCamlStdlibDir@/dynlink.mli
-     @OCamlStdlibDir@/event.mli
-     @OCamlStdlibDir@/filename.ml
-     @OCamlStdlibDir@/filename.mli
-OPT: @OCamlStdlibDir@/filename.cmx
-OPT: @OCamlStdlibDir@/filename.p.cmx
-     @OCamlStdlibDir@/format.ml
-     @OCamlStdlibDir@/format.mli
-OPT: @OCamlStdlibDir@/format.cmx
-OPT: @OCamlStdlibDir@/format.p.cmx
-     @OCamlStdlibDir@/gc.ml
-     @OCamlStdlibDir@/gc.mli
-OPT: @OCamlStdlibDir@/gc.cmx
-OPT: @OCamlStdlibDir@/gc.p.cmx
-     @OCamlStdlibDir@/genlex.ml
-     @OCamlStdlibDir@/genlex.mli
-OPT: @OCamlStdlibDir@/genlex.cmx
-OPT: @OCamlStdlibDir@/genlex.p.cmx
-     @OCamlStdlibDir@/hashtbl.ml
-     @OCamlStdlibDir@/hashtbl.mli
-OPT: @OCamlStdlibDir@/hashtbl.cmx
-OPT: @OCamlStdlibDir@/hashtbl.p.cmx
-     @OCamlStdlibDir@/int32.ml
-     @OCamlStdlibDir@/int32.mli
-OPT: @OCamlStdlibDir@/int32.cmx
-OPT: @OCamlStdlibDir@/int32.p.cmx
-     @OCamlStdlibDir@/int64.ml
-     @OCamlStdlibDir@/int64.mli
-OPT: @OCamlStdlibDir@/int64.cmx
-OPT: @OCamlStdlibDir@/int64.p.cmx
-OPT: @OCamlStdlibDir@/int_misc.cmx
-     @OCamlStdlibDir@/lazy.ml
-     @OCamlStdlibDir@/lazy.mli
-OPT: @OCamlStdlibDir@/lazy.cmx
-OPT: @OCamlStdlibDir@/lazy.p.cmx
-     @OCamlStdlibDir@/lexing.ml
-     @OCamlStdlibDir@/lexing.mli
-OPT: @OCamlStdlibDir@/lexing.cmx
-OPT: @OCamlStdlibDir@/lexing.p.cmx
-     @OCamlStdlibDir@/listLabels.ml
-     @OCamlStdlibDir@/listLabels.mli
-OPT: @OCamlStdlibDir@/listLabels.cmx
-OPT: @OCamlStdlibDir@/listLabels.p.cmx
-     @OCamlStdlibDir@/list.ml
-     @OCamlStdlibDir@/list.mli
-OPT: @OCamlStdlibDir@/list.cmx
-OPT: @OCamlStdlibDir@/list.p.cmx
-     @OCamlStdlibDir@/map.ml
-     @OCamlStdlibDir@/map.mli
-OPT: @OCamlStdlibDir@/map.cmx
-OPT: @OCamlStdlibDir@/map.p.cmx
-     @OCamlStdlibDir@/marshal.ml
-     @OCamlStdlibDir@/marshal.mli
-OPT: @OCamlStdlibDir@/marshal.cmx
-OPT: @OCamlStdlibDir@/marshal.p.cmx
-     @OCamlStdlibDir@/moreLabels.ml
-     @OCamlStdlibDir@/moreLabels.mli
-OPT: @OCamlStdlibDir@/moreLabels.cmx
-OPT: @OCamlStdlibDir@/moreLabels.p.cmx
-     @OCamlStdlibDir@/mutex.mli
-OPT: @OCamlStdlibDir@/nat.cmx
-     @OCamlStdlibDir@/nat.mli
-     @OCamlStdlibDir@/nativeint.ml
-     @OCamlStdlibDir@/nativeint.mli
-OPT: @OCamlStdlibDir@/nativeint.cmx
-OPT: @OCamlStdlibDir@/nativeint.p.cmx
-OPT: @OCamlStdlibDir@/num.cmx
-     @OCamlStdlibDir@/num.mli
-OPT: @OCamlStdlibDir@/nums.a
-OPT: @OCamlStdlibDir@/nums.cmxa
-     @OCamlStdlibDir@/obj.ml
-     @OCamlStdlibDir@/obj.mli
-OPT: @OCamlStdlibDir@/obj.cmx
-OPT: @OCamlStdlibDir@/obj.p.cmx
-     @OCamlStdlibDir@/oo.ml
-     @OCamlStdlibDir@/oo.mli
-OPT: @OCamlStdlibDir@/oo.cmx
-OPT: @OCamlStdlibDir@/oo.p.cmx
-     @OCamlStdlibDir@/outcometree.cmi
-     @OCamlStdlibDir@/outcometree.mli
-     @OCamlStdlibDir@/parsing.ml
-     @OCamlStdlibDir@/parsing.mli
-OPT: @OCamlStdlibDir@/parsing.cmx
-OPT: @OCamlStdlibDir@/parsing.p.cmx
-     @OCamlStdlibDir@/pervasives.ml
-     @OCamlStdlibDir@/pervasives.mli
-OPT: @OCamlStdlibDir@/pervasives.cmx
-OPT: @OCamlStdlibDir@/pervasives.p.cmx
-     @OCamlStdlibDir@/printexc.ml
-     @OCamlStdlibDir@/printexc.mli
-OPT: @OCamlStdlibDir@/printexc.cmx
-OPT: @OCamlStdlibDir@/printexc.p.cmx
-     @OCamlStdlibDir@/printf.ml
-     @OCamlStdlibDir@/printf.mli
-OPT: @OCamlStdlibDir@/printf.cmx
-OPT: @OCamlStdlibDir@/printf.p.cmx
-     @OCamlStdlibDir@/profiling.cmi
-     @OCamlStdlibDir@/profiling.cmo
-     @OCamlStdlibDir@/queue.ml
-     @OCamlStdlibDir@/queue.mli
-OPT: @OCamlStdlibDir@/queue.cmx
-OPT: @OCamlStdlibDir@/queue.p.cmx
-     @OCamlStdlibDir@/random.ml
-     @OCamlStdlibDir@/random.mli
-OPT: @OCamlStdlibDir@/random.cmx
-OPT: @OCamlStdlibDir@/random.p.cmx
-OPT: @OCamlStdlibDir@/ratio.cmx
-     @OCamlStdlibDir@/ratio.mli
-     @OCamlStdlibDir@/scanf.ml
-     @OCamlStdlibDir@/scanf.mli
-OPT: @OCamlStdlibDir@/scanf.cmx
-OPT: @OCamlStdlibDir@/scanf.p.cmx
-     @OCamlStdlibDir@/set.ml
-     @OCamlStdlibDir@/set.mli
-OPT: @OCamlStdlibDir@/set.cmx
-OPT: @OCamlStdlibDir@/set.p.cmx
-     @OCamlStdlibDir@/sort.ml
-     @OCamlStdlibDir@/sort.mli
-OPT: @OCamlStdlibDir@/sort.cmx
-OPT: @OCamlStdlibDir@/sort.p.cmx
-     @OCamlStdlibDir@/stack.ml
-     @OCamlStdlibDir@/stack.mli
-OPT: @OCamlStdlibDir@/stack.cmx
-OPT: @OCamlStdlibDir@/stack.p.cmx
-OPT: @OCamlStdlibDir@/stdlib.a
-OPT: @OCamlStdlibDir@/stdlib.cmxa
-OPT: @OCamlStdlibDir@/stdlib.p.a
-OPT: @OCamlStdlibDir@/stdlib.p.cmxa
-     @OCamlStdlibDir@/std_exit.cmo
-OPT: @OCamlStdlibDir@/std_exit.cmx
-     @OCamlStdlibDir@/std_exit.ml
-OPT: @OCamlStdlibDir@/std_exit.o
-OPT: @OCamlStdlibDir@/std_exit.p.cmx
-OPT: @OCamlStdlibDir@/std_exit.p.o
-OPT: @OCamlStdlibDir@/stdLabels.cmx
-     @OCamlStdlibDir@/stdLabels.ml
-     @OCamlStdlibDir@/stdLabels.mli
-OPT: @OCamlStdlibDir@/stdLabels.p.cmx
-OPT: @OCamlStdlibDir@/str.a
-OPT: @OCamlStdlibDir@/str.cmx
-OPT: @OCamlStdlibDir@/str.cmxa
-     @OCamlStdlibDir@/str.mli
-     @OCamlStdlibDir@/stream.ml
-     @OCamlStdlibDir@/stream.mli
-OPT: @OCamlStdlibDir@/stream.cmx
-OPT: @OCamlStdlibDir@/stream.p.cmx
-     @OCamlStdlibDir@/string.ml
-     @OCamlStdlibDir@/string.mli
-OPT: @OCamlStdlibDir@/string.cmx
-OPT: @OCamlStdlibDir@/string.p.cmx
-     @OCamlStdlibDir@/stringLabels.ml
-     @OCamlStdlibDir@/stringLabels.mli
-OPT: @OCamlStdlibDir@/stringLabels.cmx
-OPT: @OCamlStdlibDir@/stringLabels.p.cmx
-     @OCamlStdlibDir@/sys.ml
-     @OCamlStdlibDir@/sys.mli
-OPT: @OCamlStdlibDir@/sys.cmx
-OPT: @OCamlStdlibDir@/sys.p.cmx
-     @OCamlStdlibDir@/thread.mli
-     @OCamlStdlibDir@/threadUnix.mli
-     @OCamlStdlibDir@/topstart.cmo
-OPT: @OCamlStdlibDir@/unix.a
-OPT: @OCamlStdlibDir@/unix.cmx
-OPT: @OCamlStdlibDir@/unix.cmxa
-     @OCamlStdlibDir@/unix.mli
-OPT: @OCamlStdlibDir@/unixLabels.cmx
-     @OCamlStdlibDir@/unixLabels.mli
-     @OCamlStdlibDir@/weak.ml
-     @OCamlStdlibDir@/weak.mli
-OPT: @OCamlStdlibDir@/weak.cmx
-OPT: @OCamlStdlibDir@/weak.p.cmx
      usr/share/man/man3/Arg.3o
      usr/share/man/man3/Array.3o
      usr/share/man/man3/ArrayLabels.3o
@@ -364,3 +129,182 @@ OPT: usr/share/man/man1/ocamlopt.1
      usr/share/man/man1/ocamlbuild.1
      usr/share/man/man1/ocamldebug.1
      usr/share/man/man1/ocamllex.1
+STD: arg.ml
+STD: arg.mli
+STD: arg.cmx
+STD: arith_flags.cmx
+STD: arith_status.cmx
+STD: arith_status.mli
+STD: arrayLabels.ml
+STD: arrayLabels.mli
+STD: arrayLabels.cmx
+STD: array.ml
+STD: array.mli
+STD: array.cmx
+STD: big_int.cmx
+STD: big_int.mli
+STD: bigarray.cmx
+STD: bigarray.cmxa
+STD: bigarray.mli
+STD: buffer.ml
+STD: buffer.mli
+STD: buffer.cmx
+STD: callback.ml
+STD: callback.mli
+STD: callback.cmx
+STD: camlinternalLazy.cmi
+STD: camlinternalLazy.cmx
+STD: camlinternalLazy.ml
+STD: camlinternalLazy.mli
+STD: camlinternalMod.cmi
+STD: camlinternalMod.cmx
+STD: camlinternalMod.ml
+STD: camlinternalMod.mli
+STD: camlinternalOO.ml
+STD: camlinternalOO.mli
+STD: camlinternalOO.cmx
+STD: char.ml
+STD: char.mli
+STD: char.cmx
+STD: complex.ml
+STD: complex.mli
+STD: complex.cmx
+STD: condition.mli
+STD: dbm.cmi
+STD: dbm.cmx
+STD: dbm.cmxa
+STD: dbm.mli
+STD: digest.ml
+STD: digest.mli
+STD: digest.cmx
+STD: dynlink.cmx
+STD: dynlink.cmxa
+STD: dynlink.mli
+STD: event.mli
+STD: filename.ml
+STD: filename.mli
+STD: filename.cmx
+STD: format.ml
+STD: format.mli
+STD: format.cmx
+STD: gc.ml
+STD: gc.mli
+STD: gc.cmx
+STD: genlex.ml
+STD: genlex.mli
+STD: genlex.cmx
+STD: hashtbl.ml
+STD: hashtbl.mli
+STD: hashtbl.cmx
+STD: int32.ml
+STD: int32.mli
+STD: int32.cmx
+STD: int64.ml
+STD: int64.mli
+STD: int64.cmx
+STD: int_misc.cmx
+STD: lazy.ml
+STD: lazy.mli
+STD: lazy.cmx
+STD: lexing.ml
+STD: lexing.mli
+STD: lexing.cmx
+STD: listLabels.ml
+STD: listLabels.mli
+STD: listLabels.cmx
+STD: list.ml
+STD: list.mli
+STD: list.cmx
+STD: map.ml
+STD: map.mli
+STD: map.cmx
+STD: marshal.ml
+STD: marshal.mli
+STD: marshal.cmx
+STD: moreLabels.ml
+STD: moreLabels.mli
+STD: moreLabels.cmx
+STD: mutex.mli
+STD: nat.cmx
+STD: nat.mli
+STD: nativeint.ml
+STD: nativeint.mli
+STD: nativeint.cmx
+STD: num.cmx
+STD: num.mli
+STD: nums.cmxa
+STD: obj.ml
+STD: obj.mli
+STD: obj.cmx
+STD: oo.ml
+STD: oo.mli
+STD: oo.cmx
+STD: outcometree.cmi
+STD: outcometree.mli
+STD: parsing.ml
+STD: parsing.mli
+STD: parsing.cmx
+STD: pervasives.ml
+STD: pervasives.mli
+STD: pervasives.cmx
+STD: printexc.ml
+STD: printexc.mli
+STD: printexc.cmx
+STD: printf.ml
+STD: printf.mli
+STD: printf.cmx
+STD: profiling.cmi
+STD: profiling.cmo
+STD: queue.ml
+STD: queue.mli
+STD: queue.cmx
+STD: random.ml
+STD: random.mli
+STD: random.cmx
+STD: ratio.cmx
+STD: ratio.mli
+STD: scanf.ml
+STD: scanf.mli
+STD: scanf.cmx
+STD: set.ml
+STD: set.mli
+STD: set.cmx
+STD: sort.ml
+STD: sort.mli
+STD: sort.cmx
+STD: stack.ml
+STD: stack.mli
+STD: stack.cmx
+STD: stdlib.cmxa
+STD: std_exit.cmo
+STD: std_exit.cmx
+STD: std_exit.ml
+STD: stdLabels.cmx
+STD: stdLabels.ml
+STD: stdLabels.mli
+STD: str.cmx
+STD: str.cmxa
+STD: str.mli
+STD: stream.ml
+STD: stream.mli
+STD: stream.cmx
+STD: string.ml
+STD: string.mli
+STD: string.cmx
+STD: stringLabels.ml
+STD: stringLabels.mli
+STD: stringLabels.cmx
+STD: sys.ml
+STD: sys.mli
+STD: sys.cmx
+STD: thread.mli
+STD: threadUnix.mli
+STD: topstart.cmo
+STD: unix.cmx
+STD: unix.cmxa
+STD: unix.mli
+STD: unixLabels.cmx
+STD: unixLabels.mli
+STD: weak.ml
+STD: weak.mli
+STD: weak.cmx
diff --git a/debian/ocaml.install.in b/debian/ocaml.install.in
index 0b7836b..26ebef4 100644
--- a/debian/ocaml.install.in
+++ b/debian/ocaml.install.in
@@ -2,11 +2,10 @@
      usr/bin/ocamlbrowser
      @OCamlStdlibDir@/labltk
      @OCamlStdlibDir@/libgraphics.a
-OPT: @OCamlStdlibDir@/graphics.a
-     @OCamlStdlibDir@/graphics.cmi
-OPT: @OCamlStdlibDir@/graphics.cmx
-OPT: @OCamlStdlibDir@/graphics.cmxa
-     @OCamlStdlibDir@/graphics.mli
-     @OCamlStdlibDir@/graphicsX11.cmi
-OPT: @OCamlStdlibDir@/graphicsX11.cmx
-     @OCamlStdlibDir@/graphicsX11.mli
+STD: graphics.cmi
+STD: graphics.cmx
+STD: graphics.cmxa
+STD: graphics.mli
+STD: graphicsX11.cmi
+STD: graphicsX11.cmx
+STD: graphicsX11.mli
diff --git a/debian/rules b/debian/rules
index d715f98..9077194 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,8 +27,9 @@ SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar.bz2
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+# This has to be exported to make gen_modules work
+export OCAML_OPT_ARCH
+export OCAML_STDLIB_DIR
 
 CONFIGURE_OPTS := \
   --with-pthread -prefix /usr \
@@ -150,6 +151,11 @@ install-stamp:
 # To avoid erroneous dh_install warnings
 	rm -f $(INSTDIR)/share/man/man1/ocamlopt.opt.1 $(INSTDIR)/share/man/man1/ocamlc.opt.1
 # Dispatch files with dh_install
+	cd debian && \
+	for u in ocaml ocaml-nox; do \
+	  DESTDIR=tmp ./gen_modules.pl $$u.install > $$u.install.new; \
+	  mv $$u.install.new $$u.install; \
+	done
 	if ! dh_install --list-missing; then \
 	  @echo "===> dh_install has failed with exit code $?... <==="; \
 	  find debian/tmp; \

-- 
OCaml packaging



More information about the Pkg-ocaml-maint-commits mailing list