[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.5.0-21-g3ce70fe

Sylvain Le Gall gildor at debian.org
Thu Jul 23 23:18:45 UTC 2009


The following commit has been merged in the master branch:
commit 3ce70febe97a5aba01f1874a6975f32c932e18b3
Author: Sylvain Le Gall <gildor at debian.org>
Date:   Thu Jul 23 23:14:59 2009 +0000

    Tidy up package and fix installation problem
    
    * Regroup debhelper related files
    * Correctly install files in the package
    * Really clean everything
    * Die with error if some command failed in dh_ocaml or ocaml-md5sums
    * Avoid calling verbose_print in File::Find wanted

diff --git a/Makefile b/Makefile
index c1b73eb..9c2d07e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
 DOCS =						\
 	policy/ocaml_packaging_policy.txt	\
 	policy/ocaml_packaging_policy.html/	\
-	debhelper/dh_ocaml.1			\
 	$(NULL)
 
 all: $(DOCS)
+	$(MAKE) -C debhelper/ $@
 
 policy/%:
 	$(MAKE) -C policy/ $*
-debhelper/%:
-	$(MAKE) -C debhelper/ $*
 
-clean: policy/clean
-clean: debhelper/clean
+clean: 
+	$(MAKE) -C policy/ clean
+	$(MAKE)	-C debhelper/ clean
+	$(MAKE)	-C manpages/ clean
diff --git a/debhelper/Makefile b/debhelper/Makefile
index 17695aa..63ea989 100644
--- a/debhelper/Makefile
+++ b/debhelper/Makefile
@@ -1,5 +1,5 @@
 
-PAGES=dh_ocaml.1 dh_ocamlinit.1 dh_ocamldoc.1
+PAGES=dh_ocaml.1 dh_ocamlinit.1 dh_ocamldoc.1 ocaml-md5sums.1
 
 all:
 	for i in $(PAGES); do \
diff --git a/debhelper/dh_ocaml b/debhelper/dh_ocaml
index 5b54abb..72d7c7b 100755
--- a/debhelper/dh_ocaml
+++ b/debhelper/dh_ocaml
@@ -329,8 +329,6 @@ foreach my $package (keys(%dev_packages), @binary_packages)
           &&
           test_bytecode($_)
           &&
-          (verbose_print "Adding $File::Find::name to scanned object")
-          &&
           (!$dh{NO_ACT})
           &&
           (print OLIST $File::Find::name."\n")
@@ -344,18 +342,17 @@ foreach my $package (keys(%dev_packages), @binary_packages)
 
       find 
         sub {
-          $_ =~ /\.cm([iaox]|x[as])$/
+          ($_ =~ /\.cm([iaox]|x[as])$/)
           &&
           !excludefile($File::Find::name)
           &&
-          (verbose_print "Adding ".$File::Find::name." to scanned object")
-          &&
           (!$dh{NO_ACT})
           &&
           (print OLIST $File::Find::name."\n")
         }, @paths;
     };
     close(OLIST) unless $dh{NO_ACT};
+    do_it("cat $olist_fn") if $dh{VERBOSE};
   };
 };
 
@@ -381,7 +378,7 @@ foreach my $package (keys(%dev_packages)) {
     . " --dump-info $oinfo_fn"
     . " --dump-provides $oprovides_fn"
     . " compute < ".$olist{$package}
-    . " > $md5sums_fn");
+    . " > $md5sums_fn") || die "Cannot compute $md5sums_fn";
 
   if (!$dh{NO_ACT})
   {
@@ -425,6 +422,7 @@ foreach my $package (keys(%dev_packages)) {
       addsubstvar $package, "ocaml:Depends", "$dep_dev-$ck";
       addsubstvar $runtime, "ocaml:Depends", "$dep_run-$ck" if $runtime && $dep_run ne "-";
     }
+    die "Error running $cmd" if $?;
   }
 }
 
@@ -444,6 +442,7 @@ foreach my $package (@binary_packages) {
       # matched groups: dev_dep, runtime_dep, dep_version
       addsubstvar $package, "ocaml:Depends", "$dep_run-$ck" if $dep_run ne "-";
     }
+    die "Error running $cmd" if $?;
   }
 }
 
diff --git a/ocaml-md5sums/ocaml-md5sums b/debhelper/ocaml-md5sums
similarity index 98%
rename from ocaml-md5sums/ocaml-md5sums
rename to debhelper/ocaml-md5sums
index 6f698da..b38435f 100755
--- a/ocaml-md5sums/ocaml-md5sums
+++ b/debhelper/ocaml-md5sums
@@ -126,6 +126,7 @@ sub add_object
         $self->add_unit($symbol_table, $2, $1);
       };
     };
+    die "Error running $ocamlobjinfo" if $?;
   }
   elsif ($obj_file =~ /.*\.(cmx|cmxa|cmxs)$/)
   {
@@ -151,6 +152,7 @@ sub add_object
         $self->add_unit("imported", $1, $2);
       };
     };
+    die "Error running $command" if $?;
   }
   else
   {
@@ -164,6 +166,7 @@ sub add_object
         $self->add_unit("imported", $2, $1);
       };
     };
+    die "Error running $ocamlobjinfo" if $?;
     die "Don't know how to process $obj_file\n" unless $processed;
   };
 
diff --git a/debian/TODO b/debian/TODO
index 1f58701..8b13789 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,4 +1 @@
 
-- migrate ocaml-md5sums to OCaml to some scripting language, so as to
-  not induce circular dependencies in the OCaml build process
-
diff --git a/debian/install b/debian/install
index 79afef5..4b79887 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,7 @@
-cdbs/1                      usr/share/cdbs
-share/*                     usr/share/ocaml
-debhelper/dh_ocaml          usr/bin
-tools/*                     usr/bin
-ocaml-md5sums/ocaml-md5sums usr/bin
+cdbs/1                  usr/share/cdbs
+share/*                 usr/share/ocaml
+debhelper/dh_ocaml      usr/bin
+debhelper/dh_ocamlinit  usr/bin
+debhelper/dh_ocamldoc   usr/bin
+debhelper/ocaml-md5sums usr/bin
+tools/*                 usr/bin
diff --git a/debian/manpages b/debian/manpages
index 8c030a8..9e6fded 100644
--- a/debian/manpages
+++ b/debian/manpages
@@ -1,8 +1,2 @@
-debhelper/dh_ocaml.1
-ocaml-md5sums/ocaml-md5sums.1
-manpages/dom-new-git-repo.1
-manpages/dom-git-checkout.1
-manpages/dom-safe-pull.1
-manpages/dom-save-patches.1
-manpages/dom-apply-patches.1
-manpages/dom-mrconfig.1
+debhelper/*.1
+manpages/*.1
diff --git a/ocaml-md5sums/feeding.sh b/ocaml-md5sums/feeding.sh
deleted file mode 100755
index 80cc854..0000000
--- a/ocaml-md5sums/feeding.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2005, Stefano Zacchiroli <zack at debian.org>
-#
-# 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.
-
-pkg="$1"
-stdlibdir="$2"
-version="$3"
-rootdir="$4"
-SORT="sort -k 2"
-if [ -x ./ocaml-md5sums.opt ]; then
-  OCAML_MD5SUMS="./ocaml-md5sums.opt"
-elif [ -x ./ocaml-md5sums ]; then
-  OCAML_MD5SUMS="./ocaml-md5sums"
-else
-  echo "Can't find ocaml-md5sums{.opt,}, aborting."
-  exit 2
-fi
-export OCAMLOBJINFO="../../boot/ocamlrun ../../tools/objinfo"
-COMPUTE="$OCAML_MD5SUMS compute --package $pkg-$version"
-if [ -z "$pkg" ] || [ -z "$stdlibdir" ] || [ -z "$version" ] || [ -z "$rootdir" ]; then
-  echo "Usage: feeding.sh <pkg_name> <stdlib_dir> <ocaml_version> <root_dir>"
-  exit 1
-fi
-case "$pkg" in
-  ocaml-compiler-libs)
-    find $rootdir -name "*.cm[ao]" | $COMPUTE | $SORT
-    ;;
-  *)
-    RUNTIME="`echo $pkg | sed 's/ocaml/ocaml-base/'`-$version"
-    find $rootdir -name "*.cm[ao]" |
-      grep -v $stdlibdir/ocamldoc/ |
-      grep -v $stdlibdir/camlp4/ |
-      $COMPUTE --runtime $RUNTIME |
-      $SORT
-    ;;
-esac
-

-- 
dh-ocaml packaging



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