The following commit has been merged in the master branch:
commit 26805dee1980413e95104fcad108caac20952119
Author: Stephane Glondu <st...@glondu.net>
Date:   Wed May 8 16:56:00 2013 +0200

    Adapt packaging to new build system

diff --git a/debian/control b/debian/control
index 329d3a0..a59ded2 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Build-Depends:
  libpcre3-dev,
  ocaml-nox (>= 3.11.1-3~),
  ocaml-findlib (>= 1.2.5),
- cdbs,
  dh-ocaml (>= 0.9~)
 Standards-Version: 3.9.2
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/pcre-ocaml.git
@@ -22,6 +21,8 @@ Depends:
  ${shlibs:Depends},
  ${misc:Depends}
 Provides: ${ocaml:Provides}
+Replaces: libpcre-ocaml-dev (<< 7)
+Breaks: libpcre-ocaml-dev (<< 7)
 Description: OCaml bindings for PCRE (runtime)
  This OCaml-library interfaces the PCRE (Perl-compatibility
  regular expressions) C library. it can be used for matching
diff --git a/debian/libpcre-ocaml-dev.README.Debian 
b/debian/libpcre-ocaml-dev.README.Debian
deleted file mode 100644
index 6f3419c..0000000
--- a/debian/libpcre-ocaml-dev.README.Debian
+++ /dev/null
@@ -1,13 +0,0 @@
-
-  - About the examples
-
-    Examples' Makefiles are built using OcamlMakefile and thus
-    depend on it, to build them install the ocamlmakefile package
-    that contains OcamlMakefile and change the OCAMLMAKEFILE
-    variable defined in the various Makefiles making it point to
-    /usr/share/ocamlmakefile/OCamlMakefile.
-
-    E.g.  OCAMLMAKEFILE = /usr/share/ocamlmakefile/OCamlMakefile
-
- -- St├ęphane Glondu <glo...@debian.org>, Mon, 11 Apr 2011 13:35:43 +0200
-
diff --git a/debian/libpcre-ocaml-dev.doc-base 
b/debian/libpcre-ocaml-dev.doc-base
new file mode 100644
index 0000000..93bbc38
--- /dev/null
+++ b/debian/libpcre-ocaml-dev.doc-base
@@ -0,0 +1,9 @@
+Document: libpcre-ocaml-dev
+Title: API for PCRE bindings
+Author: Markus Mottl
+Abstract: Ocamldoc-generated documentation for OCaml PCRE bindings
+Section: Programming/OCaml
+
+Format: HTML
+Index: /usr/share/doc/libpcre-ocaml-dev/api/index.html
+Files: /usr/share/doc/libpcre-ocaml-dev/api/*.html
diff --git a/debian/libpcre-ocaml-dev.docs b/debian/libpcre-ocaml-dev.docs
index 71dfd5b..b43bf86 100644
--- a/debian/libpcre-ocaml-dev.docs
+++ b/debian/libpcre-ocaml-dev.docs
@@ -1 +1 @@
-README.txt
+README.md
diff --git a/debian/libpcre-ocaml-dev.install.in 
b/debian/libpcre-ocaml-dev.install.in
index 215734d..d7c5051 100644
--- a/debian/libpcre-ocaml-dev.install.in
+++ b/debian/libpcre-ocaml-dev.install.in
@@ -1,4 +1,7 @@
-debian/tmp/@OCamlStdlibDir@/pcre/META
-debian/tmp/@OCamlStdlibDir@/pcre/*.a
-debian/tmp/@OCamlStdlibDir@/pcre/*.cm*
-debian/tmp/@OCamlStdlibDir@/pcre/*.ml*
+@OCamlStdlibDir@/pcre/META
+@OCamlStdlibDir@/pcre/*.a
+@OCamlStdlibDir@/pcre/*.ml*
+@OCamlStdlibDir@/pcre/*.cmi
+OPT: @OCamlStdlibDir@/pcre/*.cmx
+OPT: @OCamlStdlibDir@/pcre/*.cmxa
+usr/share/doc/pcre-ocaml/api usr/share/doc/libpcre-ocaml-dev
diff --git a/debian/libpcre-ocaml-dev.ocamldoc 
b/debian/libpcre-ocaml-dev.ocamldoc
deleted file mode 100644
index 1bfdd46..0000000
--- a/debian/libpcre-ocaml-dev.ocamldoc
+++ /dev/null
@@ -1 +0,0 @@
-# This file must not be empty to be represented in .diff.gz!
diff --git a/debian/libpcre-ocaml.install.in b/debian/libpcre-ocaml.install.in
index 42fea44..67d462e 100644
--- a/debian/libpcre-ocaml.install.in
+++ b/debian/libpcre-ocaml.install.in
@@ -1 +1,4 @@
-@OCamlStdlibDir@/pcre/*.so     @OCamlDllDir@
+@OCamlDllDir@/*.so     @OCamlDllDir@
+@OCamlStdlibDir@/pcre/META
+@OCamlStdlibDir@/pcre/*.cma
+DYN: @OCamlStdlibDir@/pcre/*.cmxs
diff --git a/debian/patches/0001-enable-byte-only-build.patch 
b/debian/patches/0001-enable-byte-only-build.patch
deleted file mode 100644
index e7b4778..0000000
--- a/debian/patches/0001-enable-byte-only-build.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Stefano Zacchiroli <z...@upsilon.cc>
-Date: Thu, 8 Apr 2010 22:05:57 +0200
-Subject: enable byte only build
-
-split the build process among native and non native targets, introducing the
-new opt target; it will be invoked only if /usr/bin/ocamlopt exists
----
- Makefile      |    5 +++++
- OCamlMakefile |   13 ++++++++++---
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 880d68f..a3c84ed 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,8 +4,13 @@ EXAMPLES = $(filter-out examples/OMakefile examples/CVS, 
$(wildcard examples/*))
- 
- .PHONY: all
- all:
-+      @cd lib && $(MAKE) byte-code-library
-+
-+.PHONY: opt
-+opt:
-       @cd lib && $(MAKE) byte-code-library native-code-library
- 
-+
- .PHONY:       examples
- examples:
-       @for dir in $(EXAMPLES); do (cd $$dir && $(MAKE)); done
-diff --git a/OCamlMakefile b/OCamlMakefile
-index 7d42c88..5ba6928 100644
---- a/OCamlMakefile
-+++ b/OCamlMakefile
-@@ -525,8 +525,14 @@ ifndef STATIC
- endif
- 
- ifndef LIBINSTALL_FILES
--  LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
--                    $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
-+  ifdef NATIVE
-+    LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
-+                        $(RESULT).cmxa $(RESULT).$(EXT_LIB) $(RES_CLIB)
-+  else
-+    LIBINSTALL_FILES := $(RESULT).mli $(RESULT).cmi $(RESULT).cma \
-+                        $(RES_CLIB)
-+  endif
-+
-   ifndef STATIC
-     ifneq ($(strip $(OBJ_LINK)),)
-       LIBINSTALL_FILES += $(DLLSONAME)
-@@ -1227,7 +1233,8 @@ subprojs: $(SUBPROJS:%=subproj_%)
- .PHONY: libinstall
- libinstall:   all
-       $(QUIET)printf "\nInstalling library with ocamlfind\n"
--      $(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) $(RESULT) META 
$(LIBINSTALL_FILES)
-+      mkdir -p $(DESTDIR)
-+      $(OCAMLFIND) install -destdir $(DESTDIR) -ldconf /dev/null 
$(OCAMLFIND_INSTFLAGS) $(RESULT) META $(LIBINSTALL_FILES)
-       $(QUIET)printf "\nInstallation successful.\n"
- 
- .PHONY: libinstall-byte-code
--- 
diff --git a/debian/patches/0002-build-PIC-shared-objects.patch 
b/debian/patches/0002-build-PIC-shared-objects.patch
deleted file mode 100644
index a00b579..0000000
--- a/debian/patches/0002-build-PIC-shared-objects.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Stefano Zacchiroli <z...@upsilon.cc>
-Date: Thu, 8 Apr 2010 22:07:02 +0200
-Subject: build PIC shared objects
-
----
- OCamlMakefile |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/OCamlMakefile b/OCamlMakefile
-index 5ba6928..8b982f0 100644
---- a/OCamlMakefile
-+++ b/OCamlMakefile
-@@ -1129,6 +1129,7 @@ endif
- 
- %.$(EXT_OBJ): %.c
-                       $(OCAMLC) -c -cc "$(CC)" -ccopt "$(CFLAGS) \
-+                              -fPIC \
-                               $(CPPFLAGS) $(CPPFLAGS_WIN32) \
-                               $(CFLAGS_WIN32) $(CINCFLAGS) $(CFLAG_O)$@ " $<
- 
--- 
diff --git a/debian/patches/0003-Compile-with-debugging-symbols.patch 
b/debian/patches/0003-Compile-with-debugging-symbols.patch
deleted file mode 100644
index 945b197..0000000
--- a/debian/patches/0003-Compile-with-debugging-symbols.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Stephane Glondu <st...@glondu.net>
-Date: Sun, 1 Jan 2012 16:09:28 +0100
-Subject: Compile with debugging symbols
-
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649863
----
- Makefile |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index a3c84ed..a66ec71 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,11 +4,11 @@ EXAMPLES = $(filter-out examples/OMakefile examples/CVS, 
$(wildcard examples/*))
- 
- .PHONY: all
- all:
--      @cd lib && $(MAKE) byte-code-library
-+      @cd lib && $(MAKE) debug-code-library
- 
- .PHONY: opt
- opt:
--      @cd lib && $(MAKE) byte-code-library native-code-library
-+      @cd lib && $(MAKE) debug-code-library debug-native-code-library
- 
- 
- .PHONY:       examples
--- 
diff --git a/debian/patches/0004-Temporary-fix.patch 
b/debian/patches/0004-Temporary-fix.patch
deleted file mode 100644
index cb8ab24..0000000
--- a/debian/patches/0004-Temporary-fix.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From: Stephane Glondu <st...@glondu.net>
-Date: Mon, 2 Jan 2012 14:05:36 +0100
-Subject: Temporary fix
-
-In debug targets, overriding OCAMLLDFLAGS in recursive calls to make
-cause the -lpcre option to be forgotten somehow. I haven't figured out
-why yet. This causes (some) reverse dependencies to FTBFS, so here is
-a dirty hack to "fix" it.
----
- OCamlMakefile |   14 ++++++--------
- 1 files changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/OCamlMakefile b/OCamlMakefile
-index 8b982f0..8bf1934 100644
---- a/OCamlMakefile
-+++ b/OCamlMakefile
-@@ -862,8 +862,7 @@ debug-code-library:        $(PRE_TARGETS)
-                               $(RES_CLIB) $(BCRESULT).cma \
-                               REAL_RESULT="$(BCRESULT)" make_deps=yes \
-                               CREATE_LIB=yes \
--                              OCAMLFLAGS="-g $(OCAMLFLAGS)" \
--                              OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
-+                              OCAMLFLAGS="-g $(OCAMLFLAGS)"
- dcl:  debug-code-library
- 
- # generates byte-code libraries with debugging information (native code)
-@@ -873,8 +872,7 @@ debug-native-code-library: $(PRE_TARGETS)
-                               REAL_RESULT="$(NCRESULT)" make_deps=yes \
-                               REAL_OCAMLC="$(OCAMLOPT)" \
-                               CREATE_LIB=yes \
--                              OCAMLFLAGS="-g $(OCAMLFLAGS)" \
--                              OCAMLLDFLAGS="-g $(OCAMLLDFLAGS)"
-+                              OCAMLFLAGS="-g $(OCAMLFLAGS)"
- dncl: debug-native-code-library
- 
- # generates byte-code for profiling
-@@ -1009,10 +1007,10 @@ endif
- 
- ifndef LIB_PACK_NAME
- $(RESULT).cma:                $(REAL_IMPL_INTF) $(MAKEDLL) $(EXTRADEPS) 
$(RESULTDEPS)
--                      $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(OBJS_LIBS) 
$(ALL_LDFLAGS) -o $@ $(REAL_IMPL)
-+                      $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(OBJS_LIBS) -g 
$(ALL_LDFLAGS) -o $@ $(REAL_IMPL)
- 
- $(RESULT).cmxa $(RESULT).$(EXT_LIB):  $(REAL_IMPL_INTF) $(EXTRADEPS) 
$(RESULTDEPS)
--                      $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(OBJS_LIBS) 
$(ALL_LDFLAGS) -o $@ $(REAL_IMPL)
-+                      $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(OBJS_LIBS) -g 
$(ALL_LDFLAGS) -o $@ $(REAL_IMPL)
- else
- # Packing a bytecode library
- LIB_PACK_NAME_MLI = $(wildcard $(LIB_PACK_NAME).mli)
-@@ -1034,10 +1032,10 @@ $(LIB_PACK_NAME_CMI) $(LIB_PACK_NAME).cmx: 
$(REAL_IMPL_INTF)
- endif
- 
- $(RESULT).cma:                $(LIB_PACK_NAME).cmi $(LIB_PACK_NAME).cmo 
$(MAKEDLL) $(EXTRADEPS) $(RESULTDEPS)
--                      $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(OBJS_LIBS) 
$(ALL_LDFLAGS) -o $@ $(LIB_PACK_NAME).cmo
-+                      $(REAL_OCAMLFIND) $(REAL_OCAMLC) -a $(OBJS_LIBS) -g 
$(ALL_LDFLAGS) -o $@ $(LIB_PACK_NAME).cmo
- 
- $(RESULT).cmxa $(RESULT).$(EXT_LIB):  $(LIB_PACK_NAME).cmi 
$(LIB_PACK_NAME).cmx $(EXTRADEPS) $(RESULTDEPS)
--                      $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(OBJS_LIBS) 
$(filter-out -custom, $(ALL_LDFLAGS)) -o $@ $(LIB_PACK_NAME).cmx
-+                      $(REAL_OCAMLFIND) $(OCAMLOPT) -a $(OBJS_LIBS) -g 
$(filter-out -custom, $(ALL_LDFLAGS)) -o $@ $(LIB_PACK_NAME).cmx
- endif
- 
- $(RES_CLIB):          $(OBJ_LINK)
--- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 8339421..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,4 +0,0 @@
-0001-enable-byte-only-build.patch
-0002-build-PIC-shared-objects.patch
-0003-Compile-with-debugging-symbols.patch
-0004-Temporary-fix.patch
diff --git a/debian/rules b/debian/rules
index c2a9e8c..784b363 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,16 +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 = libpcre-ocaml-dev
-DESTDIR := $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)
-DEB_INSTALL_EXAMPLES_$(PKGNAME) := -Xmake_win32_cloc.bat
-
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-DEB_MAKE_BUILD_TARGET = opt NO_CUSTOM=y
-DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DESTDIR) NATIVE=true
-else
-DEB_MAKE_BUILD_TARGET = all NO_CUSTOM=y
-DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DESTDIR)
-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

-- 
pcre-ocaml 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