[Pkg-ocaml-maint-commits] [SCM] postgresql-ocaml packaging branch, master, updated. debian/1.18.0-1-9-g6f8cd6d

Stephane Glondu steph at glondu.net
Wed May 8 18:18:42 UTC 2013


The following commit has been merged in the master branch:
commit 8c24aa3c55bc98acd4cd20dd95b5dd3331db122a
Author: Stephane Glondu <steph at glondu.net>
Date:   Wed May 8 20:11:36 2013 +0200

    Adapt packaging to new build system

diff --git a/debian/control b/debian/control
index ccef075..b74395f 100644
--- a/debian/control
+++ b/debian/control
@@ -10,8 +10,7 @@ Build-Depends:
  ocaml-nox (>= 3.11.1-3~),
  ocaml-findlib (>= 1.2.5),
  libpq-dev,
- dh-ocaml (>= 0.9.6~),
- cdbs
+ dh-ocaml (>= 0.9.6~)
 Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/postgresql-ocaml.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/postgresql-ocaml.git
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 71dfd5b..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-README.txt
diff --git a/debian/libpostgresql-ocaml-dev.doc-base b/debian/libpostgresql-ocaml-dev.doc-base
new file mode 100644
index 0000000..eef8075
--- /dev/null
+++ b/debian/libpostgresql-ocaml-dev.doc-base
@@ -0,0 +1,9 @@
+Document: libpostgresql-ocaml-dev
+Title: API for PostgreSQL bindings
+Author: Markus Mottl
+Abstract: Ocamldoc-generated documentation for OCaml PostgreSQL bindings
+Section: Programming/OCaml
+
+Format: HTML
+Index: /usr/share/doc/libpostgresql-ocaml-dev/api/index.html
+Files: /usr/share/doc/libpostgresql-ocaml-dev/api/*.html
diff --git a/debian/libpostgresql-ocaml-dev.docs b/debian/libpostgresql-ocaml-dev.docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/libpostgresql-ocaml-dev.docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/libpostgresql-ocaml-dev.install.in b/debian/libpostgresql-ocaml-dev.install.in
index 99505d1..7b22a4b 100644
--- a/debian/libpostgresql-ocaml-dev.install.in
+++ b/debian/libpostgresql-ocaml-dev.install.in
@@ -3,4 +3,5 @@
 @OCamlStdlibDir@/postgresql/lib*.a
 OPT: @OCamlStdlibDir@/postgresql/*.a
 OPT: @OCamlStdlibDir@/postgresql/*.cmxa
-OPT: lib/postgresql.cmx @OCamlStdlibDir@/postgresql
+OPT: @OCamlStdlibDir@/postgresql/*.cmx
+usr/share/doc/postgresql-ocaml/api usr/share/doc/libpostgresql-ocaml-dev/
diff --git a/debian/libpostgresql-ocaml-dev.ocamldoc b/debian/libpostgresql-ocaml-dev.ocamldoc
deleted file mode 100644
index 1bfdd46..0000000
--- a/debian/libpostgresql-ocaml-dev.ocamldoc
+++ /dev/null
@@ -1 +0,0 @@
-# This file must not be empty to be represented in .diff.gz!
diff --git a/debian/libpostgresql-ocaml.install.in b/debian/libpostgresql-ocaml.install.in
index 2b649b9..a1440f3 100644
--- a/debian/libpostgresql-ocaml.install.in
+++ b/debian/libpostgresql-ocaml.install.in
@@ -1,4 +1,4 @@
-debian/tmp at OCamlStdlibDir@/postgresql/*.so @OCamlDllDir@
+ at OCamlDllDir@/*.so @OCamlDllDir@
 @OCamlStdlibDir@/postgresql/META
 @OCamlStdlibDir@/postgresql/*.cma
-DYN: lib/postgresql.cmxs @OCamlStdlibDir@/postgresql
+DYN: @OCamlStdlibDir@/postgresql/*.cmxs
diff --git a/debian/patches/0001-DESTDIR-in-Makefiles.patch b/debian/patches/0001-DESTDIR-in-Makefiles.patch
deleted file mode 100644
index ca70815..0000000
--- a/debian/patches/0001-DESTDIR-in-Makefiles.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From: Stephane Glondu <steph at glondu.net>
-Date: Mon, 7 Sep 2009 09:47:23 +0200
-Subject: DESTDIR in Makefiles
-
-Enable passing target installation directory from debian/rules.
-
-Signed-off-by: Stefano Zacchiroli <zack at debian.org>
-Signed-off-by: Stephane Glondu <steph at glondu.net>
----
- OCamlMakefile |    3 +++
- lib/Makefile  |    2 ++
- 2 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/OCamlMakefile b/OCamlMakefile
-index b8898ad..2ba893d 100644
---- a/OCamlMakefile
-+++ b/OCamlMakefile
-@@ -1211,12 +1211,14 @@ subprojs: $(SUBPROJS:%=subproj_%)
- .PHONY: libinstall
- libinstall:	all
- 	$(QUIET)printf "\nInstalling library with ocamlfind\n"
-+	test -d $(DESTDIR) || mkdir -p $(DESTDIR)
- 	$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
- 	$(QUIET)printf "\nInstallation successful.\n"
- 
- .PHONY: libinstall-byte-code
- libinstall-byte-code:	all
- 	$(QUIET)printf "\nInstalling byte-code library with ocamlfind\n"
-+	test -d $(DESTDIR) || mkdir -p $(DESTDIR)
- 	$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
- 	  $(filter-out $(RESULT).$(EXT_LIB) $(RESULT).cmxa, $(LIBINSTALL_FILES))
- 	$(QUIET)printf "\nInstallation successful.\n"
-@@ -1224,6 +1226,7 @@ libinstall-byte-code:	all
- .PHONY: libinstall-native-code
- libinstall-native-code:	all
- 	$(QUIET)printf "\nInstalling native-code library with ocamlfind\n"
-+	test -d $(DESTDIR) || mkdir -p $(DESTDIR)
- 	$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META \
- 	  $(filter-out $(DLLSONAME) $(RESULT).cma, $(LIBINSTALL_FILES))
- 	$(QUIET)printf "\nInstallation successful.\n"
-diff --git a/lib/Makefile b/lib/Makefile
-index 008e028..c458f4e 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -10,6 +10,8 @@ CLIBS   = pq
- LIBS    = threads
- RESULT  = postgresql
- THREADS = yes
-+DESTDIR =
-+OCAMLFIND_INSTFLAGS = -ldconf /dev/null -destdir $(DESTDIR)
- 
- all:
- 
--- 
diff --git a/debian/patches/0002-Examples.patch b/debian/patches/0002-Examples.patch
deleted file mode 100644
index 80a7128..0000000
--- a/debian/patches/0002-Examples.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From: Stephane Glondu <steph at glondu.net>
-Date: Mon, 7 Sep 2009 09:48:24 +0200
-Subject: Examples
-
-Make examples easily buildable in Debian, by relying on
-lib dir post-installation (i.e. `ocamlc -where`/postgresql).
-
-Signed-off-by: Stefano Zacchiroli <zack at debian.org>
-Signed-off-by: Stephane Glondu <steph at glondu.net>
----
- examples/cursor/Makefile     |    4 ++--
- examples/dump/Makefile       |    4 ++--
- examples/populate/Makefile   |    4 ++--
- examples/prompt/Makefile     |    4 ++--
- examples/prompt_gtk/Makefile |    4 ++--
- examples/test_lo/Makefile    |    4 ++--
- 6 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/examples/cursor/Makefile b/examples/cursor/Makefile
-index 7138b8a..ae61d7f 100644
---- a/examples/cursor/Makefile
-+++ b/examples/cursor/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = cursor.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- RESULT  = cursor
- 
-diff --git a/examples/dump/Makefile b/examples/dump/Makefile
-index e07a1b0..8d4db77 100644
---- a/examples/dump/Makefile
-+++ b/examples/dump/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = dump.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- RESULT  = dump
- 
-diff --git a/examples/populate/Makefile b/examples/populate/Makefile
-index f2674a2..380212e 100644
---- a/examples/populate/Makefile
-+++ b/examples/populate/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = populate.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- RESULT  = populate
- 
-diff --git a/examples/prompt/Makefile b/examples/prompt/Makefile
-index 37e438f..1dbac4e 100644
---- a/examples/prompt/Makefile
-+++ b/examples/prompt/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = prompt.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- THREADS = yes
- RESULT  = prompt
-diff --git a/examples/prompt_gtk/Makefile b/examples/prompt_gtk/Makefile
-index b24d536..8947bc8 100644
---- a/examples/prompt_gtk/Makefile
-+++ b/examples/prompt_gtk/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = prompt_gtk.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- PACKS   = lablgtk2
- RESULT  = prompt_gtk
-diff --git a/examples/test_lo/Makefile b/examples/test_lo/Makefile
-index d1441e8..fc46218 100644
---- a/examples/test_lo/Makefile
-+++ b/examples/test_lo/Makefile
-@@ -1,8 +1,8 @@
- OCAMLMAKEFILE = ../../OCamlMakefile
- 
- SOURCES = test_lo.ml
--INCDIRS = ../../lib
--LIBDIRS = ../../lib
-+INCDIRS := $(shell ocamlc -where)/postgresql
-+LIBDIRS := $(shell ocamlc -where)/postgresql
- LIBS    = postgresql
- RESULT  = test_lo
- 
--- 
diff --git a/debian/patches/0003-Do-not-link-system-libraries-into-cma.patch b/debian/patches/0003-Do-not-link-system-libraries-into-cma.patch
deleted file mode 100644
index 3fa4edc..0000000
--- a/debian/patches/0003-Do-not-link-system-libraries-into-cma.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Mehdi Dogguy <mehdi at debian.org>
-Date: Tue, 6 Oct 2009 00:22:04 +0200
-Subject: Do not link system libraries into cma
-
----
- lib/Makefile |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/lib/Makefile b/lib/Makefile
-index c458f4e..991160c 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -7,7 +7,7 @@ CFLAGS += -O2 -Wall -pedantic -Wno-long-long -fPIC -DPIC
- CFLAGS += -DPG_OCAML_MAJOR_VERSION=$(PG_OCAML_MAJOR_VERSION)
- CFLAGS += -DPG_OCAML_MINOR_VERSION=$(PG_OCAML_MINOR_VERSION)
- CLIBS   = pq
--LIBS    = threads
-+LIBS    =
- RESULT  = postgresql
- THREADS = yes
- DESTDIR =
--- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 52222b4..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-0001-DESTDIR-in-Makefiles.patch
-0002-Examples.patch
-0003-Do-not-link-system-libraries-into-cma.patch
diff --git a/debian/rules b/debian/rules
index 94aa82f..784b363 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,25 +1,44 @@
 #!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
-
-PKGNAME = libpostgresql-ocaml-dev
-
-DEB_SRCDIR = $(CURDIR)/lib
-DEB_MAKE_BUILD_TARGET = NO_CUSTOM=y byte-code-library
-CFLAGS += -I$(shell pg_config --includedir) -fPIC
-DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)
-
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-build/$(PKGNAME)::
-	$(MAKE) NO_CUSTOM=y -C $(DEB_SRCDIR)/ native-code-library
-endif
-
-ifeq ($(OCAML_NATDYNLINK),yes)
-build/$(PKGNAME)::
-	cd $(DEB_SRCDIR) && ocamlopt -shared -I . -o postgresql.cmxs -linkall postgresql.cmxa
-endif
-
-ifneq ($(OCAML_HAVE_OCAMLOPT),yes)
-export LIBINSTALL_FILES = libpostgresql_stubs.a postgresql.cma postgresql.cmi postgresql.mli dllpostgresql_stubs.so
-endif
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+DESTDIR := $(CURDIR)/debian/tmp
+
+include /usr/share/ocaml/ocamlvars.mk
+
+OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
+export OCAMLFIND_DESTDIR
+OCAMLFIND_LDCONF=ignore
+export OCAMLFIND_LDCONF
+
+%:
+	dh $@ --with ocaml
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+	ocaml setup.ml -configure --prefix /usr --destdir '$(DESTDIR)'
+
+.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 '$(DESTDIR)/usr/bin'
+	mkdir -p '$(DESTDIR)/$(OCAML_DLL_DIR)'
+	ocaml setup.ml -install
+
+.PHONY: override_dh_install
+override_dh_install:
+	dh_install --fail-missing -X.so.owner
+
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+	ocaml setup.ml -distclean

-- 
postgresql-ocaml packaging



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