[Pkg-ocaml-maint-commits] [SCM] biniou packaging branch, master, updated. debian/1.0.0-1-5-g1a45b59

Hendrik Tews hendrik at askra.de
Thu Jun 13 12:06:57 UTC 2013


The following commit has been merged in the master branch:
commit 1a45b59a03a6dd1bc08ea6dd92d3bf664f019eb3
Author: Hendrik Tews <hendrik at askra.de>
Date:   Thu Jun 13 13:31:41 2013 +0200

    update packaging and fix tests

diff --git a/debian/bdump.1 b/debian/bdump.1
index 8e9101d..603d198 100644
--- a/debian/bdump.1
+++ b/debian/bdump.1
@@ -1,29 +1,82 @@
-.TH BDUMP 1 "December 5, 2010" "bdump User Manual"
+.\" groff -man -Tascii bdump.1
+.\" ==========================================================================
+.\" ============= Synopsis ===================================================
+.\" ==========================================================================
+.TH BDUMP 1 "June 2013" BDUMP "User Manuals"
 .SH NAME
-.PP
-bdump - dump biniou data.
+bdump \- visualization of biniou data
 .SH SYNOPSIS
-.PP
-bdump [options] file*
+.B bdump \fR[\fIOptions...\fR] [\fIfile\fR]
+.\" ==========================================================================
+.\" ============= Description ================================================
+.\" ==========================================================================
 .SH DESCRIPTION
-.PP
-Dump biniou data on standard output.
+.B bdump
+prints biniou data files in human readable form. For the
+conversion of hash tags into meaningful names,
+.B bdump
+maintains a dictionary of words, see option
+.I -h\fR.
+New words can be added to this dictionary with
+.I -d
+and
+.I -w\fR. The dictionary is saved between invocation, see option
+.I -x
+and 
+.I -h\fR.
+.P
+If the
+.I file
+argument is omitted, 
+.B bdump
+reads data from standard input.
+.\"
+.\" ==========================================================================
+.\" ================ Options =================================================
+.\" ==========================================================================
+.\"
 .SH OPTIONS
+.\" ===================== -d file ============================================
 .TP
-.B -w word1,word2,\&...
-Comma-separated list of words to add to the dictionary
-.RS
-.RE
+.B "-d file"
+load
+.I file
+containing words to add to the dictionary, one per line
+.\" ===================== -h file ============================================
 .TP
-.B -d file
-File containing words to add to the dictionary, one per line
-.RS
-.RE
+.B "-h file"
+set dictionary file for unhashing. Default is
+.I $HOME/.bdump-dict
+on Unix and
+.I $HOMEPATH\_bdump-dict
+on Windows
+.\" ===================== -w word1,word2,... =================================
 .TP
-.B -help|--help
-Display list of options
-.RS
-.RE
-.SH AUTHORS
-Sylvain Le Gall.
-
+.B "-w word1,word2,..."
+add words to the dictionary
+.\" ===================== -x  ================================================
+.TP
+.B "-x"
+neither load nor update the dictionary file (see option
+.I -h\fR)
+.\" ===================== -help ==============================================
+.TP
+.B "-help | --help"
+print options and exit
+.\"
+.\" ==========================================================================
+.\" ================ SEE ALSO ================================================
+.\" ==========================================================================
+.\"
+.SH SEE ALSO
+.TP
+the \fBbiniou\fR web site, \fIhttp://mjambon.com/biniou.html\fR
+.\"
+.\" ==========================================================================
+.\" ================ Author ==================================================
+.\" ==========================================================================
+.\"
+.SH AUTHOR
+This manual page was written by Sylvain Le Gall
+<gildor at debian.org> and Hendrik Tews <hendrik at askra.de>,
+specifically for the Debian project (and may be used by others).
diff --git a/debian/bdump.mkd b/debian/bdump.mkd
index 63550e7..ba93350 100644
--- a/debian/bdump.mkd
+++ b/debian/bdump.mkd
@@ -1,3 +1,5 @@
+% this is the old source of the man page, it is currently not used
+% translate with pandoc -s -w man $^ -o $@
 % BDUMP(1) bdump User Manual
 % Sylvain Le Gall 
 % December 5, 2010
diff --git a/debian/changelog b/debian/changelog
index 26b099e..47209b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,20 @@
-biniou (1.0.0-2) UNRELEASED; urgency=low
+biniou (1.0.6-1) unstable; urgency=low
 
   [ Sylvain Le Gall ]
   * Remove Sylvain Le Gall from uploaders
 
   [ Hendrik Tews ]
-  * unapply patches
   * update watch
-
- -- Hendrik Tews <hendrik at askra.de>  Fri, 31 May 2013 23:54:23 +0200
+  * add myself as uploader
+  * bump debhelper compat level and standards version
+  * update Vcs, dependencies and package description
+  * update copyright
+  * rename and adapt debian-changes patch 
+  * add patch fix-bi-stream-32 
+  * update man page
+  * install api docs in api/html
+
+ -- Hendrik Tews <hendrik at askra.de>  Thu, 13 Jun 2013 14:01:31 +0200
 
 biniou (1.0.0-1) unstable; urgency=low
 
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index 9b52da8..ced13f6 100644
--- a/debian/control
+++ b/debian/control
@@ -2,23 +2,28 @@ Source: biniou
 Section: ocaml
 Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
+Uploaders: Hendrik Tews <hendrik at askra.de>
 Build-Depends:
   ocaml-nox (>= 3.11.1-3~),
+  ocaml-best-compilers,
   ocaml-findlib,
   dh-ocaml (>= 0.9~),
-  debhelper (>= 7.0.50~),
+  debhelper (>= 9),
   libeasy-format-ocaml-dev
-Standards-Version: 3.9.2
+Standards-Version: 3.9.4
 Homepage: http://martin.jambon.free.fr/biniou.html
-Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/biniou.git
-Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/biniou.git
+Vcs-Git: git://anonscm.debian.org/pkg-ocaml-maint/packages/biniou.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/biniou.git
 
 Package: libbiniou-ocaml-dev
 Architecture: any
-Depends: ${ocaml:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Depends:
+ ${ocaml:Depends}, 
+ ${shlibs:Depends},
+ ${misc:Depends}
 Provides: ${ocaml:Provides}
 Recommends: ocaml-findlib
-Description: flexible binary data format in OCaml
+Description: flexible binary data format in OCaml - development files
  Biniou is a binary data format designed for speed, safety, ease of use
  and backward compatibility as protocols evolve. Biniou is vastly
  equivalent to JSON in terms of functionality but allows implementations
@@ -26,13 +31,19 @@ Description: flexible binary data format in OCaml
  space savings. Biniou data can be decoded into human-readable form
  without knowledge of type definitions except for field and variant names
  which are represented by 31-bit hashes.
+ .
+ This package contains the development files needed for programming
+ with the library.
 
 Package: libbiniou-ocaml
 Architecture: any
-Depends: ${ocaml:Depends}, ${misc:Depends}
+Depends:
+ ${ocaml:Depends}, 
+ ${shlibs:Depends},
+ ${misc:Depends}
 Provides: ${ocaml:Provides}
 Recommends: ocaml-findlib
-Description: flexible binary data format in OCaml
+Description: flexible binary data format in OCaml - plugins
  Biniou is a binary data format designed for speed, safety, ease of use
  and backward compatibility as protocols evolve. Biniou is vastly
  equivalent to JSON in terms of functionality but allows implementations
diff --git a/debian/copyright b/debian/copyright
index f0fafc8..f4dfdba 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,11 +1,11 @@
-Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
-Name: biniou
-Maintainer: Sylvain Le Gall <gildor at debian.org>
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Biniou
+Upstream-Contact: Martin Jambon <martin at mjambon.com> 
+Source: http://mjambon.com/easy-format.html
 
 Files: *
 Copyright: Copyright (c) 2010 Martin Jambon
-License: BSD3
-
+License: BSD-3-clause
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
@@ -16,7 +16,7 @@ License: BSD3
     documentation and/or other materials provided with the distribution.
  3. The name of the author may not be used to endorse or promote products
     derived from this software without specific prior written permission.
- 
+ .
  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -28,8 +28,24 @@ License: BSD3
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+
 Files: debian/*
-Copyright: (C) 2010 Sylvain Le Gall <gildor at debian.org>
+Copyright: 2010 Sylvain Le Gall <gildor at debian.org>
+           2013 Hendrik Tews <hendrik at askra.de>
 License: GPL-3+
-
- See '/usr/share/common-licenses/GPL-3' for the full text.
+ 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/libbiniou-ocaml-dev.docs b/debian/libbiniou-ocaml-dev.docs
index 0b07615..eedd89b 100644
--- a/debian/libbiniou-ocaml-dev.docs
+++ b/debian/libbiniou-ocaml-dev.docs
@@ -1 +1 @@
-doc 
+api
diff --git a/debian/libbiniou-ocaml-dev.install.in b/debian/libbiniou-ocaml-dev.install.in
index 8ba5da8..da0de23 100644
--- a/debian/libbiniou-ocaml-dev.install.in
+++ b/debian/libbiniou-ocaml-dev.install.in
@@ -1,6 +1,6 @@
 @OCamlStdlibDir@/biniou/*.cmo
 @OCamlStdlibDir@/biniou/*.cmi
- at OCamlStdlibDir@/biniou/*.mli
+ at OCamlStdlibDir@/biniou/*.ml*
 OPT: @OCamlStdlibDir@/biniou/*.o
 OPT: @OCamlStdlibDir@/biniou/*.cmxa
 OPT: @OCamlStdlibDir@/biniou/*.a
diff --git a/debian/libbiniou-ocaml-dev.ocamldoc b/debian/libbiniou-ocaml-dev.ocamldoc
index 40038c8..5143b80 100644
--- a/debian/libbiniou-ocaml-dev.ocamldoc
+++ b/debian/libbiniou-ocaml-dev.ocamldoc
@@ -1,2 +1 @@
--d doc
---doc-base-generate
+-d api/html --doc-base-generate
diff --git a/debian/patches/byte-code-compilation.patch b/debian/patches/byte-code-compilation.patch
new file mode 100644
index 0000000..1e5af35
--- /dev/null
+++ b/debian/patches/byte-code-compilation.patch
@@ -0,0 +1,35 @@
+Description: byte compilation rules for executables
+Author: Hendrik Tews <hendrik at askra.de>
+--- a/Makefile
++++ b/Makefile
+@@ -56,11 +56,21 @@
+ 		-package $(PACKS) -linkpkg \
+ 		biniou.cmxa bdump.ml
+ 
++bdump.byte: $(SOURCES) bdump.ml
++	ocamlfind ocamlc -o bdump $(FLAGS) \
++		-package $(PACKS) -linkpkg \
++		biniou.cma bdump.ml
++
+ test_biniou$(EXE): biniou.cmxa test_biniou.ml
+ 	ocamlfind ocamlopt -o test_biniou$(EXE) $(FLAGS) \
+ 		-package "$(PACKS) unix" -linkpkg \
+ 		biniou.cmxa test_biniou.ml
+ 
++test_biniou.byte: biniou.cma test_biniou.ml
++	ocamlfind ocamlc -o test_biniou $(FLAGS) \
++		-package "$(PACKS) unix" -linkpkg \
++		biniou.cma test_biniou.ml
++
+ doc: doc/index.html
+ doc/index.html: $(MLI)
+ 	mkdir -p doc
+@@ -71,7 +81,7 @@
+ 	test ! -f bdump.exe || cp bdump.exe $(BINDIR)/
+ 	ocamlfind install biniou META \
+           $$(ls $(MLI) $(CMI) $(CMO) $(CMX) $(O) \
+-             biniou.cma biniou.cmxa biniou.a)
++             biniou.cma biniou.cmxa biniou.a bi_dump.ml)
+ 
+ uninstall:
+ 	test ! -f $(BINDIR)/bdump || rm $(BINDIR)/bdump
diff --git a/debian/patches/debian-changes-0.9.1-1 b/debian/patches/debian-changes-0.9.1-1
deleted file mode 100644
index 7883326..0000000
--- a/debian/patches/debian-changes-0.9.1-1
+++ /dev/null
@@ -1,39 +0,0 @@
-Description: Upstream changes introduced in version 0.9.1-1
- This patch has been created by dpkg-source during the package build.
- Here's the last changelog entry, hopefully it gives details on why
- those changes were made:
- .
- biniou (0.9.1-1) unstable; urgency=low
- .
-   * Initial release. (Closes: #605672)
- .
- The person named in the Author field signed this changelog entry.
-Author: Sylvain Le Gall <gildor at debian.org>
-Bug-Debian: http://bugs.debian.org/605672
-
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: http://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
-
---- biniou-0.9.1.orig/Makefile
-+++ biniou-0.9.1/Makefile
-@@ -45,6 +45,10 @@ bdump: $(SOURCES) bdump.ml
- 	ocamlfind ocamlopt -o bdump -package $(PACKS) -linkpkg \
- 		biniou.cmxa bdump.ml
- 
-+bdump.byte: $(SOURCES) bdump.ml
-+	ocamlfind ocamlc -o bdump -package $(PACKS) -linkpkg \
-+		biniou.cma bdump.ml
-+
- test_biniou: $(SOURCES) test_biniou.ml
- 	ocamlfind ocamlopt -o test_biniou -package "$(PACKS) unix" -linkpkg \
- 		biniou.cmxa test_biniou.ml
diff --git a/debian/patches/fix-bi-stream-32.patch b/debian/patches/fix-bi-stream-32.patch
new file mode 100644
index 0000000..c6f1b97
--- /dev/null
+++ b/debian/patches/fix-bi-stream-32.patch
@@ -0,0 +1,76 @@
+Description: fix bi_stream for 32 bit OCaml
+Author: Hendrik Tews <hendrik at askra.de>
+--- a/bi_stream.ml
++++ b/bi_stream.ml
+@@ -3,10 +3,10 @@
+ let error s = failwith s
+ 
+ let input_int64 ic =
+-  let n = ref 0 in
++  let n = ref Int64.zero in
+   for i = 1 to 8 do
+-    n := (!n lsl 8) lor (input_byte ic);
+-    if !n < 0 then
++    n := Int64.logor (Int64.shift_left !n 8) (Int64.of_int (input_byte ic));
++    if !n < 0L then
+       error "Corrupted stream: excessive chunk length"
+   done;
+   !n
+@@ -14,18 +14,20 @@
+ let output_int64 oc n =
+   let n = ref n in
+   for i = 1 to 8 do
+-    output_char oc (char_of_int (!n lsr 56));
+-    n := !n lsl 8
++    output_char oc
++      (char_of_int (Int64.to_int (Int64.shift_right_logical !n 56)));
++    n := Int64.shift_left !n 8
+   done
+ 
+ let rec read_chunk of_string ic =
+   match input_char ic with
+       '\001' ->
+         let len = input_int64 ic in
+-        if len > Sys.max_string_length then
++        if len > Int64.of_int Sys.max_string_length then
+           error
+             (sprintf
+-               "Corrupted stream: excessive chunk length (%i bytes)" len);
++               "Corrupted stream: excessive chunk length (%Li bytes)" len);
++	let len = Int64.to_int len in
+         let s = String.create len in
+         really_input ic s 0 len;
+         Some (of_string s)
+@@ -85,7 +87,7 @@
+     n := 0;
+     let s = to_string a in
+     output_char oc '\001';
+-    output_int64 oc (String.length s);
++    output_int64 oc (Int64.of_int (String.length s));
+     output_string oc s
+   in
+   Stream.iter (
+--- a/bi_stream.mli
++++ b/bi_stream.mli
+@@ -20,7 +20,11 @@
+ val read_stream : (string -> 'a array) -> in_channel -> 'a Stream.t
+   (** [read_stream of_string ic] creates an OCaml stream from
+       an input channel [ic]. The data come in chunks and each chunk
+-      is converted from a string to an array by calling [of_string]. *)
++      is converted from a string to an array by calling [of_string].
++
++      Raises [Failure] if the data in the channel is corrupted or if a
++      chunk is larger then [Sys.max_string_length].
++  *)
+ 
+ val write_stream :
+   ?chunk_len:int ->
+@@ -28,6 +32,8 @@
+   (** [write_stream to_string oc st] writes an OCaml stream to the
+       output channel [oc]. It creates chunks of [chunk_len],
+       except for the last chunk which is usually smaller.
++      [chunk_len] must be chosen such that the resulting strings are
++      smaller then [Sys.max_string_length].
+       @param chunk_len  has a default value of 1024.
+   *)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b8c1f9d..1ac5dd2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-debian-changes-0.9.1-1
+byte-code-compilation.patch
+fix-bi-stream-32.patch
diff --git a/debian/rules b/debian/rules
index 32402ad..02dd5aa 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+#export DH_OPTIONS=-v
 
 DESTDIR=$(CURDIR)/debian/tmp
 
@@ -14,7 +15,8 @@ OCAMLFIND_LDCONF=ignore
 export OCAMLFIND_LDCONF
 
 %:
-	dh --with ocaml $@
+	dh $@ --with ocaml
+
 
 .PHONY: override_dh_auto_build
 override_dh_auto_build:
@@ -25,19 +27,31 @@ else
 endif 
 	$(MAKE) doc
 
+
+.PHONY: override_dh_auto_test
+override_dh_auto_test:
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+	$(MAKE) test_biniou
+else
+	$(MAKE) test_biniou.byte
+endif 
+	./test_biniou
+
+
 .PHONY: override_dh_auto_install
 override_dh_auto_install:
 	mkdir -p '$(OCAMLFIND_DESTDIR)'
 	mkdir -p '$(DESTDIR)/usr/bin'
 	make install 'BINDIR=$(DESTDIR)/usr/bin'
 
+
 .PHONY: override_dh_install
 override_dh_install:
 	dh_install --fail-missing
 
-.PHONY: override_dh_auto_clean
-override_dh_auto_clean:
-	$(MAKE) clean
 
-debian/bdump.1: debian/bdump.mkd
-	pandoc -s -w man $^ -o $@
+.PHONY: override_dh_installdocs
+override_dh_installdocs:
+	mkdir api
+	mv doc api/html
+	dh_installdocs

-- 
biniou packaging



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