[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, master, updated. debian/3.11.0-1-20-g16150b8

Stephane Glondu steph at glondu.net
Mon Feb 16 15:56:05 UTC 2009


The following commit has been merged in the master branch:
commit 16150b8471d34f2362bcb746cf6b05f9b75319ab
Author: Stephane Glondu <steph at glondu.net>
Date:   Mon Feb 16 16:49:07 2009 +0100

    Use ocamlinit snippet provided by dh-ocaml

diff --git a/debian/changelog b/debian/changelog
index 0f8dbc6..3965e09 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ ocaml (3.11.0-2) UNRELEASED; urgency=low
     - more extensive use of debhelper 7
     - do no longer use deprecated dh_movefiles and *.files
     - get closer to CDBS API
+    - use ocamlinit snippet provided by dh-ocaml
     - add a build cache (for Debian debugging)
     - ship labltk examples in a tarball
     - reflect original locations of camlp4 *.mli files in binary packages
@@ -17,7 +18,7 @@ ocaml (3.11.0-2) UNRELEASED; urgency=low
   * Build and install dumpapprox, and provide a manpage
   * Discriminate *-nox packages in short descriptions (thanks Lintian)
 
- -- Stephane Glondu <steph at glondu.net>  Mon, 16 Feb 2009 00:27:36 +0100
+ -- Stephane Glondu <steph at glondu.net>  Mon, 16 Feb 2009 16:49:39 +0100
 
 ocaml (3.11.0-1) experimental; urgency=low
 
diff --git a/debian/control b/debian/control
index 9910323..12fc2b9 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,17 @@ Uploaders:
  Ralf Treinen <treinen at debian.org>,
  Stephane Glondu <steph at glondu.net>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7), tcl8.4-dev, tk8.4-dev, libncurses5-dev, libgdbm-dev, dpatch, bzip2, docbook-xml, docbook-utils
+Build-Depends:
+ debhelper (>= 7),
+ tcl8.4-dev,
+ tk8.4-dev,
+ libncurses5-dev,
+ libgdbm-dev,
+ dpatch,
+ bzip2,
+ docbook-xml,
+ docbook-utils,
+ dh-ocaml
 Standards-Version: 3.8.0
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocaml.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git
diff --git a/debian/rules b/debian/rules
index 1353578..2b1e481 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,14 +6,26 @@ ALL_PACKAGES := $(shell sed -ne 's/^Package: //p' debian/control)
 OCAMLMAJOR := 3.11
 OCAMLMINOR := 0
 
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_ARCH      ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+OCAML_OPT_ARCH      ?= $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
+
 # Build cache (for Debian debugging)
 BUILDCACHE := $(wildcard ../ocaml.cache)
 
-# These are also in CDBS
+# These are defined in ocamlvars.mk, but we redefine it since ocaml is not installed
 OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR)
 OCAML_STDLIB_DIR := /usr/lib/ocaml/$(OCAML_ABI)
 OCAML_DLL_DIR = $(OCAML_STDLIB_DIR)/stublibs
 OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs)
+OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no)
+
+# We do not want ocamlvars.mk to be sourced again
+_cdbs_class_ocaml_vars = 1
+include /usr/share/cdbs/2/rules/ocamlinit.mk
 
 MD5SUMSDIR = /var/lib/ocaml/md5sums
 INSTDIR = $(CURDIR)/debian/tmp/usr
@@ -26,13 +38,6 @@ SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar.bz2
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_BUILD_ARCH      ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-OCAML_OPT_ARCH      ?= $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
-
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -56,25 +61,9 @@ CONFIGURE_SED := \
   -e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)/lib/ocaml/$(OCAML_ABI)%g" \
   -e "s%STUBLIBDIR=.*$$%STUBLIBDIR=\$$(PREFIX)/lib/ocaml/$(OCAML_ABI)/stublibs%g"
 
-# These are also in CDBS
-OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-OCAMLINIT_SED := -e 's%^ \+%%' \
-  -e 's%@OCamlABI@%$(OCAML_ABI)%' \
-  -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%' \
-  -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%'
-ifeq (,$(OCAML_OPT_ARCH))
-  OCAMLINIT_SED += -e '/^OPT: /d'
-else
-  OCAMLINIT_SED += -e 's/^OPT: //'
-endif
 
 patch-stamp: debian/$(SRCTARBALL)
-
 ocamlinit-stamp: debian/$(SRCTARBALL)
-	for t in $(OCAML_IN_FILES); do \
-	  sed $(OCAMLINIT_SED) $$t.in > $$t; \
-	done
-	touch $@
 
 # Generate ocaml-native-compilers' Architecture field.
 # Should never be called automatically.
@@ -140,7 +129,7 @@ endif
 	dh build --after dh_auto_test
 	touch $@
 
-clean: unpatch
+clean: unpatch ocamlinit-clean
 	dh clean --before dh_auto_clean
 ifneq ($(wildcard $(CURDIR)/config/Makefile),)
 	$(MAKE) clean
@@ -160,7 +149,7 @@ endif
 		sed -i 1d emacs/ocamltags.in; \
 	fi
 # Remaining stuff
-	-rm -Rf debian/$(SRCTARBALL) $(OCAML_IN_FILES)
+	-rm -Rf debian/$(SRCTARBALL)
 	dh clean --after dh_auto_clean
 
 install: install-stamp

-- 
OCaml packaging



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