[Pkg-ocaml-maint-commits] [SCM] fieldslib packaging branch, master, updated. debian/0.1.0-2-12-g6155aa1

Stephane Glondu steph at glondu.net
Mon Jun 27 06:52:09 UTC 2011


The following commit has been merged in the master branch:
commit 01437405e33ba0ee9e5f7cecd95e6e28f32d105c
Author: Stephane Glondu <steph at glondu.net>
Date:   Sun Jun 26 22:56:13 2011 +0200

    New debian/rules using dh with overrides

diff --git a/debian/rules b/debian/rules
index 1931402..0c9b2f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,35 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
 
-LIB_NAME = fields
-PKG_NAME = lib$(LIB_NAME)-camlp4-dev
-DESTDIR = $(CURDIR)/debian/$(PKG_NAME)$(OCAML_STDLIB_DIR)
-OCAMLFIND_INSTFLAGS=-destdir $(DESTDIR)
+DESTDIR=$(CURDIR)/debian/libfields-camlp4-dev
 
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-DEB_MAKE_BUILD_TARGET = all
-DEB_MAKE_INSTALL_TARGET = install OCAMLFIND_INSTFLAGS="$(OCAMLFIND_INSTFLAGS)"
-else
-DEB_MAKE_BUILD_TARGET = byte
-DEB_MAKE_INSTALL_TARGET = installbyte OCAMLFIND_INSTFLAGS="$(OCAMLFIND_INSTFLAGS)"
-endif
+include /usr/share/ocaml/ocamlvars.mk
 
-OCAML_DHOCAML_FLAGS := --runtime-map=$(PKG_NAME)
+export OCAML_DLL_DIR
+export OCAML_HAVE_OCAMLOPT
+export OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
+export OCAMLFIND_LDCONF=ignore
 
-build/$(PKG_NAME)::
-	mkdir -p $(DESTDIR)
+%:
+	dh $@ --with ocaml
 
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+	ocaml setup.ml -configure --prefix /usr --destdir '$(DESTDIR)' --docdir /usr/share/doc/libfields-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)'
+	ocaml setup.ml -install
+
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+	ocaml setup.ml -distclean

-- 
fieldslib packaging



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