[Pkg-ocaml-maint-commits] [SCM] ocaml-batteries packaging branch, master, updated. debian/0.20090405+beta1-5-4-gf740fa5

Stefano Zacchiroli zack at upsilon.cc
Fri Mar 5 18:53:47 UTC 2010


The following commit has been merged in the master branch:
commit f740fa50bf3ca58a1e00d4bcb277c74795360380
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date:   Fri Mar 5 19:53:21 2010 +0100

    revamp packaging for batteries 1.1
    
    major changes, including switch from CDBS to dh 7

diff --git a/debian/changelog b/debian/changelog
index 274834c..c51ac17 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,10 @@ ocaml-batteries (1.1.0-1) UNRELEASED; urgency=low
 
   * New upstream release
     - major changes, "diet" version of the library
+  * Revamp packaging
+    - adapt to new stuff shipped by upstream
+    - switch from CDBS to dh
+    - adapt dependencies (generally: reduce them)
 
  -- Stefano Zacchiroli <zack at debian.org>  Mon, 01 Mar 2010 18:20:54 +0100
 
diff --git a/debian/control b/debian/control
index fb26743..1a861da 100644
--- a/debian/control
+++ b/debian/control
@@ -4,21 +4,14 @@ Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Stefano Zacchiroli <zack at debian.org>
 Build-Depends:
- debhelper (>= 7),
- ocaml-nox,
- ocaml-findlib,
- libcamomile-ocaml-dev,
- libtype-conv-camlp4-dev,
- libsexplib-camlp4-dev (>= 4.2.16),
- libbin-prot-camlp4-dev,
- libzip-ocaml-dev,
- libocamlnet-ocaml-dev,
+ debhelper (>= 7.0.50),
+ ocaml-nox (>= 3.11),
+ ocaml-findlib (>= 1.2.5),
+ libcamomile-ocaml-dev (>= 0.7),
+ libounit-ocaml-dev,
  dh-ocaml (>= 0.9),
- camlp4,
- camlp4-extra,
- quilt,
- cdbs,
- autoconf
+ omake,
+ quilt
 Standards-Version: 3.8.3
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocaml-batteries.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml-batteries.git
@@ -29,7 +22,6 @@ Section: ocaml
 Architecture: any
 Depends:
  ocaml-findlib,
- libbin-prot-camlp4-dev,
  ${ocaml:Depends},
  ${shlibs:Depends},
  ${misc:Depends}
diff --git a/debian/libbatteries-ocaml-dev.install b/debian/libbatteries-ocaml-dev.install
new file mode 100644
index 0000000..00a96ae
--- /dev/null
+++ b/debian/libbatteries-ocaml-dev.install
@@ -0,0 +1 @@
+usr/lib/ocaml
diff --git a/debian/libbatteries-ocaml-doc.install b/debian/libbatteries-ocaml-doc.install
new file mode 100644
index 0000000..838ddc5
--- /dev/null
+++ b/debian/libbatteries-ocaml-doc.install
@@ -0,0 +1 @@
+debian/tmp/doc/*	/usr/share/doc/libbatteries-ocaml-doc/html/api
diff --git a/debian/patches/series b/debian/patches/series
index 4838d1b..221018b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,2 @@
-0001-debian-specific-installation-paths.patch
-0002-debian-specific-info-on-doc-availability.patch
+# 0001-debian-specific-installation-paths.patch
+# 0002-debian-specific-info-on-doc-availability.patch
diff --git a/debian/rules b/debian/rules
index 6e73895..617357e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,35 +1,39 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
-
-LIB_NAME = batteries
-DEV_PKG_NAME = lib$(LIB_NAME)-ocaml-dev
-DOC_PKG_NAME = lib$(LIB_NAME)-ocaml-doc
-DEST_DIR = $(CURDIR)/debian/$(DEV_PKG_NAME)$(OCAML_STDLIB_DIR)
-DEB_AUTO_UPDATE_AUTOCONF = yes
-
-OCAMLBUILD_FLAGS = -classic-display
-DEB_CONFIGURE_EXTRA_FLAGS = --with-browser="x-www-browser %s"
-DEB_CONFIGURE_EXTRA_FLAGS += --with-docroot="/usr/share/doc/$(DOC_PKG_NAME)"
-DEB_MAKE_BUILD_TARGET = all
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-DEB_MAKE_BUILD_TARGET += opt
-else
-OCAMLBUILD_FLAGS += -byte-plugin
+include /usr/share/ocaml/ocamlvars.mk
+
+export DESTDIR = $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)
+export BATTERIES_DOCROOT = $(CURDIR)/debian/tmp/doc
+DOC_PKG = libbatteries-ocaml-doc
+
+%:
+	dh --with quilt,ocaml $@
+
+ifneq ($(OCAML_HAVE_OCAMLOPT),yes)
+export BATTERIES_NATIVE = false
 endif
-DEB_MAKE_BUILD_TARGET += OBFLAGS="$(OCAMLBUILD_FLAGS)"
-DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DEST_DIR)
-DEB_MAKE_CLEAN_TARGET = clean
-
-DEB_COMPRESS_EXCLUDE += myocamlbuild.ml
-DEB_COMPRESS_EXCLUDE += .idex
-
-export OCAMLFIND_COMMANDS="ocamldoc=ocamldoc"
-install/$(DOC_PKG_NAME):: ocamldoc-stamp
-ocamldoc-stamp:
-	OCAMLRUNPARAM=l=16M make doc OBFLAGS="-classic-display -no-hygiene"
-	touch $@
-clean::
-	rm -f ocamldoc-stamp
+
+override_dh_auto_build:
+	omake all
+ifneq (,$(findstring $(DOC_PKG),$(shell dh_listpackages)))
+	omake doc
+endif
+
+override_dh_auto_test:
+	omake test
+
+override_dh_auto_install:
+	mkdir -p $(DESTDIR) $(BATTERIES_DOCROOT)
+	omake install
+ifneq (,$(findstring $(DOC_PKG),$(shell dh_listpackages)))
+	omake install-doc
+endif
+
+override_dh_auto_clean:
+	omake clean
+	rm -rf man/
+
+.PHONY: override_dh_auto_build override_dh_auto_test override_dh_auto_install
+.PHONY: override_dh_auto_clean
+
+# DEB_COMPRESS_EXCLUDE += myocamlbuild.ml
+# DEB_COMPRESS_EXCLUDE += .idex

-- 
ocaml-batteries packaging



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