[Pkg-ocaml-maint-commits] [SCM] ocamlduce packaging branch, master, updated. debian/3.11.1.0-1-10-ga7d28e8

Stephane Glondu steph at glondu.net
Wed Oct 14 22:56:38 UTC 2009


The following commit has been merged in the master branch:
commit 7a3a7e152713af4c494196068510667f7d4e1313
Author: Stephane Glondu <steph at glondu.net>
Date:   Wed Oct 14 20:17:05 2009 +0200

    Switch packaging to dh-ocaml 0.9

diff --git a/debian/control b/debian/control
index 551730c..82823dd 100644
--- a/debian/control
+++ b/debian/control
@@ -4,12 +4,13 @@ Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Stéphane Glondu <glondu at debian.org>
 Build-Depends:
- debhelper (>= 7.0.52),
- quilt (>= 0.46-7),
- dh-ocaml,
+ debhelper (>= 7.2.11~),
+ quilt (>= 0.46-7~),
+ dh-ocaml (>= 0.9),
+ autotools-dev,
  patch,
  ocaml-source (>= 3.11.1),
- ocaml-nox (>= 3.11.1)
+ ocaml-nox (>= 3.11.1-3~)
 Standards-Version: 3.8.3
 Homepage: http://ocamlduce.forge.ocamlcore.org/
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/ocamlduce.git
@@ -20,9 +21,10 @@ Architecture: any
 Depends:
  ocaml-interp,
  ocaml-findlib,
- ocaml-base-nox-${F:OCamlABI},
+ ${ocaml:Depends},
  ${shlibs:Depends},
  ${misc:Depends}
+Provides: ${ocaml:Provides}
 Description: OCaml extended with XML types
  OCamlDuce is a merger between OCaml and CDuce. It comes as a modified
  version of OCaml which integrates CDuce features: XML expressions,
diff --git a/debian/ocamlduce.links.in b/debian/ocamlduce.links.in
index bf4a1d8..ebb58d8 100644
--- a/debian/ocamlduce.links.in
+++ b/debian/ocamlduce.links.in
@@ -3,6 +3,7 @@ usr/share/man/man1/ocamlc.1.gz usr/share/man/man1/ocamlducec.1.gz
 usr/share/man/man1/ocamldep.1.gz usr/share/man/man1/ocamlducedep.1.gz
 usr/share/man/man1/ocamldoc.1.gz usr/share/man/man1/ocamlducedoc.1.gz
 usr/share/man/man1/ocamlfind.1.gz usr/share/man/man1/ocamlducefind.1.gz
+usr/share/man/man1/ocamlobjinfo.1.gz usr/share/man/man1/ocamlduceobjinfo.1.gz
 OPT: usr/share/man/man1/ocamlc.1.gz usr/share/man/man1/ocamlducec.opt.1.gz
 OPT: usr/share/man/man1/ocamldep.1.gz usr/share/man/man1/ocamlducedep.opt.1.gz
 OPT: usr/share/man/man1/ocamldoc.1.gz usr/share/man/man1/ocamlducedoc.opt.1.gz
diff --git a/debian/rules b/debian/rules
index 898c809..95b24ec 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,17 +4,24 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include /usr/share/ocaml/ocamlinit.mk
+include /usr/share/ocaml/ocamlvars.mk
+
+# We do as in ocaml: the ABI is the upstream version number and we
+# need to use a special ocamlobjinfo for OCamlDuce compiled interfaces
+export OCAMLOBJINFO := debian/tmp/usr/bin/ocamlduceobjinfo
+OCAMLDUCE_ABI := $(shell head -n1 debian/changelog|awk -F'[()-]' '{print $$2}')
 
 BUILD_TARGET := $(if $(OCAML_OPT_ARCH),world.opt,world)
 INSTALL_TARGET := installbyte $(if $(OCAML_OPT_ARCH),installopt)
 
 OCAML_SRCDIR := ocaml-$(OCAML_ABI)
 MAKE_DUCE := $(MAKE) -C $(OCAML_SRCDIR) -f Makefile.ocamlduce
-DH := dh --with quilt
 
-config-stamp: ocamlinit-stamp
-	$(DH) build --before auto_configure
+%:
+	dh --with quilt,ocaml $@
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
 	$(MAKE) prepare
 	cd $(OCAML_SRCDIR) && \
 	for u in $(wildcard debian/patches-ocaml/*); do \
@@ -30,36 +37,24 @@ config-stamp: ocamlinit-stamp
 	sed -i \
 	  -e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)$(patsubst /usr/%,/%,$(OCAML_STDLIB_DIR))%g" \
 	  $(OCAML_SRCDIR)/config/Makefile
-	touch $@
 
-build: build-stamp
-build-stamp: config-stamp
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
 	$(MAKE_DUCE) $(BUILD_TARGET)
 	cd $(OCAML_SRCDIR) && ocamlbuild tools/objinfo.byte
-	$(DH) build --after auto_build
-	touch $@
 
-install: install-stamp
-install-stamp: build-stamp
-	$(DH) install --before auto_install
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
 	$(MAKE_DUCE) PREFIX=../debian/tmp/usr $(INSTALL_TARGET)
 	install -m 755 $(OCAML_SRCDIR)/_build/tools/objinfo.byte \
 	  debian/tmp/usr/bin/ocamlduceobjinfo
-	$(DH) install --after auto_install
-	touch $@
 
-clean: ocamlinit-clean
-	$(DH) clean --before dh_auto_clean
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
 	rm -Rf $(OCAML_SRCDIR)
-	$(DH) clean --after dh_auto_clean
-
-binary-indep: install-stamp
-	@echo No binary-indep packages
-
-binary-arch: install-stamp
-	echo 'F:OCamlABI=$(shell ocamlc -version)' >> debian/ocamlduce.substvars
-	$(DH) $@
-
-binary: binary-indep binary-arch
 
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: override_dh_ocaml
+override_dh_ocaml:
+	dh_ocaml --checksum=$(OCAMLDUCE_ABI) \
+	  --runtime-map=ocamlduce -Xtoplevellib.cma \
+	  --nodefined-map=ocamlduce:Topdirs,Toploop,Topmain,Topstart

-- 
ocamlduce packaging



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