[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.1-16-g9fea41f

Stephane Glondu steph at glondu.net
Tue Feb 17 10:34:17 UTC 2009


The following commit has been merged in the master branch:
commit 3754e0fcee335adda56ab74908ecad748f83b404
Author: Stephane Glondu <steph at glondu.net>
Date:   Tue Feb 17 07:47:47 2009 +0100

    Wait for /usr/share/cdbs/2 to be more official...

diff --git a/cdbs/1/class/ocaml-vars.mk b/cdbs/1/class/ocaml-vars.mk
deleted file mode 120000
index 87affe8..0000000
--- a/cdbs/1/class/ocaml-vars.mk
+++ /dev/null
@@ -1 +0,0 @@
-../../2/rules/ocamlvars.mk
\ No newline at end of file
diff --git a/cdbs/1/class/ocaml.mk b/cdbs/1/class/ocaml.mk
deleted file mode 120000
index 3492c31..9bd0ea2
--- a/cdbs/1/class/ocaml.mk
+++ /dev/null
@@ -1 +0,0 @@
-../../2/class/ocaml.mk
\ No newline at end of file
diff --git a/cdbs/1/class/ocaml.mk b/cdbs/1/class/ocaml.mk
new file mode 100644
index 3492c31..9bd0ea2
--- /dev/null
+++ b/cdbs/1/class/ocaml.mk
@@ -0,0 +1,121 @@
+#
+# Description: CDBS class for OCaml related packages
+#
+# Copyright © 2006-2007 Stefano Zacchiroli <zack 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# $Id: ocaml.mk 4944 2007-12-28 14:50:46Z zack $
+
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+
+ifndef _cdbs_class_ocaml
+_cdbs_class_ocaml = 1
+
+# needed by debian/control:: rule below
+include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+
+# to ensure invocations and tests on /usr/bin/ocaml* are meaningful
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ocaml-nox
+
+# import OCAML_* make variables
+include $(_cdbs_class_path)/ocaml-vars.mk$(_cdbs_makefile_suffix)
+
+ifdef _cdbs_rules_debhelper
+
+# ensure dpkg-gencontrol will fill F:OCamlABI fields with the proper value
+DEB_DH_GENCONTROL_ARGS += -- -VF:OCamlABI="$(OCAML_ABI)"
+DEB_DH_GENCONTROL_ARGS +=    -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)"
+
+endif
+
+# filter out lines starting with "OPT: "
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+SEDOPTFILTER := -e 's/^OPT: //'
+else
+SEDOPTFILTER := -e '/^OPT: /d'
+endif
+
+# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
+$(patsubst %,binary-install/%,$(DEB_PACKAGES))::
+	@OCAMLDOC="ocamldoc $(OCAML_OCAMLDOC_FLAGS)"; \
+	if test -n "$(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)" ; then \
+		if ! test -x "/usr/bin/ocamlfind"; then \
+			echo "OCamlfind flags set and no ocamlfind to be found" >&2; \
+			exit 1; \
+		fi; \
+		OCAMLDOC="ocamlfind $$OCAMLDOC $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)"; \
+	fi; \
+	OCAML_OCAMLDOC_INCLUDE=`for i in $(OCAML_OCAMLDOC_PACKAGES); do \
+       					find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
+				done`; \
+	if (echo $(OCAML_OCAMLDOC_PACKAGES) | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
+		echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
+		mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) ; \
+		echo 'invoking ocamldoc on debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ ...' ; \
+		find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
+			-type f -name '*.mli' -or -name '*.ml' \
+		| xargs $$OCAMLDOC $$OCAML_OCAMLDOC_INCLUDE \
+			-html $(OCAML_OCAMLDOC_FLAGS_HTML) \
+			-d debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) \
+		|| true ; \
+	fi
+
+# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages
+$(patsubst %,build/%,$(DEB_PACKAGES))::
+	@if (echo $(OCAML_OCAMLDOC_PACKAGES) $(OCAML_OCAMLDOC_PACKAGES_DOCBASE) \
+	  | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
+	  	$(_cdbs_class_path)/ocamldoc-api-ref-config --doc-base-generate $(cdbs_curpkg) ; \
+	fi
+
+clean::
+	rm -f debian/*.doc-base.ocamldoc-apiref
+
+# generate .in files counterpars before building, substituting @OCamlABI@
+# markers with the proper value; clean stamps after building
+pre-build:: ocamlinit
+ocamlinit: ocamlinit-stamp
+ocamlinit-stamp:
+	for f in $(OCAML_IN_FILES) ; do \
+		sed \
+			-e 's, at OCamlABI@,$(OCAML_ABI),g' \
+			-e 's, at OCamlStdlibDir@,$(OCAML_STDLIB_DIR),g' \
+			-e 's, at OCamlDllDir@,$(OCAML_DLL_DIR),g' \
+			$(SEDOPTFILTER) \
+			$$f.in > $$f ; \
+	done
+	touch $@
+clean::
+	rm -f ocamlinit-stamp $(OCAML_IN_FILES)
+
+# avoid dpatch breaking upon clean if debian/patches/*.in files are in use
+deapply-dpatches: ocamlinit
+
+# update debian/control substituting @OCamlNativeArchs@
+# XXX ASSUMPTION: debian/control has already been generated, i.e. this rule is
+# executed after the debian/control:: rule in builcore.mk
+ifneq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
+debian/control::
+	if test -f debian/control && test -f debian/control.in ; then \
+		sed -i \
+			-e "s/@OCamlNativeArchs@/$(OCAML_NATIVE_ARCHS)/g" \
+			-e "s/@OCamlTeam@/$(OCAML_TEAM)/g" \
+			$@ ; \
+	fi
+endif
+
+endif
+
diff --git a/cdbs/2/class/ocaml.mk b/cdbs/2/class/ocaml.mk
deleted file mode 100644
index 9bd0ea2..0000000
--- a/cdbs/2/class/ocaml.mk
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# Description: CDBS class for OCaml related packages
-#
-# Copyright © 2006-2007 Stefano Zacchiroli <zack 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# $Id: ocaml.mk 4944 2007-12-28 14:50:46Z zack $
-
-_cdbs_scripts_path ?= /usr/lib/cdbs
-_cdbs_rules_path ?= /usr/share/cdbs/1/rules
-_cdbs_class_path ?= /usr/share/cdbs/1/class
-
-ifndef _cdbs_class_ocaml
-_cdbs_class_ocaml = 1
-
-# needed by debian/control:: rule below
-include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
-
-# to ensure invocations and tests on /usr/bin/ocaml* are meaningful
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ocaml-nox
-
-# import OCAML_* make variables
-include $(_cdbs_class_path)/ocaml-vars.mk$(_cdbs_makefile_suffix)
-
-ifdef _cdbs_rules_debhelper
-
-# ensure dpkg-gencontrol will fill F:OCamlABI fields with the proper value
-DEB_DH_GENCONTROL_ARGS += -- -VF:OCamlABI="$(OCAML_ABI)"
-DEB_DH_GENCONTROL_ARGS +=    -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)"
-
-endif
-
-# filter out lines starting with "OPT: "
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-SEDOPTFILTER := -e 's/^OPT: //'
-else
-SEDOPTFILTER := -e '/^OPT: /d'
-endif
-
-# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
-$(patsubst %,binary-install/%,$(DEB_PACKAGES))::
-	@OCAMLDOC="ocamldoc $(OCAML_OCAMLDOC_FLAGS)"; \
-	if test -n "$(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)" ; then \
-		if ! test -x "/usr/bin/ocamlfind"; then \
-			echo "OCamlfind flags set and no ocamlfind to be found" >&2; \
-			exit 1; \
-		fi; \
-		OCAMLDOC="ocamlfind $$OCAMLDOC $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)"; \
-	fi; \
-	OCAML_OCAMLDOC_INCLUDE=`for i in $(OCAML_OCAMLDOC_PACKAGES); do \
-       					find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
-				done`; \
-	if (echo $(OCAML_OCAMLDOC_PACKAGES) | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-		echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
-		mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) ; \
-		echo 'invoking ocamldoc on debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ ...' ; \
-		find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
-			-type f -name '*.mli' -or -name '*.ml' \
-		| xargs $$OCAMLDOC $$OCAML_OCAMLDOC_INCLUDE \
-			-html $(OCAML_OCAMLDOC_FLAGS_HTML) \
-			-d debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) \
-		|| true ; \
-	fi
-
-# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages
-$(patsubst %,build/%,$(DEB_PACKAGES))::
-	@if (echo $(OCAML_OCAMLDOC_PACKAGES) $(OCAML_OCAMLDOC_PACKAGES_DOCBASE) \
-	  | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-	  	$(_cdbs_class_path)/ocamldoc-api-ref-config --doc-base-generate $(cdbs_curpkg) ; \
-	fi
-
-clean::
-	rm -f debian/*.doc-base.ocamldoc-apiref
-
-# generate .in files counterpars before building, substituting @OCamlABI@
-# markers with the proper value; clean stamps after building
-pre-build:: ocamlinit
-ocamlinit: ocamlinit-stamp
-ocamlinit-stamp:
-	for f in $(OCAML_IN_FILES) ; do \
-		sed \
-			-e 's, at OCamlABI@,$(OCAML_ABI),g' \
-			-e 's, at OCamlStdlibDir@,$(OCAML_STDLIB_DIR),g' \
-			-e 's, at OCamlDllDir@,$(OCAML_DLL_DIR),g' \
-			$(SEDOPTFILTER) \
-			$$f.in > $$f ; \
-	done
-	touch $@
-clean::
-	rm -f ocamlinit-stamp $(OCAML_IN_FILES)
-
-# avoid dpatch breaking upon clean if debian/patches/*.in files are in use
-deapply-dpatches: ocamlinit
-
-# update debian/control substituting @OCamlNativeArchs@
-# XXX ASSUMPTION: debian/control has already been generated, i.e. this rule is
-# executed after the debian/control:: rule in builcore.mk
-ifneq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
-debian/control::
-	if test -f debian/control && test -f debian/control.in ; then \
-		sed -i \
-			-e "s/@OCamlNativeArchs@/$(OCAML_NATIVE_ARCHS)/g" \
-			-e "s/@OCamlTeam@/$(OCAML_TEAM)/g" \
-			$@ ; \
-	fi
-endif
-
-endif
-
diff --git a/debian/changelog b/debian/changelog
index 52234ce..28e4843 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,12 +13,12 @@ dh-ocaml (0.2) UNRELEASED; urgency=low
   * CDBS:
     - handle lines starting with "OPT: " in *.in files
     - remove Julien from $(OCAML_TEAM)
-    - start a level 2 CDBS compatibility layer with proper layout
-    - provide ocamlinit snippet in a CDBS rules file
+    - move parts of CDBS to /usr/share/ocaml
+  * Provide ocamlinit snippet in /usr/share/ocaml
   * Set Maintainer to d-o-m, add Stefano and me to Uploaders
   * Add DM-Upload-Allowed (with Stefano's blessing)
 
- -- Stephane Glondu <steph at glondu.net>  Mon, 16 Feb 2009 17:22:26 +0100
+ -- Stephane Glondu <steph at glondu.net>  Tue, 17 Feb 2009 07:46:03 +0100
 
 dh-ocaml (0.1) experimental; urgency=low
 
diff --git a/debian/install b/debian/install
index 42698f5..3dbb3cd 100644
--- a/debian/install
+++ b/debian/install
@@ -1,4 +1,3 @@
-cdbs/1			usr/share/cdbs
-cdbs/2			usr/share/cdbs
-cdbs/scripts/*          usr/share/ocaml
-debhelper/dh_ocaml	usr/bin/
+cdbs/1                  usr/share/cdbs
+share/*                 usr/share/ocaml
+debhelper/dh_ocaml      usr/bin/
diff --git a/debian/links b/debian/links
index 016ca17..1acc782 100644
--- a/debian/links
+++ b/debian/links
@@ -10,3 +10,4 @@
 
 /usr/share/ocaml/ocamldoc-api-ref-config                /usr/share/cdbs/1/class/ocamldoc-api-ref-config
 /usr/share/ocaml/ocaml-docbase-template.txt             /usr/share/cdbs/1/class/ocaml-docbase-template.txt
+/usr/share/ocaml/ocamlvars.mk                           /usr/share/cdbs/1/class/ocaml-vars.mk
diff --git a/debian/rules b/debian/rules
index 9daf226..e3f5fdd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ clean:
 
 install: build install-stamp
 install-stamp:
-	chmod +x cdbs/scripts/ocamldoc-api-ref-config
+	chmod +x share/ocamldoc-api-ref-config
 	dh install
 	touch install-stamp
 
diff --git a/cdbs/scripts/ocaml-docbase-template.txt b/share/ocaml-docbase-template.txt
similarity index 100%
rename from cdbs/scripts/ocaml-docbase-template.txt
rename to share/ocaml-docbase-template.txt
diff --git a/cdbs/scripts/ocamldoc-api-ref-config b/share/ocamldoc-api-ref-config
similarity index 100%
rename from cdbs/scripts/ocamldoc-api-ref-config
rename to share/ocamldoc-api-ref-config
diff --git a/cdbs/2/rules/ocamlinit.mk b/share/ocamlinit.mk
similarity index 92%
rename from cdbs/2/rules/ocamlinit.mk
rename to share/ocamlinit.mk
index 44e5193..1f517e7 100644
--- a/cdbs/2/rules/ocamlinit.mk
+++ b/share/ocamlinit.mk
@@ -20,13 +20,13 @@
 #
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
-_cdbs_rules_path ?= /usr/share/cdbs/2/rules
-_cdbs_class_path ?= /usr/share/cdbs/2/class
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
 
 ifndef _cdbs_rules_ocamlinit
 _cdbs_rules_ocamlinit = 1
 
-include $(_cdbs_rules_path)/ocamlvars.mk$(_cdbs_makefile_suffix)
+include $(_cdbs_class_path)/ocaml-vars.mk$(_cdbs_makefile_suffix)
 
 # list of .in files contained (non-recursively) in debian/ that requires
 # pre-build filling.
diff --git a/cdbs/2/rules/ocamlvars.mk b/share/ocamlvars.mk
similarity index 100%
rename from cdbs/2/rules/ocamlvars.mk
rename to share/ocamlvars.mk

-- 
dh-ocaml packaging



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