[Pkg-ocaml-maint-commits] [SCM] mlpost packaging branch, master, updated. debian/0.7.4-1-14-g5cc3eb4

Stephane Glondu steph at glondu.net
Sat May 22 20:54:38 UTC 2010


The following commit has been merged in the master branch:
commit e7a69ca77e9dbf3dbdae6c79a49e4b9e96062d86
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri May 21 17:18:23 2010 +0200

    Switch packaging to dh with overrides

diff --git a/debian/clean b/debian/clean
index 3ed5a3f..c7566aa 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,4 +1 @@
-mlpost.mli
-myocamlbuild.ml
-ocamlbuild.Makefile
-simple.Makefile
+debian/examples.tar.gz
diff --git a/debian/control b/debian/control
index d06bcad..e68c300 100644
--- a/debian/control
+++ b/debian/control
@@ -9,9 +9,8 @@ Build-Depends:
  texlive-metapost,
  ghostscript,
  imagemagick,
- debhelper (>= 7),
+ debhelper (>= 7.2.11~),
  dh-ocaml (>= 0.9~),
- cdbs,
  libcairo-ocaml-dev (>= 20090223-2~),
  libbitstring-ocaml-dev (>= 2.0.0-5~),
  camlp4,
diff --git a/debian/rules b/debian/rules
index 7a50150..9c41c53 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,31 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
 
-DESTDIR = $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)/mlpost
-PREFIX = $(CURDIR)/debian/tmp/usr
-DEB_INSTALL_DIRS_ALL = -Pdebian/tmp
-DEB_MAKE_INSTALL_TARGET = install LIBDIR=$(DESTDIR) prefix=$(PREFIX)
-DEB_MAKE_BUILD_TARGET = all doc
-OCAML_DHOCAML_FLAGS = --runtime-map mlpost
+include /usr/share/ocaml/ocamlvars.mk
+PREFIX = $(CURDIR)/debian/tmp
+OCAMLFIND_DESTDIR = $(PREFIX)$(OCAML_STDLIB_DIR)
 
 EXAMPLES_TARBALL = debian/examples.tar.gz
 
-pre-build::
+%:
+	dh --with ocaml $@
+
+$(EXAMPLES_TARBALL):
 	tar -czf $(EXAMPLES_TARBALL) --exclude=parse.ml examples
 
-clean::
-	rm -Rf $(EXAMPLES_TARBALL)
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure: $(EXAMPLES_TARBALL)
+	./configure --prefix=$(PREFIX)/usr
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+	$(MAKE) doc
+	mkdir -p $(OCAMLFIND_DESTDIR)
+	$(MAKE) DESTDIR="-destdir $(OCAMLFIND_DESTDIR)" install
+
+.PHONY: override_dh_ocaml
+override_dh_ocaml:
+	dh_ocaml --runtime-map=mlpost
+
+.PHONY: override_dh_auto_test
+override_dh_auto_test:

-- 
mlpost packaging



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