The following commit has been merged in the master branch:
commit f50f04007a09663a67643599bd7a829e64ffdc2c
Author: Stephane Glondu <st...@glondu.net>
Date:   Mon Jun 27 09:45:59 2011 +0200

    New debian/rules using dh with overrides

diff --git a/debian/control b/debian/control
index b3b47cf..1744ad2 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,6 @@ Uploaders:
  Sylvain Le Gall <gil...@debian.org>
 Build-Depends:
  debhelper (>= 8),
- cdbs,
  dh-ocaml (>= 0.9~),
  ocaml-nox (>= 3.12),
  ocaml-findlib (>= 1.2.4),
diff --git a/debian/rules b/debian/rules
index 9a5d1d7..a5495de 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,23 +1,36 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/ocaml.mk
-include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
 
-LIB_NAME = bin-prot
-PKG_NAME = lib$(LIB_NAME)-camlp4-dev
-DESTDIR = $(CURDIR)/debian/$(PKG_NAME)$(OCAML_STDLIB_DIR)
-DESTDLLDIR = $(CURDIR)/debian/$(PKG_NAME)$(OCAML_DLL_DIR)
+DESTDIR=$(CURDIR)/debian/libbin-prot-camlp4-dev
 
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-DEB_MAKE_BUILD_TARGET = all
-DEB_MAKE_INSTALL_TARGET = install OCAMLFIND_INSTFLAGS="-destdir $(DESTDIR) 
-ldconf ignore"
-else
-DEB_MAKE_BUILD_TARGET = byte
-DEB_MAKE_INSTALL_TARGET = libinstall-byte-code OCAMLFIND_INSTFLAGS="-destdir 
$(DESTDIR) -ldconf ignore"
-endif
+include /usr/share/ocaml/ocamlvars.mk
 
-OCAML_DHOCAML_FLAGS += --runtime-map libbin-prot-camlp4-dev:- 
+export OCAML_DLL_DIR
+export OCAML_HAVE_OCAMLOPT
+export OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
 
-build/$(PKG_NAME)::
-       mkdir -p $(DESTDIR) $(DESTDLLDIR)
+%:
+       dh $@ --with ocaml
 
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+       ocaml setup.ml -configure --prefix /usr --destdir '$(DESTDIR)' --docdir 
/usr/share/doc/libbin-prot-camlp4-dev
+
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+       ocaml setup.ml -build
+       ocaml setup.ml -doc
+
+.PHONY: override_dh_auto_test
+override_dh_auto_test:
+       ocaml setup.ml -test
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+       mkdir -p '$(OCAMLFIND_DESTDIR)'
+       mkdir -p '$(DESTDIR)$(OCAML_DLL_DIR)'
+       ocaml setup.ml -install
+       rm -f '$(DESTDIR)$(OCAML_DLL_DIR)'/*.so.owner
+
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+       ocaml setup.ml -distclean

-- 
bin-prot packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to