[Pkg-ocaml-maint-commits] [SCM] lablgtk2 packaging branch, master, updated. debian/2.12.0-1-4-g9fb7bd5

Samuel Mimram samuel.mimram at ens-lyon.org
Thu Feb 19 08:46:49 UTC 2009


The following commit has been merged in the master branch:
commit 9fb7bd5767710df97956219d04e7a8aef18deff2
Author: Samuel Mimram <samuel.mimram at ens-lyon.org>
Date:   Thu Feb 19 09:46:28 2009 +0100

    Use dh-ocaml predefined variables in rules.

diff --git a/debian/changelog b/debian/changelog
index f90e6a3..c931bf3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
 lablgtk2 (2.12.0-2) UNRELEASED; urgency=low
 
+  [ Stephane Glondu ]
   * Remove various versioned dependencies
   * Switch packaging to git
 
- -- Stephane Glondu <steph at glondu.net>  Mon, 16 Feb 2009 15:23:11 +0100
+  [ Samuel Mimram ]
+  * Use dh-ocaml predefined variables in rules.
+
+ -- Samuel Mimram <smimram at debian.org>  Thu, 19 Feb 2009 09:34:31 +0100
 
 lablgtk2 (2.12.0-1) experimental; urgency=low
 
diff --git a/debian/control b/debian/control
index 3854381..ba1d794 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Uploaders:
  Stephane Glondu <steph at glondu.net>
 Build-Depends:
  debhelper (>> 7.0.0),
- dh-ocaml,
+ dh-ocaml (>= 0.2),
  ocaml,
  camlp4,
  libncurses5-dev,
diff --git a/debian/liblablgtk2-gl-ocaml-dev.dirs.in b/debian/liblablgtk2-gl-ocaml-dev.dirs.in
index 8b82071..b6ebae6 100644
--- a/debian/liblablgtk2-gl-ocaml-dev.dirs.in
+++ b/debian/liblablgtk2-gl-ocaml-dev.dirs.in
@@ -1,3 +1,3 @@
-usr/lib/ocaml/@OCamlABI@/METAS
-usr/lib/ocaml/@OCamlABI@/lablgtk2
+ at OCamlStdlibDir@/METAS
+ at OCamlStdlibDir@/lablgtk2
 usr/share/doc/liblablgtk2-gl-ocaml-dev/examples
diff --git a/debian/liblablgtk2-gl-ocaml-dev.files.in b/debian/liblablgtk2-gl-ocaml-dev.files.in
index fe75c8a..cac6cee 100644
--- a/debian/liblablgtk2-gl-ocaml-dev.files.in
+++ b/debian/liblablgtk2-gl-ocaml-dev.files.in
@@ -1,3 +1,3 @@
-usr/lib/ocaml/@OCamlABI@/lablgtk2/glGtk.*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/lablgtkgl.*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/liblablgtkgl2*
+ at OCamlStdlibDir@/lablgtk2/glGtk.*
+ at OCamlStdlibDir@/lablgtk2/lablgtkgl.*
+ at OCamlStdlibDir@/lablgtk2/liblablgtkgl2*
diff --git a/debian/liblablgtk2-gl-ocaml.dirs.in b/debian/liblablgtk2-gl-ocaml.dirs.in
index b9e0896..a8131b4 100644
--- a/debian/liblablgtk2-gl-ocaml.dirs.in
+++ b/debian/liblablgtk2-gl-ocaml.dirs.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs
+ at OCamlDllDir@
diff --git a/debian/liblablgtk2-gl-ocaml.files.in b/debian/liblablgtk2-gl-ocaml.files.in
index 71fe6f0..c220d33 100644
--- a/debian/liblablgtk2-gl-ocaml.files.in
+++ b/debian/liblablgtk2-gl-ocaml.files.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablgtkgl2.so
+ at OCamlDllDir@/dlllablgtkgl2.so
diff --git a/debian/liblablgtk2-gnome-ocaml.dirs.in b/debian/liblablgtk2-gnome-ocaml.dirs.in
index b9e0896..a8131b4 100644
--- a/debian/liblablgtk2-gnome-ocaml.dirs.in
+++ b/debian/liblablgtk2-gnome-ocaml.dirs.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs
+ at OCamlDllDir@
diff --git a/debian/liblablgtk2-gnome-ocaml.files.in b/debian/liblablgtk2-gnome-ocaml.files.in
index 0b630a9..351396a 100644
--- a/debian/liblablgtk2-gnome-ocaml.files.in
+++ b/debian/liblablgtk2-gnome-ocaml.files.in
@@ -1,4 +1,4 @@
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablgnomecanvas.so
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablgnomeui.so
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablpanel.so
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablrsvg.so
+ at OCamlDllDir@/dlllablgnomecanvas.so
+ at OCamlDllDir@/dlllablgnomeui.so
+ at OCamlDllDir@/dlllablpanel.so
+ at OCamlDllDir@/dlllablrsvg.so
diff --git a/debian/liblablgtk2-ocaml-dev.dirs.in b/debian/liblablgtk2-ocaml-dev.dirs.in
index e5ac71c..dedc3d4 100644
--- a/debian/liblablgtk2-ocaml-dev.dirs.in
+++ b/debian/liblablgtk2-ocaml-dev.dirs.in
@@ -1,3 +1,3 @@
 usr/bin
-usr/lib/ocaml/@OCamlABI@/lablgtk2
+ at OCamlStdlibDir@/lablgtk2
 usr/share/lintian/overrides
diff --git a/debian/liblablgtk2-ocaml-dev.install.in b/debian/liblablgtk2-ocaml-dev.install.in
index 4e29dc8..ca30414 100644
--- a/debian/liblablgtk2-ocaml-dev.install.in
+++ b/debian/liblablgtk2-ocaml-dev.install.in
@@ -1,10 +1,10 @@
 usr/bin/*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.mli
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.ml
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.cmi
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.cma
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.cmo
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.a
-usr/lib/ocaml/@OCamlABI@/lablgtk2/*.h
-usr/lib/ocaml/@OCamlABI@/lablgtk2/varcc
-usr/lib/ocaml/@OCamlABI@/lablgtk2/propcc
+ at OCamlStdlibDir@/lablgtk2/*.mli
+ at OCamlStdlibDir@/lablgtk2/*.ml
+ at OCamlStdlibDir@/lablgtk2/*.cmi
+ at OCamlStdlibDir@/lablgtk2/*.cma
+ at OCamlStdlibDir@/lablgtk2/*.cmo
+ at OCamlStdlibDir@/lablgtk2/*.a
+ at OCamlStdlibDir@/lablgtk2/*.h
+ at OCamlStdlibDir@/lablgtk2/varcc
+ at OCamlStdlibDir@/lablgtk2/propcc
diff --git a/debian/liblablgtk2-ocaml.dirs.in b/debian/liblablgtk2-ocaml.dirs.in
index b9e0896..a8131b4 100644
--- a/debian/liblablgtk2-ocaml.dirs.in
+++ b/debian/liblablgtk2-ocaml.dirs.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs
+ at OCamlDllDir@
diff --git a/debian/liblablgtk2-ocaml.install.in b/debian/liblablgtk2-ocaml.install.in
index b9e0896..a8131b4 100644
--- a/debian/liblablgtk2-ocaml.install.in
+++ b/debian/liblablgtk2-ocaml.install.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs
+ at OCamlDllDir@
diff --git a/debian/liblablgtksourceview-ocaml-dev.dirs.in b/debian/liblablgtksourceview-ocaml-dev.dirs.in
index 6c6a1f8..36e9ec2 100644
--- a/debian/liblablgtksourceview-ocaml-dev.dirs.in
+++ b/debian/liblablgtksourceview-ocaml-dev.dirs.in
@@ -1,3 +1,3 @@
-usr/lib/ocaml/@OCamlABI@/METAS
-usr/lib/ocaml/@OCamlABI@/lablgtk2
+ at OCamlStdlibDir@/METAS
+ at OCamlStdlibDir@/lablgtk2
 usr/share/doc/liblablgtksourceview-ocaml-dev/examples
diff --git a/debian/liblablgtksourceview-ocaml-dev.files.in b/debian/liblablgtksourceview-ocaml-dev.files.in
index 188a61e..eb161c3 100644
--- a/debian/liblablgtksourceview-ocaml-dev.files.in
+++ b/debian/liblablgtksourceview-ocaml-dev.files.in
@@ -1,5 +1,5 @@
-usr/lib/ocaml/@OCamlABI@/lablgtk2/sourceView*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/gSourceView*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/gtkSourceView*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/lablgtksourceview*
-usr/lib/ocaml/@OCamlABI@/lablgtk2/liblablgtksourceview*
+ at OCamlStdlibDir@/lablgtk2/sourceView*
+ at OCamlStdlibDir@/lablgtk2/gSourceView*
+ at OCamlStdlibDir@/lablgtk2/gtkSourceView*
+ at OCamlStdlibDir@/lablgtk2/lablgtksourceview*
+ at OCamlStdlibDir@/lablgtk2/liblablgtksourceview*
diff --git a/debian/liblablgtksourceview-ocaml.dirs.in b/debian/liblablgtksourceview-ocaml.dirs.in
index b9e0896..a8131b4 100644
--- a/debian/liblablgtksourceview-ocaml.dirs.in
+++ b/debian/liblablgtksourceview-ocaml.dirs.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs
+ at OCamlDllDir@
diff --git a/debian/liblablgtksourceview-ocaml.files.in b/debian/liblablgtksourceview-ocaml.files.in
index 79d7b2c..eef0955 100644
--- a/debian/liblablgtksourceview-ocaml.files.in
+++ b/debian/liblablgtksourceview-ocaml.files.in
@@ -1 +1 @@
-usr/lib/ocaml/@OCamlABI@/stublibs/dlllablgtksourceview.so
+ at OCamlDllDir@/dlllablgtksourceview.so
diff --git a/debian/rules b/debian/rules
index d882dfa..0a3c54c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,9 +5,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-OCAMLABI := $(shell ocamlc -version)
-OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
-OCAML_LIBDIR := $(shell ocamlc -where)
+include /usr/share/ocaml/ocamlvars.mk
+include /usr/share/ocaml/ocamlinit.mk
 
 DESTDIR = $(CURDIR)/debian/tmp
 
@@ -22,9 +21,6 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
 
-ocamlinit:
-	for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
-
 configure: configure-stamp
 configure-stamp: ocamlinit
 	dh_testdir
@@ -36,7 +32,7 @@ configure-stamp: ocamlinit
 
 
 build: build-stamp
-build-stamp: patch-stamp configure-stamp 
+build-stamp: patch-stamp configure-stamp
 	dh_testdir
 
 	$(MAKE) depend
@@ -56,7 +52,6 @@ clean: unpatch
 	-$(RM) config.status
 	-$(RM) config.log
 
-
 	dh_clean config.make
 
 install: build
@@ -68,14 +63,14 @@ install: build
 	$(MAKE) install DESTDIR=$(DESTDIR)
 
 	# These files are needed by lablgtk2-doc
-	cp src/gnomeDruid.cmi $(CURDIR)/debian/liblablgtk2-gnome-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2
-	cp src/gtkSourceView_types.cmi $(CURDIR)/debian/liblablgtksourceview-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2
+	cp src/gnomeDruid.cmi $(CURDIR)/debian/liblablgtk2-gnome-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2
+	cp src/gtkSourceView_types.cmi $(CURDIR)/debian/liblablgtksourceview-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2
 
 	# Install METAs
-	cp debian/META $(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2
-	cp debian/META.lablgtk2-gl $(CURDIR)/debian/liblablgtk2-gl-ocaml-dev/$(OCAML_LIBDIR)/METAS
-	cp debian/META.lablgtk2-gnome $(CURDIR)/debian/liblablgtk2-gnome-ocaml-dev/$(OCAML_LIBDIR)/METAS
-	cp debian/META.lablgtksourceview $(CURDIR)/debian/liblablgtksourceview-ocaml-dev/$(OCAML_LIBDIR)/METAS
+	cp debian/META $(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2
+	cp debian/META.lablgtk2-gl $(CURDIR)/debian/liblablgtk2-gl-ocaml-dev/$(OCAML_STDLIB_DIR)/METAS
+	cp debian/META.lablgtk2-gnome $(CURDIR)/debian/liblablgtk2-gnome-ocaml-dev/$(OCAML_STDLIB_DIR)/METAS
+	cp debian/META.lablgtksourceview $(CURDIR)/debian/liblablgtksourceview-ocaml-dev/$(OCAML_STDLIB_DIR)/METAS
 
 	# Examples
 	cp -r examples/GL/*  $(CURDIR)/debian/liblablgtk2-gl-ocaml-dev/usr/share/doc/liblablgtk2-gl-ocaml-dev/examples/
@@ -99,18 +94,18 @@ binary-arch: build install
 	dh_movefiles -s
 	dh_install -s --sourcedir=$(DESTDIR) --list-missing -X ".cmx" -X ".cmxa" -X "*.o"
 	if [ -x /usr/bin/ocamlopt ]; then \
-	  mv $(DESTDIR)/$(OCAML_LIBDIR)/lablgtk2/*.cmx  '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2/'; \
-	  mv $(DESTDIR)/$(OCAML_LIBDIR)/lablgtk2/*.cmxa '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2/'; \
-	  mv $(DESTDIR)/$(OCAML_LIBDIR)/lablgtk2/*.o    '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_LIBDIR)/lablgtk2/'; \
+	  mv $(DESTDIR)/$(OCAML_STDLIB_DIR)/lablgtk2/*.cmx  '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2/'; \
+	  mv $(DESTDIR)/$(OCAML_STDLIB_DIR)/lablgtk2/*.cmxa '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2/'; \
+	  mv $(DESTDIR)/$(OCAML_STDLIB_DIR)/lablgtk2/*.o    '$(CURDIR)/debian/liblablgtk2-ocaml-dev/$(OCAML_STDLIB_DIR)/lablgtk2/'; \
 	fi
 	# Doc generation (TODO: use CDBS)
 	OCAMLDOC_PKG="liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev liblablgtk2-gnome-ocaml-dev liblablgtksourceview-ocaml-dev"; \
-	OCAMLDOC_INCLUDE=`for i in $$OCAMLDOC_PKG; do find debian/$$i/$(OCAML_LIBDIR)/ -type d -exec echo -I \{} \; ; done`; \
+	OCAMLDOC_INCLUDE=`for i in $$OCAMLDOC_PKG; do find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; done`; \
 	for i in $$OCAMLDOC_PKG; do \
 	  mkdir -p debian/$$i/usr/share/doc/$$i/html/api; \
-	  find debian/$$i/$(OCAML_LIBDIR)/ \
+	  find debian/$$i/$(OCAML_STDLIB_DIR)/ \
   	    -type f -name '*.mli' \
-	    | xargs ocamldoc -I $(OCAML_LIBDIR)/lablgl -I $(OCAML_LIBDIR)/threads \
+	    | xargs ocamldoc -I $(OCAML_STDLIB_DIR)/lablgl -I $(OCAML_STDLIB_DIR)/threads \
 	     -pp "sed 's/@gtkdoc *\([A-Za-z-]* *[A-Za-z-]*\)/\(gtkdoc: \1\)/g'" \
 	     -stars -m A -no-custom-tags $$OCAMLDOC_INCLUDE -html \
 	     -d debian/$$i/usr/share/doc/$$i/html/api \
@@ -130,7 +125,7 @@ binary-arch: build install
 	dh_makeshlibs -s
 	dh_installdeb -s
 	dh_shlibdeps -s
-	dh_gencontrol -s -- -VF:OCamlABI="$(OCAMLABI)"
+	dh_gencontrol -s -- -VF:OCamlABI="$(OCAML_ABI)"
 	dh_md5sums -s
 	dh_builddeb -s
 

-- 
lablgtk2 packaging



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