[Pkg-ocaml-maint-commits] [SCM] pgocaml-classic packaging branch, master, updated. upstream/1.2-3-ge8c55fc

Sylvain Le Gall gildor at debian.org
Mon Jun 8 09:22:54 UTC 2009


The following commit has been merged in the master branch:
commit 71be90bf7e5c43cb23688fea293828886f37b950
Author: Sylvain Le Gall <gildor at debian.org>
Date:   Mon Jun 8 11:08:56 2009 +0200

    Add debian packaging directory

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..138d397
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,23 @@
+PG'OCaml for Debian
+------------------------
+
+This is the classic branch of PG'OCaml. It may not be supported in the future. Please
+consider switching to the main branch of PG'OCaml, formerly known as the known as the
+monadic branch.
+
+
+OBTAINING UPSTREAM SOURCE:
+
+The project homepage can be found at http://pgocaml.berlios.de/.
+
+
+
+MORE DOCUMENTATION:
+
+You can, or should, have a look at the other text files distributed withing this tarball.
+You should also definitely have a look at the following documentation from Dario Texeira:
+
+        http://www.dse.nl/~dario/projects/pgoctut/pgoctut.pdf
+
+
+ -- Guillaume Yziquel <guillaume.yziquel at citycable.ch>  Thu, 12 Feb 2009 20:43:59 +0100
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..3d9f77f
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,5 @@
+This package use dpatch for patching the source.
+
+Please consider reading dpatch manpage to patch the source.
+
+-- Guillaume Yziquel <guillaume.yziquel at citycable.ch>  Tue, 02 Jun 2009 01:27:42 +0100
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f085d26
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+pgocaml-classic (1.2-1) UNRELEASED; urgency=low
+
+  * Initial release (Closes: #516629)
+
+ -- Guillaume Yziquel <guillaume.yziquel at citycable.ch>  Thu, 02 Jun 2009 17:10:26 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..2f06fa2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: pgocaml-classic
+Section: ocaml
+Priority: optional
+Maintainer: "Debian OCaml Maintainers" <debian-ocaml-maint at lists.debian.org>
+Uploader: Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+DM-Upload-Allowed: yes
+Build-Depends: cdbs (>= 0.4.52), debhelper (>= 7), dpatch, dh-ocaml,
+ ocaml-nox (>=3.11), camlp4 (>=3.11), ocaml-findlib,
+ libextlib-ocaml-dev, libpcre-ocaml-dev,
+ libcsv-ocaml-dev, libcalendar-ocaml-dev (>= 2)
+Standards-Version: 3.8.0
+Homepage: http://developer.berlios.de/projects/pgocaml/
+
+Package: libpgocaml-classic-ocaml-dev
+Architecture: any
+Depends: ocaml-base-nox-${F:OCamlABI},
+ libextlib-ocaml-dev, libpcre-ocaml-dev,
+ libcsv-ocaml-dev, libcalendar-ocaml-dev (>= 2),
+ ${misc:Depends}
+Recommends: ocaml-findlib, postgresql (>= 7.4)
+Description: OCaml type-safe bindings for PostgreSQL
+ PG'OCaml provides an interface to PostgreSQL databases for Ocaml applications.
+ It uses Camlp4 to extend the Ocaml syntax, enabling one to directly embed SQL
+ statements inside the Ocaml code. Moreover, it uses the describe feature of
+ PostgreSQL to obtain type information about the database. This allows PG'OCaml
+ to check at compile-time if the program is indeed consistent with the database
+ structure. This type-safe database access is the primary advantage that PG'OCaml
+ has over other PostgreSQL bindings for Ocaml.
+ The classic branch of PG'OCaml, developed by Richard W.M. Jones. This branch may
+ be discontinued in future releases.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..36e3ae7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,34 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
+Upstream-Name: PG'OCaml
+Upstream-Maintainer: Richard W.M. Jones <rjones at annexia.org>
+Upstream-Source: http://developer.berlios.de/projects/pgocaml/
+Packaged-By: Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+Packaged-Date: Thu, 02 Jun 2009 17:13:41 +0100
+Upstream-author: Richard W.M. Jones <rjones at annexia.org>
+Original-Source-Location: http://developer.berlios.de/projects/pgocaml/
+
+Files: *
+Copyright: (C) Copyright 2006 Richard W.M. Jones, Merjis Ltd. <rjones at annexia.org>
+License: LGPL-2.1+ | other
+ As a special exception to the GNU Library General Public License, you
+ may link, statically or dynamically, a "work that uses the Library"
+ with a publicly distributed version of the Library to produce an
+ executable file containing portions of the Library, and distribute
+ that executable file under terms of your choice, without any of the
+ additional requirements listed in clause 6 of the GNU Library General
+ Public License.  By "a publicly distributed version of the Library",
+ we mean either the unmodified Library as distributed by Red Hat, or a
+ modified version of the Library that is distributed under the
+ conditions defined in clause 2 of the GNU Library General Public
+ License.  This exception does not however invalidate any other reasons
+ why the executable file might be covered by the GNU Library General
+ Public License.
+ .
+ On Debian GNU/Linux systems, the complete text of the GNU Lesser General
+ Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
+
+Files: debian/*
+Copyright: (C) Copyright 2009 Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+License: GPL-2+
+ On Debian GNU/Linux systems, the complete text of the GNU Lesser General
+ Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/debian/libpgocaml-classic-ocaml-dev.dirs.in b/debian/libpgocaml-classic-ocaml-dev.dirs.in
new file mode 100644
index 0000000..cc51687
--- /dev/null
+++ b/debian/libpgocaml-classic-ocaml-dev.dirs.in
@@ -0,0 +1 @@
+ at OCamlStdlibDir@
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..40eedeb
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,4 @@
+01_namespaces
+02_postgresql_socket
+03_makefile_depend
+04_makefile_mli
diff --git a/debian/patches/01_namespaces.dpatch b/debian/patches/01_namespaces.dpatch
new file mode 100644
index 0000000..ab53b56
--- /dev/null
+++ b/debian/patches/01_namespaces.dpatch
@@ -0,0 +1,145 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_namespaces.dpatch by Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adjusting namespaces to the debian setup of CalendarLib.
+
+ at DPATCH@
+diff -urNad pgocaml-classic-1.2~/pGOCaml.ml pgocaml-classic-1.2/pGOCaml.ml
+--- pgocaml-classic-1.2~/pGOCaml.ml	2009-02-13 10:31:39.000000000 +0100
++++ pgocaml-classic-1.2/pGOCaml.ml	2009-02-13 10:32:50.000000000 +0100
+@@ -1068,7 +1068,7 @@
+       (* For unknown types, look at <postgresql/catalog/pg_type.h>. *)
+       raise (Error ("PGOCaml: unknown type for OID " ^ Int32.to_string i))
+ 
+-type timestamptz = Calendar.t * Time_Zone.t
++type timestamptz = CalendarLib.Calendar.t * CalendarLib.Time_Zone.t
+ 
+ type int16 = int
+ type bytea = string
+@@ -1084,22 +1084,22 @@
+ let string_of_int32 = Int32.to_string
+ let string_of_int64 = Int64.to_string
+ let string_of_float = string_of_float
+-let string_of_timestamp = Printer.CalendarPrinter.to_string
++let string_of_timestamp = CalendarLib.Printer.CalendarPrinter.to_string
+ let string_of_timestamptz (cal, tz) =
+-  Printer.CalendarPrinter.to_string cal ^
++  CalendarLib.Printer.CalendarPrinter.to_string cal ^
+     match tz with
+-    | Time_Zone.UTC -> "+00"
+-    | Time_Zone.Local ->
+-	let gap = Time_Zone.gap Time_Zone.UTC Time_Zone.Local in
++    | CalendarLib.Time_Zone.UTC -> "+00"
++    | CalendarLib.Time_Zone.Local ->
++	let gap = CalendarLib.Time_Zone.gap CalendarLib.Time_Zone.UTC CalendarLib.Time_Zone.Local in
+ 	if gap >= 0 then sprintf "+%02d" gap
+ 	else sprintf "-%02d" (-gap)
+-    | Time_Zone.UTC_Plus gap ->
++    | CalendarLib.Time_Zone.UTC_Plus gap ->
+ 	if gap >= 0 then sprintf "+%02d" gap
+ 	else sprintf "-%02d" (-gap)
+-let string_of_date = Printer.DatePrinter.to_string
+-let string_of_time = Printer.TimePrinter.to_string
++let string_of_date = CalendarLib.Printer.DatePrinter.to_string
++let string_of_time = CalendarLib.Printer.TimePrinter.to_string
+ let string_of_interval p =
+-  let y, m, d, s = Calendar.Period.ymds p in
++  let y, m, d, s = CalendarLib.Calendar.Period.ymds p in
+   sprintf "%d years %d mons %d days %d seconds" y m d s
+ 
+ let string_of_unit () = ""
+@@ -1148,7 +1148,7 @@
+ let int32_of_string = Int32.of_string
+ let int64_of_string = Int64.of_string
+ let float_of_string = float_of_string
+-let date_of_string = Printer.DatePrinter.from_string
++let date_of_string = CalendarLib.Printer.DatePrinter.from_string
+ 
+ let time_of_string str =
+   (* Remove trailing ".microsecs" if present. *)
+@@ -1157,7 +1157,7 @@
+     if n > 8 && str.[8] = '.' then
+       String.sub str 0 8
+     else str in
+-  Printer.TimePrinter.from_string str
++  CalendarLib.Printer.TimePrinter.from_string str
+ 
+ let timestamp_of_string str =
+   (* Remove trailing ".microsecs" if present. *)
+@@ -1166,7 +1166,7 @@
+     if n > 19 && str.[19] = '.' then
+       String.sub str 0 19
+     else str in
+-  Printer.CalendarPrinter.from_string str
++  CalendarLib.Printer.CalendarPrinter.from_string str
+ 
+ let timestamptz_of_string str =
+   (* Split into datetime+timestamp. *)
+@@ -1178,11 +1178,11 @@
+       str, None in
+   let cal = timestamp_of_string cal in
+   let tz = match tz with
+-    | None -> Time_Zone.Local (* best guess? *)
++    | None -> CalendarLib.Time_Zone.Local (* best guess? *)
+     | Some tz ->
+ 	let sgn = match tz.[0] with '+' -> 1 | '-' -> 0 | _ -> assert false in
+ 	let mag = int_of_string (String.sub tz 1 2) in
+-	Time_Zone.UTC_Plus (sgn * mag) in
++	CalendarLib.Time_Zone.UTC_Plus (sgn * mag) in
+   cal, tz
+ 
+ let re_interval =
+@@ -1202,7 +1202,7 @@
+   fun str ->
+     try
+       let sub = Pcre.extract ~rex:re_interval str in
+-      Calendar.Period.make
++      CalendarLib.Calendar.Period.make
+ 	(int_opt sub.(1)) (* year *)
+         (int_opt sub.(2)) (* month *)
+         (int_opt sub.(3)) (* day *)
+diff -urNad pgocaml-classic-1.2~/pGOCaml.mli pgocaml-classic-1.2/pGOCaml.mli
+--- pgocaml-classic-1.2~/pGOCaml.mli	2009-02-13 10:31:39.000000000 +0100
++++ pgocaml-classic-1.2/pGOCaml.mli	2009-02-13 10:33:44.000000000 +0100
+@@ -195,7 +195,7 @@
+   * example, [name_of_type (Int32.of_int 25)] returns ["string"].
+   *)
+ 
+-type timestamptz = Calendar.t * Time_Zone.t
++type timestamptz = CalendarLib.Calendar.t * CalendarLib.Time_Zone.t
+ 
+ type int16 = int
+ type bytea = string (* XXX *)
+@@ -209,11 +209,11 @@
+ val string_of_int32 : int32 -> string
+ val string_of_int64 : int64 -> string
+ val string_of_float : float -> string
+-val string_of_timestamp : Calendar.t -> string
++val string_of_timestamp : CalendarLib.Calendar.t -> string
+ val string_of_timestamptz : timestamptz -> string
+-val string_of_date : Date.t -> string
+-val string_of_time : Time.t -> string
+-val string_of_interval : Calendar.Period.t -> string
++val string_of_date : CalendarLib.Date.t -> string
++val string_of_time : CalendarLib.Time.t -> string
++val string_of_interval : CalendarLib.Calendar.Period.t -> string
+ val string_of_int32_array : int32_array -> string
+ val string_of_bytea : bytea -> string
+ val string_of_string : string -> string
+@@ -225,11 +225,11 @@
+ val int32_of_string : string -> int32
+ val int64_of_string : string -> int64
+ val float_of_string : string -> float
+-val timestamp_of_string : string -> Calendar.t
++val timestamp_of_string : string -> CalendarLib.Calendar.t
+ val timestamptz_of_string : string -> timestamptz
+-val date_of_string : string -> Date.t
+-val time_of_string : string -> Time.t
+-val interval_of_string : string -> Calendar.Period.t
++val date_of_string : string -> CalendarLib.Date.t
++val time_of_string : string -> CalendarLib.Time.t
++val interval_of_string : string -> CalendarLib.Calendar.Period.t
+ val int32_array_of_string : string -> int32_array
+ val bytea_of_string : string -> bytea
+ val unit_of_string : string -> unit
diff --git a/debian/patches/02_postgresql_socket.dpatch b/debian/patches/02_postgresql_socket.dpatch
new file mode 100644
index 0000000..899a722
--- /dev/null
+++ b/debian/patches/02_postgresql_socket.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_postgresql_socket.dpatch by Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Setting the Postgesql socket's directory according to default Debian setup.
+
+ at DPATCH@
+diff -urNad pgocaml-classic-1.2~/Makefile.config pgocaml-classic-1.2/Makefile.config
+--- pgocaml-classic-1.2~/Makefile.config	2009-05-28 14:31:08.000000000 +0200
++++ pgocaml-classic-1.2/Makefile.config	2009-06-02 19:26:59.000000000 +0200
+@@ -24,8 +24,8 @@
+ # Default location for Unix domain socket directory.  If the auto-detection
+ # does not work on your system, please set this variable manually.
+ 
+-DEFAULT_UNIX_DOMAIN_SOCKET_DIR := $(if $(wildcard /var/run/postgresql),"/var/run/postgresql","/tmp")
++#DEFAULT_UNIX_DOMAIN_SOCKET_DIR := $(if $(wildcard /var/run/postgresql),"/var/run/postgresql","/tmp")
+ #DEFAULT_UNIX_DOMAIN_SOCKET_DIR := /tmp
+-#DEFAULT_UNIX_DOMAIN_SOCKET_DIR := /var/run/postgresql
++DEFAULT_UNIX_DOMAIN_SOCKET_DIR := /var/run/postgresql
+ 
+ #WINDOWS := 1
diff --git a/debian/patches/03_makefile_depend.dpatch b/debian/patches/03_makefile_depend.dpatch
new file mode 100644
index 0000000..dff2d82
--- /dev/null
+++ b/debian/patches/03_makefile_depend.dpatch
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_makefile_depend.dpatch by Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Circumventing the Makefile's depend target.
+
+ at DPATCH@
+diff -urNad pgocaml-classic-1.2~/Makefile pgocaml-classic-1.2/Makefile
+--- pgocaml-classic-1.2~/Makefile	2009-04-30 19:13:57.000000000 +0200
++++ pgocaml-classic-1.2/Makefile	2009-06-04 22:25:42.000000000 +0200
+@@ -134,16 +134,20 @@
+ # Dependencies.
+ #
+ 
+-depend: .depend
+-
+-.depend: pGOCaml_config.ml
+-	rm -f .depend
+-	ocamldep pGOCaml.mli pGOCaml.ml test_pgocaml_lowlevel.ml > $@
+-	-ocamldep -pp "camlp4o $(FOR_P4) ./pa_pgsql.cmo" test_pgocaml.ml >> $@
++#depend: .depend
++#
++#.depend: pGOCaml_config.ml
++#	rm -f .depend
++#	ocamldep pGOCaml.mli pGOCaml.ml test_pgocaml_lowlevel.ml > $@
++#	-ocamldep -pp "camlp4o $(FOR_P4) ./pa_pgsql.cmo" test_pgocaml.ml >> $@
++#
++#ifeq ($(wildcard .depend),.depend)
++#include .depend
++#endif
+ 
+-ifeq ($(wildcard .depend),.depend)
+-include .depend
+-endif
++pGOCaml.cmi: 
++pGOCaml.cmo: pGOCaml_config.cmo pGOCaml.cmi 
++pGOCaml.cmx: pGOCaml_config.cmx pGOCaml.cmi
+ 
+ #
+ # Install.
diff --git a/debian/patches/04_makefile_mli.dpatch b/debian/patches/04_makefile_mli.dpatch
new file mode 100644
index 0000000..bdbab33
--- /dev/null
+++ b/debian/patches/04_makefile_mli.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_makefile_mli.dpatch by Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: .mli file installed for ocamldoc documentation generation.
+
+ at DPATCH@
+diff -urNad pgocaml-classic-1.2~/Makefile pgocaml-classic-1.2/Makefile
+--- pgocaml-classic-1.2~/Makefile	2009-06-04 23:23:33.000000000 +0200
++++ pgocaml-classic-1.2/Makefile	2009-06-04 23:24:09.000000000 +0200
+@@ -154,7 +154,7 @@
+ #
+ 
+ findlib_install:
+-	ocamlfind install $(PACKAGE) META pgocaml.a pgocaml.cma pgocaml.cmxa pGOCaml.cm[ix] pa_pgsql.cmo
++	ocamlfind install $(PACKAGE) META pgocaml.a pgocaml.cma pgocaml.cmxa pGOCaml.cm[ix] pa_pgsql.cmo pGOCaml.mli
+ 
+ reinstall:
+ 	ocamlfind remove $(PACKAGE)
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3e5d99f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,39 @@
+#!/usr/bin/make -f
+# debian/rules for pgocaml-classic package
+# Copyright (C) 2009 Guillaume Yziquel <guillaume.yziquel at citycable.ch>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+include /usr/share/cdbs/1/class/makefile.mk
+include /usr/share/cdbs/1/class/ocaml.mk
+
+DESTDIR_DEV=$(CURDIR)/debian/libpgocaml-classic-ocaml-dev
+
+DEB_MAKE_CLEAN_TARGET    := clean
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+DEB_MAKE_BUILD_TARGET    := all
+DEB_MAKE_INSTALL_TARGET  := findlib_install
+else
+DEB_MAKE_BUILD_TARGET    := all
+DEB_MAKE_INSTALL_TARGET  := findlib_install
+endif
+DEB_MAKE_INSTALL_TARGET  += OCAMLFIND_DESTDIR="$(DESTDIR_DEV)/$(OCAML_STDLIB_DIR)"
+
+OCAML_OCAMLDOC_PACKAGES = libpgocaml-classic-ocaml-dev
+OCAML_OCAMLDOC_OCAMLFIND_FLAGS = -package extlib -package pcre -package csv -package calendar
+#OCAML_OCAMLDOC_FLAGS += -I +camlp4
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..af4eb4d
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://download.berlios.de/pgocaml/pgocaml-classic([\d\.]*)\.tgz

-- 
pgocaml-classic packaging



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