Integrate dh_ocaml to the package.
authorSamuel Mimram <smimram@debian.org>
Mon, 18 Sep 2006 16:25:09 +0000 (16:25 +0000)
committerSamuel Mimram <smimram@debian.org>
Mon, 18 Sep 2006 16:25:09 +0000 (16:25 +0000)
20 files changed:
Makefile [deleted file]
configure [deleted file]
debian/dh-ocaml/dh_ocaml [new file with mode: 0755]
dh_ocaml [deleted file]
doc/registry_feeding.txt [deleted file]
doc/substvar_filling.txt [deleted file]
ocaml-md5sums.ml.in [deleted file]
postinst-ocaml [deleted file]
postrm-ocaml [deleted file]
samples/README [deleted file]
samples/debian/package.ocamldeps [deleted file]
samples/debian/package.ocamlobjects [deleted file]
samples/debian/package.ocamlobjinfo [deleted file]
samples/md5sums/MD5SUMS [deleted file]
samples/md5sums/libbar-ocaml-dev.md5sums [deleted file]
samples/md5sums/libfoo-ocaml-dev.md5sums [deleted file]
samples/md5sums/libhttp-ocaml-dev.md5sums [deleted file]
samples/md5sums/libpcre-ocaml-dev.md5sums [deleted file]
samples/md5sums/ocaml-base-nox.md5sums [deleted file]
samples/ocamlobjinfo.out [deleted file]

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 8222ded..0000000
--- a/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-
-DEBHELPER_VERSION := $(patsubst %+dh_ocaml,%,$(shell grep-available -X -F Package -s Version debhelper | cut -f 2 -d ' '))
-# DEBHELPER_VERSION = 4.9.5
-OCAML_VERSION = 3.08.3
-OCAML_LIB_DIR = /usr/lib/ocaml/$(OCAML_VERSION)
-DEBHELPER_DSC = debhelper_$(DEBHELPER_VERSION).dsc
-NEW_DEBHELPER_VERSION = $(DEBHELPER_VERSION)+dh_ocaml
-DEBHELPER_DIR = debhelper-$(DEBHELPER_VERSION)
-NEW_DEBHELPER_DIR = debhelper-$(NEW_DEBHELPER_VERSION)
-FED_SUMS = ocaml-nox.md5sums ocaml.md5sums ocaml-compiler-libs.md5sums
-OCAMLC = ocamlc
-OCAMLOPT = ocamlopt
-OCAML_LIBS = unix str
-SCRIPTS = postinst-ocaml postrm-ocaml
-
-all: ocaml-md5sums
-opt: ocaml-md5sums.opt
-world: all opt
-
-ocaml-md5sums.ml: ocaml-md5sums.ml.in
-       ./configure
-ocaml-md5sums: ocaml-md5sums.ml
-       $(OCAMLC) $(patsubst %,%.cma,$(OCAML_LIBS)) -o $@ $<
-ocaml-md5sums.opt: ocaml-md5sums.ml
-       $(OCAMLOPT) $(patsubst %,%.cmxa,$(OCAML_LIBS)) -o $@ $<
-
-$(DEBHELPER_DSC):
-       apt-get -d source debhelper
-
-debhelper: $(SCRIPTS) $(DEBHELPER_DSC)
-       rm -rf $(DEBHELPER_DIR)/ $(NEW_DEBHELPER_DIR)/
-       dpkg-source -x debhelper_$(DEBHELPER_VERSION).dsc
-       cp dh_ocaml $(DEBHELPER_DIR)/
-       cp $(SCRIPTS) $(DEBHELPER_DIR)/autoscripts/
-       cd $(DEBHELPER_DIR)     \
-               && dch --newversion $(NEW_DEBHELPER_VERSION) "added dh_ocaml"   \
-               && debuild binary
-
-feeding: $(FED_SUMS)
-%.md5sums: ocaml-md5sums
-       dpkg -L $* \
-       | grep '.cm[ao]' \
-       | grep -v ^$(OCAML_LIB_DIR)/ocamldoc/ \
-       | grep -v ^$(OCAML_LIB_DIR)/camlp4/ \
-       | ./ocaml-md5sums compute \
-               --package $*-$(OCAML_VERSION) \
-               --runtime $(patsubst ocaml%, ocaml-base%, $*)-$(OCAML_VERSION) \
-       | sort -k 2 \
-       > $@
-ocaml-compiler-libs.md5sums: ocaml-md5sums ocaml-nox.md5sums
-       dpkg -L ocaml-compiler-libs \
-       | grep '.cm[ao]' \
-       | ./ocaml-md5sums compute \
-        --package ocaml-compiler-libs-$(OCAML_VERSION) \
-       | sort -k 2 \
-       > $@
-
-%: %.in
-       wml -p 1-3 $< > $@
-
-clean:
-       rm -f ocaml-md5sums ocaml-md5sums.opt $(FED_SUMS)
-       rm -f *.cm[aiox] *.cmxa *.[ao]
-
diff --git a/configure b/configure
deleted file mode 100755 (executable)
index 5bf9190..0000000
--- a/configure
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-DEFAULT="/var/lib/ocaml/md5sums"
-if [ -z "$1" ]; then
-  echo "No dir provided, using default: $DEFAULT"
-  echo "You can override it with: ./configure [ md5sums_dir ]"
-  MD5SUMS_DIR="$DEFAULT"
-else
-  MD5SUMS_DIR="$1"
-fi
-echo -n "Creating ocaml-md5sums.ml ... "
-sed "s:@MD5SUMS_DIR@:$MD5SUMS_DIR:" < ocaml-md5sums.ml.in > ocaml-md5sums.ml
-echo "done."
diff --git a/debian/dh-ocaml/dh_ocaml b/debian/dh-ocaml/dh_ocaml
new file mode 100755 (executable)
index 0000000..380216a
--- /dev/null
@@ -0,0 +1,304 @@
+#!/usr/bin/perl -w
+#
+# dh_ocaml - debhelper which computes OCaml md5sums and calculates OCaml
+#           dependencies
+#
+# Copyright (C) 2005, Stefano Zacchiroli <zack@debian.org>
+#
+# Created:       Fri, 01 Apr 2005 19:50:48 +0200 zack
+# Last-Modified:  Sat, 20 Aug 2005 09:46:04 +0200 zack
+#
+# This is free software, you can redistribute it and/or modify it under the
+# terms of the GNU General Public License version 2 or above as published by the
+# Free Software Foundation.
+#
+# 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., 59 Temple
+# Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+# TODO ask joeyh for a O_PARAMS and s/M_PARAMS/O_PARAMS/
+
+=head1 NAME
+
+dh_ocaml - calculates OCaml packages dependencies
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+init();
+
+my $ocamlc = "/usr/bin/ocamlc";
+my $omd5 = "/usr/bin/ocaml-md5sums";
+my @binaries = ($ocamlc, $omd5);
+foreach my $bin (@binaries) {
+  error "$bin does not exists or is not executable" unless -x $bin;
+}
+chomp (my $ocaml_lib_dir = `$ocamlc -where`);
+chomp (my $ocaml_version = `$ocamlc -version`);
+
+my $md5dir = "/var/lib/ocaml/md5sums";
+my $md5ext = ".md5sums";
+my $ocaml_magic_line = "#!/usr/bin/ocamlrun";
+
+=head1 SYNOPSIS
+
+B<dh_ocaml> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_ocaml is a debhelper program that is responsible for filling the
+${ocaml:Depends} substitutions and adding them to substvars files. It also adds
+postinst and postrm scripts for maintaining system registry of OCaml md5sums
+where required.
+
+dh_ocaml acts on two kinds of binary packages: those shipping development part
+of OCaml libraries (usually named libXXX-ocaml-dev), and those shipping OCaml
+bytecode non-custom executables (i.e. executables interpreted by
+/usr/bin/ocamlrun).
+
+On OCaml library packages dh_ocaml will firstly look at OCaml objects (files
+matching *.cm[ao]) shipped by the package. Then, dh_ocaml uses ocamlobjinfo on
+them for collecting information about OCaml modules (or units, in ocamlobjinfo
+terminology) defined and used by them.  Information about defined units will be
+used to automatically create the OCaml md5sums registry entry for your package,
+e.g.  /var/lib/ocaml/md5sums/libXXX-ocaml-dev.md5sums. Information about
+imported units will instead be used as keys in the OCaml md5sums registry for
+retrieving dependency information for the package. Those information will then
+be used to fill the "${ocaml:Depends}" substvar.
+
+dh_ocaml takes also care of creating postinst and postrm autoscripts which
+update the global system registry (/var/lib/ocaml/md5sums/MD5SUMS) with the
+registry entry shipped by your package.
+
+On non-library packages, dh_ocaml tries to guess the OCaml objects corresponding
+to shipped bytecode binaries and extract from them information about imported
+units. Extracted information will then be used for filling "${ocaml:Depends}" as
+discussed for the library case.
+
+In addition to dependencies extracted from the system md5sum registry, dh_ocaml
+will add:
+
+=over
+
+=item 1.
+
+dependency from libXXX-ocaml-dev to libXXX-ocaml (runtime part of the library),
+if there is a libXXX-ocaml package in debian/control;
+
+=item 2.
+
+dependency from libXXX-ocaml-dev to ocaml-findlib if the package ships any META
+file in the OCaml library directory;
+
+=item 3.
+
+dependency from libXXX-ocaml, if any, to the appropriate ocaml-base-* package
+(please note that the substvar for libXXX-ocaml will be filled while processing
+libXXX-ocaml-dev);
+
+=item 4.
+
+dependency on ocaml-base-nox-<ocaml_version> for packages shipping bytecode
+non-custom OCaml executables.
+
+=back
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-m> I<filename>
+
+By default, the list of OCaml objects shipped by your package which should be
+analyzed for retrieving dependency information is guessed by dh_ocaml.
+
+The -m option permit to specify a file which lists, one per line, that OCaml
+objects. They should be in one of the format understandable by ocamlobjinfo
+(*.cma, *.cmi, *.cmo) and are considered relative to the package build
+directory.
+
+=item B<-l> I<dev1:runtime1,dev2:runtime2,...>
+
+The association between development part of libraries and their runtimes is
+guessed by dh_ocaml according to the OCaml packaging policy. Thus,
+libXXX-ocaml-dev is the name of the package shipping the development part of XXX
+library while libXXX-ocaml, if any, is the name of the package shipping the
+corresponding runtime.
+
+Using -l you could override the pairs development package name, runtime package
+name. The value passed to -l admits no spaces and must be a comma separated list
+of items. Each item can be a single package name (stating that that name
+corresponds to the development part of a library) or two package names separated
+by a colon (stating that the first corresponds to the development part of a
+library, while the second to its accompanying runtime part).
+
+=item B<-d>
+
+By default, dependency on findlib is generated for development parts of
+libraries which ship any META file. Using -d you can disable the generation of
+such dependency (even if this is discouraged and is very likely to violate the
+OCaml packaging policy)
+
+=back
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.6.1.1
+
+OCaml packaging policy, version 0.6
+
+=cut
+
+# find ocaml bytecode executables contained in a given directory
+# (i.e. executables whose first line is #!/usr/bin/ocamlrun)
+sub find_ocaml_bc_binaries($) {
+  my ($dir) = @_;
+  my @binaries = split /\n/, `find $dir -type f -perm -0100`;
+  my @bc_binaries;
+  foreach my $bin (@binaries) {
+    my $line = `head -1 $bin` or next;
+    chomp $line;
+    push @bc_binaries, $bin if $line eq $ocaml_magic_line;
+  }
+  return @bc_binaries;
+}
+
+# add an entry to the ocaml:Depends substvar, filter out dummy "-" values
+sub add_ocaml_dep($$$) {
+  my ($package, $dep, $version) = @_;
+  return if $dep eq "-" or $package eq "";
+  if ($version =~ /-\s*$/) {  # ocaml-md5sums returns "-" for "no version"
+    addsubstvar $package, "ocaml:Depends", $dep;
+  } else {
+    addsubstvar $package, "ocaml:Depends", $dep, $version;
+  }
+}
+
+# fill the ocaml:Depends substvar, reading info from file
+sub fill_ocaml_depends($$$$$) {
+  my ($package, $tmp, $fname, $is_library, $runtime) = @_;
+  delsubstvar $package, "ocaml:Depends";  # for idempotency
+  if (-f $fname) {
+    open DEPS, "< $fname" or die "can't open $fname";
+    while (my $line = <DEPS>) {
+      chomp $line;
+      if ($line =~ /^\s*(.+)\s+(.+)\s+(.+)\s*$/) {
+       # matched groups: dev_dep, runtime_dep, dep_version
+       if ($is_library) {
+         add_ocaml_dep $package, $1, ">= $3";
+         add_ocaml_dep $package, $runtime, "= $dh{VERSION}" if $runtime;
+         if (`find $tmp -type f -name "META*"` ne "" and not $dh{D_FLAG}) {
+           # package has META and findlib dependency has not been forbidden
+           add_ocaml_dep $package, "ocaml-findlib", "-"
+         }
+         add_ocaml_dep $runtime, $2, ">= $3";
+       } else {
+         add_ocaml_dep $package, $2, ">= $3";
+       }
+      }
+    }
+    close DEPS;
+  }
+  add_ocaml_dep $package, "ocaml-base-nox-$ocaml_version", "-" unless $is_library;
+}
+
+# check if a given binary package exists in debian/control
+sub package_exists($) {
+  my ($name) = @_;
+  my $retval = grep /^\Q$name\E$/, getpackages();
+  return $retval;
+}
+
+# return true if a given package has to be handled as an ocaml development
+# library package. Usually this implies that package has a name like
+# libXXX-ocaml-dev, but could be overridden with -l
+# -l argument has the form "devpkg:runtime,devpkg:runtime,..." devpkg is the
+# name of the development package :runtime (optional part) is the name of the
+# associated runtime package
+# examples: -l foo    -l foo:bar    -l foo:bar,baz,dum:dam
+sub is_library($$) {
+  my ($package, $overrides) = @_;
+  return 1 if $overrides and $overrides =~ /(^|,)\Q$package\E($|:|,)/;
+  return ($package =~ /^lib.*-ocaml-dev$/);
+}
+
+# return true if a given package has to be handled as containing ocaml binaries
+# usually this implies that package name does not match libXXX-ocaml(-dev)? but
+# overrides should be considered as per is_library above
+sub is_binary($$) {
+  my ($package, $overrides) = @_;
+  return 0 if $overrides and $overrides =~ /(^|,|:)\Q$package\E($|:|,)/;
+  return (not ($package =~ /^lib.*-ocaml(-dev)?$/));
+}
+
+# return the runtime package corresponding to a given one
+sub runtime_of_library($$) {
+  my ($package, $overrides) = @_;
+  my $runtime = "";
+  if ($overrides and $overrides =~ /(^|,)\Q$package\E:([^,]+)/) {
+    $runtime = $2;
+  } elsif ($package =~ /^(lib.*-ocaml)-dev$/) {
+    $runtime = $1;
+  }
+  return (package_exists $runtime ? $runtime : "");
+}
+
+# main
+exit 0 if $dh{NO_ACT};
+foreach my $package (@{$dh{DOPACKAGES}}) {
+  my $tmp = tmpdir $package;
+  my $ext = pkgext $package;
+  isnative($package);  # sets $dh{VERSION}
+  my $oinfo = "debian/$ext" . "oinfo.debhelper"; # ocaml objects info
+  my $olist = "debian/$ext" . "olist.debhelper"; # ocaml object list
+  $olist = $dh{M_PARAMS} if $dh{M_PARAMS}; # override object list with -m
+  my $odeps = "debian/$ext" . "odeps.debhelper"; # ocaml dependencies
+  if (is_library $package, $dh{L_PARAMS}) {  # ocaml library package
+    my $runtime = runtime_of_library $package, $dh{L_PARAMS};
+    my $flags = "--package $package --version $dh{VERSION}";
+    $flags .= " --runtime $runtime" if $runtime;
+      # create md5sum registry entry and post.* scripts
+    complex_doit "find $tmp$ocaml_lib_dir -type f -name '*.cm[ao]' > $olist"
+      unless $dh{M_PARAMS};
+    complex_doit "mkdir -p $tmp$md5dir";
+    complex_doit("$omd5 $flags --dump-info $oinfo compute < $olist"
+      . " | sort -k 2"  # optional pass, just for "pretty" printing
+      . " > $tmp$md5dir/$package$md5ext");
+    autoscript $package, "postinst", "postinst-ocaml";
+    autoscript $package, "postrm", "postrm-ocaml";
+    complex_doit "$omd5 --load-info $oinfo dep < $olist > $odeps"; #compute deps
+    fill_ocaml_depends $package, $tmp, $odeps, 1, $runtime;
+  } elsif (is_binary $package, $dh{L_PARAMS}) {  # ocaml binary package
+    my @binaries = find_ocaml_bc_binaries $tmp;
+    next unless @binaries;  # nothing to do if no bytecode binary has been found
+    complex_doit "> $odeps";
+    if (not $dh{M_PARAMS}) {
+      foreach my $bin (@binaries) { # try to find .cmo of bc binaries
+       my $guess = basename $bin . ".cm[ao]";
+       complex_doit "find . -type f -name '$guess' >> $olist"
+      }
+    }
+    complex_doit "$omd5 dep < $olist > $odeps"; # compute deps
+    fill_ocaml_depends $package, $tmp, $odeps, 0, "";
+  }
+}
+
+=head1 SEE ALSO
+
+L<ocamlobjinfo(1)>, L<debhelper(7)>, L<ocaml-md5sums(1)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Stefano Zacchiroli <zack@debian.org>
+
+=cut
+
diff --git a/dh_ocaml b/dh_ocaml
deleted file mode 100755 (executable)
index 380216a..0000000
--- a/dh_ocaml
+++ /dev/null
@@ -1,304 +0,0 @@
-#!/usr/bin/perl -w
-#
-# dh_ocaml - debhelper which computes OCaml md5sums and calculates OCaml
-#           dependencies
-#
-# Copyright (C) 2005, Stefano Zacchiroli <zack@debian.org>
-#
-# Created:       Fri, 01 Apr 2005 19:50:48 +0200 zack
-# Last-Modified:  Sat, 20 Aug 2005 09:46:04 +0200 zack
-#
-# This is free software, you can redistribute it and/or modify it under the
-# terms of the GNU General Public License version 2 or above as published by the
-# Free Software Foundation.
-#
-# 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., 59 Temple
-# Place, Suite 330, Boston, MA  02111-1307  USA
-#
-
-# TODO ask joeyh for a O_PARAMS and s/M_PARAMS/O_PARAMS/
-
-=head1 NAME
-
-dh_ocaml - calculates OCaml packages dependencies
-
-=cut
-
-use strict;
-use Debian::Debhelper::Dh_Lib;
-init();
-
-my $ocamlc = "/usr/bin/ocamlc";
-my $omd5 = "/usr/bin/ocaml-md5sums";
-my @binaries = ($ocamlc, $omd5);
-foreach my $bin (@binaries) {
-  error "$bin does not exists or is not executable" unless -x $bin;
-}
-chomp (my $ocaml_lib_dir = `$ocamlc -where`);
-chomp (my $ocaml_version = `$ocamlc -version`);
-
-my $md5dir = "/var/lib/ocaml/md5sums";
-my $md5ext = ".md5sums";
-my $ocaml_magic_line = "#!/usr/bin/ocamlrun";
-
-=head1 SYNOPSIS
-
-B<dh_ocaml> [S<I<debhelper options>>]
-
-=head1 DESCRIPTION
-
-dh_ocaml is a debhelper program that is responsible for filling the
-${ocaml:Depends} substitutions and adding them to substvars files. It also adds
-postinst and postrm scripts for maintaining system registry of OCaml md5sums
-where required.
-
-dh_ocaml acts on two kinds of binary packages: those shipping development part
-of OCaml libraries (usually named libXXX-ocaml-dev), and those shipping OCaml
-bytecode non-custom executables (i.e. executables interpreted by
-/usr/bin/ocamlrun).
-
-On OCaml library packages dh_ocaml will firstly look at OCaml objects (files
-matching *.cm[ao]) shipped by the package. Then, dh_ocaml uses ocamlobjinfo on
-them for collecting information about OCaml modules (or units, in ocamlobjinfo
-terminology) defined and used by them.  Information about defined units will be
-used to automatically create the OCaml md5sums registry entry for your package,
-e.g.  /var/lib/ocaml/md5sums/libXXX-ocaml-dev.md5sums. Information about
-imported units will instead be used as keys in the OCaml md5sums registry for
-retrieving dependency information for the package. Those information will then
-be used to fill the "${ocaml:Depends}" substvar.
-
-dh_ocaml takes also care of creating postinst and postrm autoscripts which
-update the global system registry (/var/lib/ocaml/md5sums/MD5SUMS) with the
-registry entry shipped by your package.
-
-On non-library packages, dh_ocaml tries to guess the OCaml objects corresponding
-to shipped bytecode binaries and extract from them information about imported
-units. Extracted information will then be used for filling "${ocaml:Depends}" as
-discussed for the library case.
-
-In addition to dependencies extracted from the system md5sum registry, dh_ocaml
-will add:
-
-=over
-
-=item 1.
-
-dependency from libXXX-ocaml-dev to libXXX-ocaml (runtime part of the library),
-if there is a libXXX-ocaml package in debian/control;
-
-=item 2.
-
-dependency from libXXX-ocaml-dev to ocaml-findlib if the package ships any META
-file in the OCaml library directory;
-
-=item 3.
-
-dependency from libXXX-ocaml, if any, to the appropriate ocaml-base-* package
-(please note that the substvar for libXXX-ocaml will be filled while processing
-libXXX-ocaml-dev);
-
-=item 4.
-
-dependency on ocaml-base-nox-<ocaml_version> for packages shipping bytecode
-non-custom OCaml executables.
-
-=back
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-m> I<filename>
-
-By default, the list of OCaml objects shipped by your package which should be
-analyzed for retrieving dependency information is guessed by dh_ocaml.
-
-The -m option permit to specify a file which lists, one per line, that OCaml
-objects. They should be in one of the format understandable by ocamlobjinfo
-(*.cma, *.cmi, *.cmo) and are considered relative to the package build
-directory.
-
-=item B<-l> I<dev1:runtime1,dev2:runtime2,...>
-
-The association between development part of libraries and their runtimes is
-guessed by dh_ocaml according to the OCaml packaging policy. Thus,
-libXXX-ocaml-dev is the name of the package shipping the development part of XXX
-library while libXXX-ocaml, if any, is the name of the package shipping the
-corresponding runtime.
-
-Using -l you could override the pairs development package name, runtime package
-name. The value passed to -l admits no spaces and must be a comma separated list
-of items. Each item can be a single package name (stating that that name
-corresponds to the development part of a library) or two package names separated
-by a colon (stating that the first corresponds to the development part of a
-library, while the second to its accompanying runtime part).
-
-=item B<-d>
-
-By default, dependency on findlib is generated for development parts of
-libraries which ship any META file. Using -d you can disable the generation of
-such dependency (even if this is discouraged and is very likely to violate the
-OCaml packaging policy)
-
-=back
-
-=head1 CONFORMS TO
-
-Debian policy, version 3.6.1.1
-
-OCaml packaging policy, version 0.6
-
-=cut
-
-# find ocaml bytecode executables contained in a given directory
-# (i.e. executables whose first line is #!/usr/bin/ocamlrun)
-sub find_ocaml_bc_binaries($) {
-  my ($dir) = @_;
-  my @binaries = split /\n/, `find $dir -type f -perm -0100`;
-  my @bc_binaries;
-  foreach my $bin (@binaries) {
-    my $line = `head -1 $bin` or next;
-    chomp $line;
-    push @bc_binaries, $bin if $line eq $ocaml_magic_line;
-  }
-  return @bc_binaries;
-}
-
-# add an entry to the ocaml:Depends substvar, filter out dummy "-" values
-sub add_ocaml_dep($$$) {
-  my ($package, $dep, $version) = @_;
-  return if $dep eq "-" or $package eq "";
-  if ($version =~ /-\s*$/) {  # ocaml-md5sums returns "-" for "no version"
-    addsubstvar $package, "ocaml:Depends", $dep;
-  } else {
-    addsubstvar $package, "ocaml:Depends", $dep, $version;
-  }
-}
-
-# fill the ocaml:Depends substvar, reading info from file
-sub fill_ocaml_depends($$$$$) {
-  my ($package, $tmp, $fname, $is_library, $runtime) = @_;
-  delsubstvar $package, "ocaml:Depends";  # for idempotency
-  if (-f $fname) {
-    open DEPS, "< $fname" or die "can't open $fname";
-    while (my $line = <DEPS>) {
-      chomp $line;
-      if ($line =~ /^\s*(.+)\s+(.+)\s+(.+)\s*$/) {
-       # matched groups: dev_dep, runtime_dep, dep_version
-       if ($is_library) {
-         add_ocaml_dep $package, $1, ">= $3";
-         add_ocaml_dep $package, $runtime, "= $dh{VERSION}" if $runtime;
-         if (`find $tmp -type f -name "META*"` ne "" and not $dh{D_FLAG}) {
-           # package has META and findlib dependency has not been forbidden
-           add_ocaml_dep $package, "ocaml-findlib", "-"
-         }
-         add_ocaml_dep $runtime, $2, ">= $3";
-       } else {
-         add_ocaml_dep $package, $2, ">= $3";
-       }
-      }
-    }
-    close DEPS;
-  }
-  add_ocaml_dep $package, "ocaml-base-nox-$ocaml_version", "-" unless $is_library;
-}
-
-# check if a given binary package exists in debian/control
-sub package_exists($) {
-  my ($name) = @_;
-  my $retval = grep /^\Q$name\E$/, getpackages();
-  return $retval;
-}
-
-# return true if a given package has to be handled as an ocaml development
-# library package. Usually this implies that package has a name like
-# libXXX-ocaml-dev, but could be overridden with -l
-# -l argument has the form "devpkg:runtime,devpkg:runtime,..." devpkg is the
-# name of the development package :runtime (optional part) is the name of the
-# associated runtime package
-# examples: -l foo    -l foo:bar    -l foo:bar,baz,dum:dam
-sub is_library($$) {
-  my ($package, $overrides) = @_;
-  return 1 if $overrides and $overrides =~ /(^|,)\Q$package\E($|:|,)/;
-  return ($package =~ /^lib.*-ocaml-dev$/);
-}
-
-# return true if a given package has to be handled as containing ocaml binaries
-# usually this implies that package name does not match libXXX-ocaml(-dev)? but
-# overrides should be considered as per is_library above
-sub is_binary($$) {
-  my ($package, $overrides) = @_;
-  return 0 if $overrides and $overrides =~ /(^|,|:)\Q$package\E($|:|,)/;
-  return (not ($package =~ /^lib.*-ocaml(-dev)?$/));
-}
-
-# return the runtime package corresponding to a given one
-sub runtime_of_library($$) {
-  my ($package, $overrides) = @_;
-  my $runtime = "";
-  if ($overrides and $overrides =~ /(^|,)\Q$package\E:([^,]+)/) {
-    $runtime = $2;
-  } elsif ($package =~ /^(lib.*-ocaml)-dev$/) {
-    $runtime = $1;
-  }
-  return (package_exists $runtime ? $runtime : "");
-}
-
-# main
-exit 0 if $dh{NO_ACT};
-foreach my $package (@{$dh{DOPACKAGES}}) {
-  my $tmp = tmpdir $package;
-  my $ext = pkgext $package;
-  isnative($package);  # sets $dh{VERSION}
-  my $oinfo = "debian/$ext" . "oinfo.debhelper"; # ocaml objects info
-  my $olist = "debian/$ext" . "olist.debhelper"; # ocaml object list
-  $olist = $dh{M_PARAMS} if $dh{M_PARAMS}; # override object list with -m
-  my $odeps = "debian/$ext" . "odeps.debhelper"; # ocaml dependencies
-  if (is_library $package, $dh{L_PARAMS}) {  # ocaml library package
-    my $runtime = runtime_of_library $package, $dh{L_PARAMS};
-    my $flags = "--package $package --version $dh{VERSION}";
-    $flags .= " --runtime $runtime" if $runtime;
-      # create md5sum registry entry and post.* scripts
-    complex_doit "find $tmp$ocaml_lib_dir -type f -name '*.cm[ao]' > $olist"
-      unless $dh{M_PARAMS};
-    complex_doit "mkdir -p $tmp$md5dir";
-    complex_doit("$omd5 $flags --dump-info $oinfo compute < $olist"
-      . " | sort -k 2"  # optional pass, just for "pretty" printing
-      . " > $tmp$md5dir/$package$md5ext");
-    autoscript $package, "postinst", "postinst-ocaml";
-    autoscript $package, "postrm", "postrm-ocaml";
-    complex_doit "$omd5 --load-info $oinfo dep < $olist > $odeps"; #compute deps
-    fill_ocaml_depends $package, $tmp, $odeps, 1, $runtime;
-  } elsif (is_binary $package, $dh{L_PARAMS}) {  # ocaml binary package
-    my @binaries = find_ocaml_bc_binaries $tmp;
-    next unless @binaries;  # nothing to do if no bytecode binary has been found
-    complex_doit "> $odeps";
-    if (not $dh{M_PARAMS}) {
-      foreach my $bin (@binaries) { # try to find .cmo of bc binaries
-       my $guess = basename $bin . ".cm[ao]";
-       complex_doit "find . -type f -name '$guess' >> $olist"
-      }
-    }
-    complex_doit "$omd5 dep < $olist > $odeps"; # compute deps
-    fill_ocaml_depends $package, $tmp, $odeps, 0, "";
-  }
-}
-
-=head1 SEE ALSO
-
-L<ocamlobjinfo(1)>, L<debhelper(7)>, L<ocaml-md5sums(1)>
-
-This program is a part of debhelper.
-
-=head1 AUTHOR
-
-Stefano Zacchiroli <zack@debian.org>
-
-=cut
-
diff --git a/doc/registry_feeding.txt b/doc/registry_feeding.txt
deleted file mode 100644 (file)
index 6482b53..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-entries which should be pre-fed into the registry at ocaml package installation
-time:
-
-- ocaml-nox-VERSION [*]
-  registry entry can be generated with:
-
-    dpkg -L ocaml-nox |
-      grep '.cm[ao]' |
-      grep -v ^/usr/lib/ocaml/3.08.3/ocamldoc/ |
-      grep -v ^/usr/lib/ocaml/3.08.3/campl4/ |
-      ocaml-md5sums compute \
-       --package ocaml-nox-3.08.3 --runtime ocaml-base-nox-3.08.3
-
-- ocaml-VERSION [*]
-  registry entry can be generated with:
-
-    dpkg -L ocaml |
-      grep '.cm[ao]' |
-      grep -v ^/usr/lib/ocaml/3.08.3/ocamldoc/ |
-      grep -v ^/usr/lib/ocaml/3.08.3/campl4/ |
-      ocaml-md5sums compute \
-       --package ocaml-3.08.3 --runtime ocaml-base-3.08.3
-
-- ocaml-compiler-libs-VERSION
-  registry entry can be generated with:
-    dpkg -L ocaml-compiler-libs |
-      grep '.cm[ao]' |
-      ocaml-md5sums compute \
-       --package ocaml-compiler-libs-3.08.3
-
-[*] entries in LIBDIR/ocamldoc/ and LIBDIR/camlp4/ are skipped since they
-    contains .cmas which link units that should be indexed per
-    ocaml-compiler-libs. Skipping them avoids duplicate entries in the registry
-
-Sat, 09 Jul 2005 13:44:50 +0200 zack
-
diff --git a/doc/substvar_filling.txt b/doc/substvar_filling.txt
deleted file mode 100644 (file)
index ed2f8b7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-Informal description of the ${ocaml:Depends} filling algorithm.
-
-- delsubstvar("ocaml:Depends")
-- if pkgname is "libfoo-ocaml-dev"
-  (handle also "ocaml:Depends" for "libfoo-ocaml" if it does exist)
-  - find all installed .cm[ao]
-  - run "ocaml-md5sums dep" on them
-  - let D be the set of resulting dependencies
-  - foreach d in D of the form <dev-dependency, runtime-dependency, version>
-    - addsubstvar("ocaml:Depends", "libfoo-ocaml-dev", dev-dependency, version)
-    - if exists package "libfoo-ocaml" and exists runtime-dependency
-      - addsubstvar("ocaml:Depends", "libfoo-ocaml", runtime-dependency, version)
-- if pkgname is something else
-  - find all installed ocaml bytecode binaries
-  - guess corresponding .cm[ao]
-  - run "ocaml-md5sums dep" on them
-  - let D be the set of resulting dependencies
-  - foreach d in D of the form <dev-dependency, runtime-dependency, version>
-    - if exists runtime-dependency
-      - addsubstvar("ocaml:Depends", pkgname, runtime-dependency, version)
-
-Sat, 09 Jul 2005 13:44:59 +0200 zack
-
diff --git a/ocaml-md5sums.ml.in b/ocaml-md5sums.ml.in
deleted file mode 100644 (file)
index c81a534..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-(*
- * ocaml-md5sums - use and maintain debian registry of ocaml md5sums
- *
- * Copyright (C) 2005, Stefano Zacchiroli <zack@debian.org>
- *
- * Created:        Wed, 06 Apr 2005 16:55:39 +0200 zack
- * Last-Modified:  Fri, 12 Aug 2005 10:28:10 +0200 zack
- *
- * This is free software, you can redistribute it and/or modify it under the
- * terms of the GNU General Public License version 2 as published by the Free
- * Software Foundation.
- *
- * 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., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- *)
-
-open Printf
-
-(** {2 Constants} *)
-
-let md5sums_dir = "@MD5SUMS_DIR@"
-let md5sums_index = "MD5SUMS"
-let md5sums_ext = ".md5sums"
-let registry_file = sprintf "%s/%s" md5sums_dir md5sums_index
-
-(** {2 System requirements} *)
-
-let ocamlobjinfo =
-  try                           (* needed at ocaml package build time, when *)
-    Sys.getenv "OCAMLOBJINFO"   (* ocamlobjinfo is not yet installed        *)
-  with Not_found -> "/usr/bin/ocamlobjinfo"
-
-(** {2 Regular expressions, for parsing purposes} *)
-
-let unit_name_line_RE =
-  Str.regexp "^[ \t]*Unit[ \t]+name[ \t]*:[ \t]*\\([a-zA-Z0-9_]+\\)[ \t]*$"
-let md5sum_line_RE =
-  Str.regexp "^[ \t]*\\([a-f0-9]+\\)[ \t]+\\([a-zA-Z0-9_]+\\)[ \t]*$"
-let blanks_RE = Str.regexp "[ \t]+"
-let ignorable_line_RE = Str.regexp "^[ \t]*\\(#.*\\)?"
-let md5sums_ext_RE = Str.regexp (sprintf "^.*%s$" (Str.quote md5sums_ext))
-
-(** {2 Argument parsing} *)
-
-let objects = ref []
-let dev_dep = ref ""
-let runtime_dep = ref "-"
-let dep_version = ref "-"
-let verbosity = ref 0
-let dump_info_to = ref ""
-let load_info_from = ref ""
-let action = ref None
-
-let usage_msg =
-  "Use and maintain system wide ocaml md5sums registry\n"
-  ^ "Usage:\n"
-  ^ " ocaml-md5sum compute --package <name> [option ...] file ...\n"
-  ^ " ocaml-md5sum dep     [option ...] file ...\n"
-  ^ " ocaml-md5sum update  [option ...]\n"
-  ^ "Options:"
-let cmdline_spec = [
-  "--package", Arg.Set_string dev_dep,
-    "set package name for development dependency";
-  "--runtime", Arg.Set_string runtime_dep,
-    "set package name for runtime dependency";
-  "--version", Arg.Set_string dep_version,
-    "set package version for dependencies";
-  "--dump-info", Arg.Set_string dump_info_to,
-    "dump ocamlobjinfo to file";
-  "--load-info", Arg.Set_string load_info_from,
-    "restore ocamlobjinfo from file";
-  "-v", Arg.Unit (fun () -> incr verbosity), "increase verbosity";
-]
-let die_usage () =
-  Arg.usage cmdline_spec usage_msg;
-  exit 1
-
-(** {2 Helpers} *)
-
-let error   msg = prerr_endline ("Error: " ^ msg); exit 2
-let warning msg = prerr_endline ("Warning: " ^ msg)
-let info ?(level = 1) msg =
-  if !verbosity >= level then prerr_endline ("Info: " ^ msg)
-let iter_in f ic =
-  try while true do f (input_line ic) done with End_of_file -> ()
-let iter_file f fname =
-  let ic = open_in fname in
-  iter_in f ic;
-  close_in ic
-let iter_table f = iter_file (fun line -> f (Str.split blanks_RE line))
-
-module Strings = Set.Make (String)
-
-(** read until the end of standard input
- * @return the list of lines read from stdin, without trailing "\n" *)
-let read_stdin () =
-  let lines = ref [] in
-  iter_in (fun s -> lines := s :: !lines) stdin;
-  List.rev !lines
-
-let is_empty fname = (Unix.stat fname).Unix.st_size = 0
-let is_regular fname = (Unix.stat fname).Unix.st_kind = Unix.S_REG
-let is_dir fname = (Unix.stat fname).Unix.st_kind = Unix.S_DIR
-
-(** {2 Auxiliary functions} *)
-
-(** loads info previously stored in a file using --dump-info and stores them in
- * two hashtables
- * @param defined hashtable for md5sums of defined units
- * @param imported hashtable for md5sums of imported units
- * @param fname file where the dump has been saved *)
-let load_info ~defined ~imported fname =
-  info ("loading ocamlobjinfo information from " ^ fname);
-  let lineno = ref 0 in
-  iter_table
-    (fun fields ->
-      incr lineno;
-      match fields with
-      | [ "defined"; md5; unit_name ] ->
-          info ~level:2 (String.concat " " fields);
-          Hashtbl.replace defined unit_name md5
-      | [ "imported"; md5; unit_name ] ->
-          info ~level:2 (String.concat " " fields);
-          Hashtbl.replace imported unit_name md5
-      | _ ->
-          warning (sprintf "ignoring dump entry (%s, line %d)" fname !lineno))
-    fname
-
-(** dumps ocamlobjinfo to file
- * @param defined hashtable containing md5sums of defined units
- * @param imported hashtable containing md5sums of imported units
- * @param fname file where to dump ocamlobjinfo *)
-let dump_info ~defined ~imported fname =
-  info ("dumping ocamlobjinfo information to " ^ fname);
-  let oc = open_out fname in
-  Hashtbl.iter
-    (fun unit_name md5sum -> fprintf oc "defined  %s %s\n" md5sum unit_name)
-    defined;
-  Hashtbl.iter
-    (fun unit_name md5sum -> fprintf oc "imported %s %s\n" md5sum unit_name)
-    imported;
-  close_out oc
-
-(** @param fnames list of *.cm[ao] file names
- * @return a pair of hash tables <defined_units, imported_units>. Both tables
- * contains mappings <unit_name, md5sum>. defined_units lists units defined in
- * given files while imported_units imported ones *)
-let unit_info fnames =
-  let (defined, imported) = (Hashtbl.create 1024, Hashtbl.create 1024) in
-  if !load_info_from <> "" then
-    load_info ~defined ~imported !load_info_from;
-  List.iter
-    (fun fname ->
-      info ("getting unit info from " ^ fname);
-      let current_unit = ref "" in
-      let ic = Unix.open_process_in (sprintf "%s %s" ocamlobjinfo fname) in
-      iter_in
-        (fun line ->
-          if Str.string_match unit_name_line_RE line 0 then
-            current_unit := Str.matched_group 1 line
-          else if Str.string_match md5sum_line_RE line 0 then
-            let md5sum = Str.matched_group 1 line in
-            let unit_name = Str.matched_group 2 line in
-            if unit_name = !current_unit then begin (* defined unit *)
-              let dump_entry = sprintf "defined %s %s" md5sum unit_name in
-              info ~level:2 dump_entry;
-              Hashtbl.replace defined unit_name md5sum
-            end else begin  (* imported unit *)
-              let dump_entry = sprintf "imported %s %s" md5sum unit_name in
-              info ~level:2 dump_entry;
-              Hashtbl.replace imported unit_name md5sum
-            end)
-        ic;
-      close_in ic)
-    fnames;
-  Hashtbl.iter  (* imported := imported - defined *)
-    (fun unit_name _ -> Hashtbl.remove imported unit_name)
-    defined;
-  if !dump_info_to <> "" then
-    dump_info ~defined ~imported !dump_info_to;
-  (defined, imported)
-
-(** pretty print a registry entry sending output to an output channel *)
-let pp_entry outchan ~md5sum ~unit_name ~dev_dep ~runtime_dep ~dep_version =
-  fprintf outchan "%s %s %s %s %s\n"
-    md5sum unit_name dev_dep runtime_dep dep_version
-
-(** iter a function over the entries of a registry file
- * @param f function to be executed for each entries, it takes 4 labeled
- * arguments: ~md5sum ~unit_name ~package ?version
- * @param fname file containining the registry *)
-let iter_registry f fname =
-  info ("processing registry " ^ fname);
-  let lineno = ref 0 in
-  iter_file
-    (fun line ->
-      incr lineno;
-      (match Str.split blanks_RE line with
-      | [ md5sum; unit_name; dev_dep; runtime_dep; dep_version ] ->
-          f ~md5sum ~unit_name ~dev_dep ~runtime_dep ~dep_version
-      | _ when Str.string_match ignorable_line_RE line 0 -> ()
-      | _ ->
-          warning (sprintf "ignoring registry entry (%s, line %d)"
-            fname !lineno)))
-    fname
-
-(** @param fname file name of the registry file, if fname does not exists an
- * empty registry will be returned
- * @return an hashtbl mapping pairs <unit_name, md5sum> to pairs <package_name,
- * version_info>. E.g. ("Foo_bar", "74be7fa4320ebd9415f1c7cfc04c2d7b") ->
- * ("libfoo-ocaml-dev", ">= 1.2.3-4") *)
-let parse_registry fname =
-  let registry = Hashtbl.create 1024 in
-  if Sys.file_exists fname then
-    iter_registry
-      (fun ~md5sum ~unit_name ~dev_dep ~runtime_dep ~dep_version ->
-        Hashtbl.replace registry (unit_name, md5sum)
-          (dev_dep, runtime_dep, dep_version))
-      fname;
-  registry
-
-(** {2 Main functions, one for each command line action} *)
-
-(** compute registry entry for a set of ocaml objects *)
-let compute dev_dep runtime_dep dep_version objects () =
-  let defined, _ = unit_info objects in
-  Hashtbl.iter
-    (fun unit_name md5sum ->
-       pp_entry stdout ~md5sum ~unit_name ~dev_dep ~runtime_dep ~dep_version)
-    defined
-
-(** compute package dependencies for a set of ocaml objects *)
-let dep objects () =
-  let _, imported = unit_info objects in
-  let registry = parse_registry registry_file in
-  let deps =
-    Hashtbl.fold
-      (fun unit_name md5sum deps ->
-        try
-          let (dev_dep, runtime_dep, dep_version) =
-            Hashtbl.find registry (unit_name, md5sum)
-          in
-          Strings.add (sprintf "%s %s %s" dev_dep runtime_dep dep_version) deps
-        with Not_found -> deps)
-      imported
-      Strings.empty
-  in
-  Strings.iter print_endline deps
-
-(** update debian registry of ocaml md5sums *)
-let update () =
-  info (sprintf "updating registry %s using info from %s/"
-    registry_file md5sums_dir);
-  let keys = Hashtbl.create 1024 in (* history of seen registry keys *)
-  if Sys.file_exists md5sums_dir && is_dir md5sums_dir then begin
-    let dir = Unix.opendir md5sums_dir in
-    let registry = open_out registry_file in
-    try
-      while true do
-        let fname = sprintf "%s/%s" md5sums_dir (Unix.readdir dir) in
-        if (Str.string_match md5sums_ext_RE fname 0) && is_regular fname then
-          iter_registry
-            (fun ~md5sum ~unit_name ~dev_dep ~runtime_dep ~dep_version ->
-               if Hashtbl.mem keys (unit_name, md5sum) then
-                 error (sprintf "duplicate entry %s %s in registry" unit_name
-                            md5sum);
-               Hashtbl.replace keys (unit_name, md5sum) ();
-               pp_entry registry ~md5sum ~unit_name ~dev_dep ~runtime_dep
-                 ~dep_version)
-            fname
-      done
-    with End_of_file ->
-      Unix.closedir dir;
-      close_out registry;
-      if is_empty registry_file then Sys.remove registry_file
-  end else
-    warning (sprintf "%s/ does not exist or is not a directory, not updating"
-      md5sums_dir)
-
-(** {2 Main} *)
-
-(** main *)
-let main () =
-  Arg.parse cmdline_spec
-    (fun s ->
-      if !action = None then
-        action := Some s
-      else
-        objects := s :: !objects)
-    usage_msg;
-  match !action with
-  | Some "update" -> update ()
-  | Some action ->
-      let objects =
-        match !objects with
-        | [] when !load_info_from = "" -> read_stdin ()
-        | objects -> List.rev objects
-      in
-      (match action with
-      | "compute" ->
-          if !dev_dep = "" then die_usage ();
-          compute !dev_dep !runtime_dep !dep_version objects ()
-      | "dep" -> dep objects ()
-      | _ -> die_usage ())
-  | None -> die_usage ()
-
-let _ = Unix.handle_unix_error main ()
-
diff --git a/postinst-ocaml b/postinst-ocaml
deleted file mode 100644 (file)
index 734c087..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ "$1" = "configure" ]; then
-  /usr/bin/ocaml-md5sums update
-fi
diff --git a/postrm-ocaml b/postrm-ocaml
deleted file mode 100644 (file)
index 30436a4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-if [ "$1" = "remove" ]; then
-  if [ -x /usr/bin/ocaml-md5sums ]; then
-    /usr/bin/ocaml-md5sums update
-  fi
-fi
diff --git a/samples/README b/samples/README
deleted file mode 100644 (file)
index 6c1abc4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-samples of various kind of files related to dh_ocaml:
-- md5sums/
-    example of /var/lib/ocaml/md5sums directory
-- debian/
-    example of temporary files created/used by dh_ocaml
diff --git a/samples/debian/package.ocamldeps b/samples/debian/package.ocamldeps
deleted file mode 100644 (file)
index 370f633..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libpcre-ocaml-dev 5.08.1
diff --git a/samples/debian/package.ocamlobjects b/samples/debian/package.ocamlobjects
deleted file mode 100644 (file)
index 0ff9282..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/libhttp-ocaml-dev/usr/lib/ocaml/3.08.3/http/http_mt.cma
-debian/libhttp-ocaml-dev/usr/lib/ocaml/3.08.3/http/http.cma
diff --git a/samples/debian/package.ocamlobjinfo b/samples/debian/package.ocamlobjinfo
deleted file mode 100644 (file)
index 9e1be5b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-defined  c05573de1d16c626829a86a9114178a3 Http_constants
-defined  1aa78eb234c3fc3bc0f416b291573a6f Http_types
-defined  a3a8d51dd2bd69e7352f8f339875f0a5 Http_request
-defined  e4fb6d88bd013e8c6b7d5cdf5da2818d Http_parser
-defined  86c5eaed52521c5606cb4de8885cb266 Http_message
-defined  5207ef38468f5d823fc8b4d165f910b0 Http_daemon
-defined  7fdc51ac4d1ae62200a5f17a6447fe04 Http_misc
-defined  9b93712a344b3b9849a73ce19d8c72ce Http_parser_sanity
-defined  35ef57fc877713cafe0056af23e72f71 Http_threaded_tcp_server
-defined  e5acc406e34cd0fed3383020b7adddc3 Http_tcp_server
-defined  aeb4d75d3f09d12fbce675d38c459007 Http_common
-defined  19439a1c72f7e75bc192c83f3940aa50 Http_response
-defined  6511422bf82e8975861e4959a09d7874 Http_user_agent
-imported a904b798dd9665c2d3635636d293403c Array
-imported f8ae506a7cb4411e963d4472e99129ab CamlinternalOO
-imported fec8292bb1a02d2c7b8b4ba7b83a7d8b String
-imported 1876ce678cfa5a1961fac21850f71efd Unix
-imported 3e948b0e41d832c5b47173bc09ac8150 Netencoding
-imported 71f888453b0f26895819460a72f07493 Pervasives
-imported 05c29ad9b353d94564b9f8f4672a3c66 Thread
-imported 2228f51249f46513c6197a189eda178f Netconversion
-imported 5a0e3217fc356bd18f60bff31861dfd3 List
-imported 0adcd5a01603ded6c591dc6133498d65 Gc
-imported a5bb944075f8bf57d7a53a727ebad18c Printexc
-imported d2109515bc23cdb3fdf5138eb0753ef1 Neturl
-imported 8cce770a42b7d0e4d85569c15d7841d6 Sys
-imported 1a18647ed18cd2752c5d8b422aef8fc7 Netbuffer
-imported d2bc46d76835aafc05c738e5c8f8d36f Netchannels
-imported 45f466ce46f213dae41be77dd8505f5f Buffer
-imported 747ef8c0279596e8e3ead3d8049103ed Obj
-imported fe56d403fb8e5d3f355cd87c60345c17 Netdate
-imported 4153115c366a8fde539da120f5e0b928 Lexing
-imported 21f21a0fe1dc667be7e854f573c182b7 Hashtbl
-imported be82cfc078031e7e98378d3e89d18aec Printf
-imported 2f32d87da163d280dc00661dca5ba351 Pcre
diff --git a/samples/md5sums/MD5SUMS b/samples/md5sums/MD5SUMS
deleted file mode 100644 (file)
index 747a054..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-45f466ce46f213dae41be77dd8505f5f Foo_bad libbar-ocaml-dev 2.3-1
-45aaaaae46f213dae41be77dd8505f5f Foo_baz libbar-ocaml-dev 2.3-1
-45f466ce4fffffdae41be77dd8505f5f Foo_baa libbar-ocaml-dev 2.3-1
-000006ce46f2130ae41be77dd8505f5f Foo_bav libbar-ocaml-dev 2.3-1
-45f466ce46f213dae41be77dd8505f5f Foo_bar libfoo-ocaml-dev 1.2.3-4
-00000000000000000000077dd8505f5f Ack_nck libfoo-ocaml-dev 1.2.3-4
-aeb4d75d3f09d12fbce675d38c459007 Http_common libhttp-ocaml-dev 0.1.1+dev
-c05573de1d16c626829a86a9114178a3 Http_constants libhttp-ocaml-dev 0.1.1+dev
-5207ef38468f5d823fc8b4d165f910b0 Http_daemon libhttp-ocaml-dev 0.1.1+dev
-86c5eaed52521c5606cb4de8885cb266 Http_message libhttp-ocaml-dev 0.1.1+dev
-7fdc51ac4d1ae62200a5f17a6447fe04 Http_misc libhttp-ocaml-dev 0.1.1+dev
-e4fb6d88bd013e8c6b7d5cdf5da2818d Http_parser libhttp-ocaml-dev 0.1.1+dev
-9b93712a344b3b9849a73ce19d8c72ce Http_parser_sanity libhttp-ocaml-dev 0.1.1+dev
-a3a8d51dd2bd69e7352f8f339875f0a5 Http_request libhttp-ocaml-dev 0.1.1+dev
-19439a1c72f7e75bc192c83f3940aa50 Http_response libhttp-ocaml-dev 0.1.1+dev
-e5acc406e34cd0fed3383020b7adddc3 Http_tcp_server libhttp-ocaml-dev 0.1.1+dev
-35ef57fc877713cafe0056af23e72f71 Http_threaded_tcp_server libhttp-ocaml-dev 0.1.1+dev
-1aa78eb234c3fc3bc0f416b291573a6f Http_types libhttp-ocaml-dev 0.1.1+dev
-6511422bf82e8975861e4959a09d7874 Http_user_agent libhttp-ocaml-dev 0.1.1+dev
-2f32d87da163d280dc00661dca5ba351 Pcre libpcre-ocaml-dev 5.08.1
diff --git a/samples/md5sums/libbar-ocaml-dev.md5sums b/samples/md5sums/libbar-ocaml-dev.md5sums
deleted file mode 100644 (file)
index 81d52bc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-45f466ce46f213dae41be77dd8505f5f Foo_bad libbar-ocaml-dev 2.3-1
-45aaaaae46f213dae41be77dd8505f5f Foo_baz libbar-ocaml-dev 2.3-1
-45f466ce4fffffdae41be77dd8505f5f Foo_baa libbar-ocaml-dev 2.3-1
-000006ce46f2130ae41be77dd8505f5f Foo_bav libbar-ocaml-dev 2.3-1
diff --git a/samples/md5sums/libfoo-ocaml-dev.md5sums b/samples/md5sums/libfoo-ocaml-dev.md5sums
deleted file mode 100644 (file)
index bd25aab..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-45f466ce46f213dae41be77dd8505f5f Foo_bar libfoo-ocaml-dev 1.2.3-4
-00000000000000000000077dd8505f5f Ack_nck libfoo-ocaml-dev 1.2.3-4
diff --git a/samples/md5sums/libhttp-ocaml-dev.md5sums b/samples/md5sums/libhttp-ocaml-dev.md5sums
deleted file mode 100644 (file)
index 36b2152..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-aeb4d75d3f09d12fbce675d38c459007 Http_common libhttp-ocaml-dev 0.1.1+dev
-c05573de1d16c626829a86a9114178a3 Http_constants libhttp-ocaml-dev 0.1.1+dev
-5207ef38468f5d823fc8b4d165f910b0 Http_daemon libhttp-ocaml-dev 0.1.1+dev
-86c5eaed52521c5606cb4de8885cb266 Http_message libhttp-ocaml-dev 0.1.1+dev
-7fdc51ac4d1ae62200a5f17a6447fe04 Http_misc libhttp-ocaml-dev 0.1.1+dev
-e4fb6d88bd013e8c6b7d5cdf5da2818d Http_parser libhttp-ocaml-dev 0.1.1+dev
-9b93712a344b3b9849a73ce19d8c72ce Http_parser_sanity libhttp-ocaml-dev 0.1.1+dev
-a3a8d51dd2bd69e7352f8f339875f0a5 Http_request libhttp-ocaml-dev 0.1.1+dev
-19439a1c72f7e75bc192c83f3940aa50 Http_response libhttp-ocaml-dev 0.1.1+dev
-e5acc406e34cd0fed3383020b7adddc3 Http_tcp_server libhttp-ocaml-dev 0.1.1+dev
-35ef57fc877713cafe0056af23e72f71 Http_threaded_tcp_server libhttp-ocaml-dev 0.1.1+dev
-1aa78eb234c3fc3bc0f416b291573a6f Http_types libhttp-ocaml-dev 0.1.1+dev
-6511422bf82e8975861e4959a09d7874 Http_user_agent libhttp-ocaml-dev 0.1.1+dev
diff --git a/samples/md5sums/libpcre-ocaml-dev.md5sums b/samples/md5sums/libpcre-ocaml-dev.md5sums
deleted file mode 100644 (file)
index ec222aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-2f32d87da163d280dc00661dca5ba351 Pcre libpcre-ocaml-dev 5.08.1
diff --git a/samples/md5sums/ocaml-base-nox.md5sums b/samples/md5sums/ocaml-base-nox.md5sums
deleted file mode 100644 (file)
index 1a00a3f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# this is a comment
-# version information (4th field) is optional as in the following example
-71f888453b0f26895819460a72f07493 Pervasives ocaml-nox-3.08.3
diff --git a/samples/ocamlobjinfo.out b/samples/ocamlobjinfo.out
deleted file mode 100644 (file)
index 67719c9..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-File tmp/http_mt.cma
-  Force custom: no
-  Extra C object files:
-  Extra C options: -I/usr/lib/ocaml/3.08.3/netstring -I/usr/lib/ocaml/3.08.3/pcre
-  Unit name: Http_constants
-  Interfaces imported:
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       c05573de1d16c626829a86a9114178a3        Http_constants
-  Uses unsafe features: no
-  Unit name: Http_types
-  Interfaces imported:
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       1876ce678cfa5a1961fac21850f71efd        Unix
-  Uses unsafe features: no
-  Unit name: Http_parser_sanity
-  Interfaces imported:
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       9b93712a344b3b9849a73ce19d8c72ce        Http_parser_sanity
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no
-  Unit name: Http_misc
-  Interfaces imported:
-       1a18647ed18cd2752c5d8b422aef8fc7        Netbuffer
-       4153115c366a8fde539da120f5e0b928        Lexing
-       a904b798dd9665c2d3635636d293403c        Array
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       d2bc46d76835aafc05c738e5c8f8d36f        Netchannels
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       fe56d403fb8e5d3f355cd87c60345c17        Netdate
-       5a0e3217fc356bd18f60bff31861dfd3        List
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-  Uses unsafe features: no
-  Unit name: Http_common
-  Interfaces imported:
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-  Uses unsafe features: no
-  Unit name: Http_threaded_tcp_server
-  Interfaces imported:
-       71f888453b0f26895819460a72f07493        Pervasives
-       35ef57fc877713cafe0056af23e72f71        Http_threaded_tcp_server
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       05c29ad9b353d94564b9f8f4672a3c66        Thread
-  Uses unsafe features: no
-  Unit name: Http_tcp_server
-  Interfaces imported:
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       71f888453b0f26895819460a72f07493        Pervasives
-       35ef57fc877713cafe0056af23e72f71        Http_threaded_tcp_server
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       8cce770a42b7d0e4d85569c15d7841d6        Sys
-       e5acc406e34cd0fed3383020b7adddc3        Http_tcp_server
-  Uses unsafe features: no
-  Unit name: Http_parser
-  Interfaces imported:
-       1a18647ed18cd2752c5d8b422aef8fc7        Netbuffer
-       4153115c366a8fde539da120f5e0b928        Lexing
-       a904b798dd9665c2d3635636d293403c        Array
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       d2bc46d76835aafc05c738e5c8f8d36f        Netchannels
-       e4fb6d88bd013e8c6b7d5cdf5da2818d        Http_parser
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       5a0e3217fc356bd18f60bff31861dfd3        List
-       9b93712a344b3b9849a73ce19d8c72ce        Http_parser_sanity
-       3e948b0e41d832c5b47173bc09ac8150        Netencoding
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       2228f51249f46513c6197a189eda178f        Netconversion
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no
-  Unit name: Http_message
-  Interfaces imported:
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       9b93712a344b3b9849a73ce19d8c72ce        Http_parser_sanity
-       5a0e3217fc356bd18f60bff31861dfd3        List
-       86c5eaed52521c5606cb4de8885cb266        Http_message
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       f8ae506a7cb4411e963d4472e99129ab        CamlinternalOO
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       747ef8c0279596e8e3ead3d8049103ed        Obj
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no
-  Unit name: Http_request
-  Interfaces imported:
-       1a18647ed18cd2752c5d8b422aef8fc7        Netbuffer
-       4153115c366a8fde539da120f5e0b928        Lexing
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       e4fb6d88bd013e8c6b7d5cdf5da2818d        Http_parser
-       d2bc46d76835aafc05c738e5c8f8d36f        Netchannels
-       a3a8d51dd2bd69e7352f8f339875f0a5        Http_request
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       5a0e3217fc356bd18f60bff31861dfd3        List
-       86c5eaed52521c5606cb4de8885cb266        Http_message
-       3e948b0e41d832c5b47173bc09ac8150        Netencoding
-       2228f51249f46513c6197a189eda178f        Netconversion
-       f8ae506a7cb4411e963d4472e99129ab        CamlinternalOO
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       747ef8c0279596e8e3ead3d8049103ed        Obj
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no
-  Unit name: Http_daemon
-  Interfaces imported:
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       e4fb6d88bd013e8c6b7d5cdf5da2818d        Http_parser
-       a3a8d51dd2bd69e7352f8f339875f0a5        Http_request
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       5207ef38468f5d823fc8b4d165f910b0        Http_daemon
-       9b93712a344b3b9849a73ce19d8c72ce        Http_parser_sanity
-       5a0e3217fc356bd18f60bff31861dfd3        List
-       8cce770a42b7d0e4d85569c15d7841d6        Sys
-       e5acc406e34cd0fed3383020b7adddc3        Http_tcp_server
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       0adcd5a01603ded6c591dc6133498d65        Gc
-       f8ae506a7cb4411e963d4472e99129ab        CamlinternalOO
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       a5bb944075f8bf57d7a53a727ebad18c        Printexc
-       747ef8c0279596e8e3ead3d8049103ed        Obj
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no
-  Unit name: Http_response
-  Interfaces imported:
-       a904b798dd9665c2d3635636d293403c        Array
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       19439a1c72f7e75bc192c83f3940aa50        Http_response
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       5207ef38468f5d823fc8b4d165f910b0        Http_daemon
-       86c5eaed52521c5606cb4de8885cb266        Http_message
-       c05573de1d16c626829a86a9114178a3        Http_constants
-       f8ae506a7cb4411e963d4472e99129ab        CamlinternalOO
-       747ef8c0279596e8e3ead3d8049103ed        Obj
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-  Uses unsafe features: no
-  Unit name: Http_user_agent
-  Interfaces imported:
-       a904b798dd9665c2d3635636d293403c        Array
-       be82cfc078031e7e98378d3e89d18aec        Printf
-       45f466ce46f213dae41be77dd8505f5f        Buffer
-       2f32d87da163d280dc00661dca5ba351        Pcre
-       e4fb6d88bd013e8c6b7d5cdf5da2818d        Http_parser
-       71f888453b0f26895819460a72f07493        Pervasives
-       1aa78eb234c3fc3bc0f416b291573a6f        Http_types
-       fec8292bb1a02d2c7b8b4ba7b83a7d8b        String
-       6511422bf82e8975861e4959a09d7874        Http_user_agent
-       1876ce678cfa5a1961fac21850f71efd        Unix
-       d2109515bc23cdb3fdf5138eb0753ef1        Neturl
-       a5bb944075f8bf57d7a53a727ebad18c        Printexc
-       aeb4d75d3f09d12fbce675d38c459007        Http_common
-       7fdc51ac4d1ae62200a5f17a6447fe04        Http_misc
-       21f21a0fe1dc667be7e854f573c182b7        Hashtbl
-  Uses unsafe features: no