[Pkg-ocaml-maint-commits] [SCM] ocamlduce packaging branch, master, updated. debian/3.11.0.0.rc1-1-2-g58a3cd5

Stephane Glondu steph at glondu.net
Sun Mar 8 00:10:51 UTC 2009


The following commit has been merged in the master branch:
commit 58a3cd5bb2373d8e1045f2b7f7e53f2de4e2bbb3
Author: Stephane Glondu <steph at glondu.net>
Date:   Sat Mar 7 18:51:40 2009 +0100

    Use dh-ocaml and prepare upload to unstable

diff --git a/debian/changelog b/debian/changelog
index c338491..66f2d61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-ocamlduce (3.11.0.0~rc1-1.1) UNRELEASED; urgency=low
+ocamlduce (3.11.0.0~rc1-2) unstable; urgency=low
 
-  * Non-maintainer upload.
-  * NOT RELEASED YET
+  * First upload to unstable
+  * Use ocamlinit from dh-ocaml
 
- -- Sylvain Le Gall <gildor at debian.org>  Tue, 20 Jan 2009 11:18:19 +0000
+ -- Stephane Glondu <steph at glondu.net>  Sat, 07 Mar 2009 19:27:31 +0100
 
 ocamlduce (3.11.0.0~rc1-1) experimental; urgency=low
 
diff --git a/debian/control b/debian/control
index 0131364..77eb0fa 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Stephane Glondu <steph at glondu.net>
 DM-Upload-Allowed: yes
 Build-Depends:
  debhelper (>= 7),
+ dh-ocaml,
  patch,
  ocaml-source (>= 3.11.0),
  ocaml-nox (>= 3.11.0)
@@ -17,7 +18,6 @@ Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocamlduce.git
 Package: ocamlduce
 Architecture: any
 Depends:
- ocaml-base-nox,
  ocaml-interp,
  ocaml-findlib,
  ocaml-base-nox-${F:OCamlABI},
diff --git a/debian/rules b/debian/rules
index e4e0837..82ae5b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,28 +4,21 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-OCAMLABI := $(shell ocamlc -version)
-IS_NATIVE := $(wildcard /usr/bin/ocamlopt) $(wildcard /usr/bin/ocamlopt.opt)
+include /usr/share/ocaml/ocamlinit.mk
 
-BUILD_TARGET := $(if $(IS_NATIVE),world.opt,world)
-INSTALL_TARGET := installbyte $(if $(IS_NATIVE),installopt)
+BUILD_TARGET := $(if $(OCAML_OPT_ARCH),world.opt,world)
+INSTALL_TARGET := installbyte $(if $(OCAML_OPT_ARCH),installopt)
 
-OCAML_SRCDIR := ocaml-$(OCAMLABI)
+OCAML_SRCDIR := ocaml-$(OCAML_ABI)
 MAKE_DUCE := $(MAKE) -C $(OCAML_SRCDIR) -f Makefile.ocamlduce
 
-SEDEXP := -e 's/@OCamlABI@/$(OCAMLABI)/'
-SEDEXP += -e $(if $(IS_NATIVE),'s/^OPT: //','/^OPT: /d')
-OFILES := $(patsubst %.in,%,$(wildcard debian/*.in))
-
-
-config-stamp:
-	for f in $(OFILES); do sed $(SEDEXP) $$f.in > $$f; done
+config-stamp: ocamlinit-stamp
 	dh build --before auto_configure
 	$(MAKE) prepare
 	cd $(OCAML_SRCDIR) && \
-	  ./configure -prefix /usr -libdir /usr/lib/ocaml/$(OCAMLABI)
+	  ./configure -prefix /usr -libdir $(OCAML_STDLIB_DIR)
 	sed -i \
-	  -e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)/lib/ocaml/$(OCAMLABI)%g" \
+	  -e "s%LIBDIR=.*$$%LIBDIR=\$$(PREFIX)$(patsubst /usr/%,/%,$(OCAML_STDLIB_DIR))%g" \
 	  $(OCAML_SRCDIR)/config/Makefile
 	touch $@
 
@@ -42,10 +35,10 @@ install-stamp: build-stamp
 	dh install --after auto_install
 	touch $@
 
-clean:
-	dh clean --before auto_clean
-	rm -Rf $(OCAML_SRCDIR) $(OFILES)
-	dh clean --after auto_clean
+clean: ocamlinit-clean
+	dh clean --before dh_auto_clean
+	rm -Rf $(OCAML_SRCDIR)
+	dh clean --after dh_auto_clean
 
 binary-indep: install-stamp
 	@echo No binary-indep packages

-- 
ocamlduce packaging



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