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

Mehdi Dogguy dogguy at pps.jussieu.fr
Sat Jul 25 09:47:25 UTC 2009


The following commit has been merged in the master branch:
commit e743165198da44825c713e8d7056dae2c077b36a
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Fri Jul 24 15:48:34 2009 +0200

    Various fixes in ocaml.mk and dh_ocaml

diff --git a/cdbs/1/rules/ocaml.mk b/cdbs/1/rules/ocaml.mk
index 7096f07..28216c1 100644
--- a/cdbs/1/rules/ocaml.mk
+++ b/cdbs/1/rules/ocaml.mk
@@ -28,7 +28,7 @@ _cdbs_class_ocaml = 1
 
 # needed by debian/control:: rule below
 include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
-include $(_ocaml_share_path)/ocamlinit.mk
+include $(_ocaml_share_path)/ocamlvars.mk
 
 # space separated list of packages matching the naming convention for OCaml
 # development libraries, i.e. libXXX-ocaml-dev.
@@ -80,11 +80,14 @@ clean::
 
 # generate .in files counterpars before building, substituting @OCamlABI@
 # markers with the proper value; clean stamps after building
-pre-build:: ocamlinit
-clean:: ocamlinit-clean
+dh-ocamlinit:
+	dh_ocamlinit
+pre-build:: dh-ocamlinit
+clean::
+	dh_ocamlinit -d
 
 # avoid dpatch breaking upon clean if debian/patches/*.in files are in use
-deapply-dpatches: ocamlinit
+deapply-dpatches: dh-ocamlinit
 
 # update debian/control substituting @OCamlNativeArchs@
 # XXX ASSUMPTION: debian/control has already been generated, i.e. this rule is
diff --git a/debhelper/dh_ocaml b/debhelper/dh_ocaml
index 8478fa6..5296099 100755
--- a/debhelper/dh_ocaml
+++ b/debhelper/dh_ocaml
@@ -360,7 +360,7 @@ foreach my $package (keys(%dev_packages), @binary_packages)
         }, @paths;
     };
     close(OLIST) unless $dh{NO_ACT};
-    do_it("cat $olist_fn") if $dh{VERBOSE};
+    doit("cat $olist_fn") if $dh{VERBOSE};
   };
 };
 
diff --git a/debian/changelog b/debian/changelog
index 9113f03..a29a554 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ dh-ocaml (0.9.0) UNRELEASED; urgency=low
   * Install ocaml.pm to enable: dh --with ocaml
   * Execute dh_ocaml before dh_gencontrol in the dh sequence
   * Simplify build process
+  * Make the cdbs rule ocaml.mk work with the dh_ocaml scripts suite.
 
  -- Mehdi Dogguy <dogguy at pps.jussieu.fr>  Fri, 24 Jul 2009 03:56:45 +0200
 
diff --git a/share/ocamldoc-api-ref-config b/share/ocamldoc-api-ref-config
deleted file mode 100755
index b72b605..0000000
--- a/share/ocamldoc-api-ref-config
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh 
-# ocamldoc-api-ref-config: configuration and generation of .doc-base.ocamldoc-apiref
-# Copyright (C) 2006 Sylvain Le Gall <gildor at debian.org>
-#
-# 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 St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-set -e
-#set -x
-
-print_usage ()
-{
-  PRG=`basename $0`
-  cat <<EOF
-$PRG -- Written by Sylvain Le Gall 
-"This program is under GPL v2"
-
-Usage:
-$PRG [options] package*
-
-Options:
---html-directory     Output the directory name where the generated ocamldoc 
-                     generated file should go
---doc-base-generate  Generate debian/PACKAGE.doc-base.ocamldoc-apiref
-
-EOF
-}
-
-error_usage ()
-{
-  print_usage >&2
-  echo $* >&2
-  exit 1
-}
-
-html_directory ()
-{
-  echo "/usr/share/doc/$1/html/api"
-}
-
-doc_base_generate ()
-{
-  if ! test -d "debian"; then
-    echo "Cannot find debian directory for generation" >&2
-    exit 1
-  fi
-  PKG="$1"
-  PKG_DIR=`html_directory $PKG`
-  FILE="debian/$PKG.doc-base.ocamldoc-apiref"
-  echo $FILE
-  cat > $FILE <<EOF
-Document: $PKG-ocamldoc-api-reference
-Title: $PKG OCamldoc API Reference
-Abstract: API reference manual for $PKG (generated via OCamldoc)
-Section: Programming/OCaml
-
-Format: HTML
-Index: $PKG_DIR/index.html
-Files: $PKG_DIR/*
-EOF
-}
-
-ACTION=true
-PACKAGES=
-
-while test $# -gt 0; do
-  case "$1" in
-    --html-directory)
-      ACTION="html_directory"
-    ;;
-    --doc-base-generate)
-      ACTION="doc_base_generate"
-    ;;
-    --help|-help|-?)
-      print_usage
-      exit 0
-    ;;
-    -*)
-      error_usage "Unknown option $1"
-    ;;
-    *)
-      PACKAGES="$PACKAGES $1"
-    ;;      
-  esac
-  shift
-done
-
-for i in $PACKAGES; do
-  $ACTION $i
-done
-
diff --git a/share/ocamlinit.mk b/share/ocamlinit.mk
deleted file mode 100644
index 5db3412..0000000
--- a/share/ocamlinit.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Description: Useful Makefile rules for OCaml related 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.
-#
-
-_ocaml_share_path ?= /usr/share/ocaml
-
-ifndef _ocaml_share_ocamlinit
-_ocaml_share_ocamlinit = 1
-
-include $(_ocaml_share_path)/ocamlvars.mk
-
-# list of .in files contained (non-recursively) in debian/ that requires
-# pre-build filling.
-# debian/rules writers might need to add stuff to this list:
-#  e.g.: OCAML_IN_FILES += debian/patches/foo	# (no .in extension)
-OCAML_IN_FILES ?= $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-
-# WARNING: there are currently duplications with ocamlvars.mk and
-# ocaml.mk, but hopefully they will be removed at some point in the
-# future
-
-OCAMLINIT_SED := \
-  -e 's%@OCamlABI@%$(OCAML_ABI)%g' \
-  -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%g' \
-  -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%g'
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-  OCAMLINIT_SED += -e 's/^OPT: //' -e '/^BYTE: /d'
-else
-  OCAMLINIT_SED += -e '/^OPT: /d' -e 's/^BYTE: //'
-endif
-
-ocamlinit: ocamlinit-stamp
-ocamlinit-stamp:
-	for t in $(OCAML_IN_FILES); do \
-	  sed $(OCAMLINIT_SED) $$t.in > $$t; \
-	done
-	touch $@
-
-ocamlinit-clean:
-	rm -f ocamlinit-stamp $(OCAML_IN_FILES)
-
-.PHONY: ocamlinit ocamlinit-clean
-
-endif

-- 
dh-ocaml packaging



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