From e4c179b914905d8144bfb75487d2d0cd43207bb4 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Fri, 24 Dec 2021 10:18:47 +0100 Subject: [PATCH] Initial packaging --- debian/changelog | 5 + debian/control | 196 ++++++++++++++++++ debian/copyright | 44 ++++ debian/gbp.conf | 2 + debian/libcohttp-lwt-jsoo-ocaml-dev.docs | 1 + .../libcohttp-lwt-jsoo-ocaml-dev.install.in | 8 + debian/libcohttp-lwt-jsoo-ocaml.install.in | 3 + debian/libcohttp-lwt-ocaml-dev.docs | 1 + debian/libcohttp-lwt-ocaml-dev.install.in | 8 + debian/libcohttp-lwt-ocaml.install.in | 3 + debian/libcohttp-lwt-unix-ocaml-dev.docs | 1 + .../libcohttp-lwt-unix-ocaml-dev.install.in | 9 + debian/libcohttp-lwt-unix-ocaml.install.in | 3 + debian/libcohttp-ocaml-dev.docs | 1 + debian/libcohttp-ocaml-dev.install.in | 8 + debian/libcohttp-ocaml.install.in | 3 + debian/rules | 39 ++++ debian/source/format | 1 + debian/watch | 2 + 19 files changed, 338 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/libcohttp-lwt-jsoo-ocaml-dev.docs create mode 100644 debian/libcohttp-lwt-jsoo-ocaml-dev.install.in create mode 100644 debian/libcohttp-lwt-jsoo-ocaml.install.in create mode 100644 debian/libcohttp-lwt-ocaml-dev.docs create mode 100644 debian/libcohttp-lwt-ocaml-dev.install.in create mode 100644 debian/libcohttp-lwt-ocaml.install.in create mode 100644 debian/libcohttp-lwt-unix-ocaml-dev.docs create mode 100644 debian/libcohttp-lwt-unix-ocaml-dev.install.in create mode 100644 debian/libcohttp-lwt-unix-ocaml.install.in create mode 100644 debian/libcohttp-ocaml-dev.docs create mode 100644 debian/libcohttp-ocaml-dev.install.in create mode 100644 debian/libcohttp-ocaml.install.in create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..08f1b3a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ocaml-cohttp (4.0.0-1) UNRELEASED; urgency=medium + + * Initial release (Closes: #1002566) + + -- Stéphane Glondu Fri, 24 Dec 2021 09:46:16 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..93a9b30 --- /dev/null +++ b/debian/control @@ -0,0 +1,196 @@ +Source: ocaml-cohttp +Section: ocaml +Priority: optional +Maintainer: Debian OCaml Maintainers +Uploaders: + Stéphane Glondu +Build-Depends: + debhelper-compat (= 13), + ocaml-nox, + ocaml-dune, + libre-ocaml-dev, + liburi-ocaml-dev, + libsexplib0-ocaml-dev, + libppx-sexp-conv-ocaml-dev, + libstringext-ocaml-dev, + libbase64-ocaml-dev, + libfmt-ocaml-dev, + libjsonm-ocaml-dev, + libalcotest-ocaml-dev, + liblogs-ocaml-dev, + libconduit-lwt-ocaml-dev, + libmagic-mime-ocaml-dev, + libounit-ocaml-dev, + netbase, + dh-ocaml +Standards-Version: 4.6.0 +Rules-Requires-Root: no +Homepage: https://github.com/mirage/ocaml-cohttp +Vcs-Git: https://salsa.debian.org/ocaml-team/ocaml-cohttp.git +Vcs-Browser: https://salsa.debian.org/ocaml-team/ocaml-cohttp + +Package: libcohttp-ocaml-dev +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Recommends: ocaml-findlib +Description: OCaml library for HTTP clients and servers (dev) + Cohttp is an OCaml library for creating HTTP daemons. It has a + portable HTTP parser, and implementations using various asynchronous + programming libraries. + . + It has concrete implementations for many targets, including lwt, + lwt-unix, lwt-jsoo. + . + You can implement other targets using the parser very easily. Look at + the IO signature in lib/s.mli and implement that in the desired + backend. + . + You can activate some runtime debugging by setting COHTTP_DEBUG to + any value, and all requests and responses will be written to + stderr. Further debugging of the connection layer can be obtained by + setting CONDUIT_DEBUG to any value. + . + This package contains development files. + +Package: libcohttp-ocaml +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Suggests: ocaml-findlib +Description: OCaml library for HTTP clients and servers (runtime) + Cohttp is an OCaml library for creating HTTP daemons. It has a + portable HTTP parser, and implementations using various asynchronous + programming libraries. + . + It has concrete implementations for many targets, including lwt, + lwt-unix, lwt-jsoo. + . + You can implement other targets using the parser very easily. Look at + the IO signature in lib/s.mli and implement that in the desired + backend. + . + You can activate some runtime debugging by setting COHTTP_DEBUG to + any value, and all requests and responses will be written to + stderr. Further debugging of the connection layer can be obtained by + setting CONDUIT_DEBUG to any value. + . + This package contains the shared runtime libraries. + +Package: libcohttp-lwt-ocaml-dev +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Recommends: ocaml-findlib +Description: CoHTTP implementation using the Lwt concurrency library (dev) + This is a portable implementation of CoHTTP that uses the Lwt + concurrency library to multiplex IO. It implements as much of the + logic in an OS-independent way as possible, so that more specialised + modules can be tailored for different targets. For example, you can + install cohttp-lwt-unix or cohttp-lwt-jsoo for a Unix or JavaScript + backend, or cohttp-mirage for the MirageOS unikernel version of the + library. All of these implementations share the same IO logic from + this module. + . + This package contains development files. + +Package: libcohttp-lwt-ocaml +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Suggests: ocaml-findlib +Description: CoHTTP implementation using the Lwt concurrency library (runtime) + This is a portable implementation of CoHTTP that uses the Lwt + concurrency library to multiplex IO. It implements as much of the + logic in an OS-independent way as possible, so that more specialised + modules can be tailored for different targets. For example, you can + install cohttp-lwt-unix or cohttp-lwt-jsoo for a Unix or JavaScript + backend, or cohttp-mirage for the MirageOS unikernel version of the + library. All of these implementations share the same IO logic from + this module. + . + This package contains the shared runtime libraries. + +Package: libcohttp-lwt-unix-ocaml-dev +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Recommends: ocaml-findlib +Description: CoHTTP implementation for Unix and Windows using Lwt (dev) + An implementation of an HTTP client and server using the Lwt + concurrency library. See the Cohttp_lwt_unix module for information + on how to use this. The package also installs cohttp-curl-lwt and a + cohttp-server-lwt binaries for quick uses of a HTTP(S) client and + server respectively. + . + Although the name implies that this only works under Unix, it should + also be fine under Windows too. + . + This package contains development files. + +Package: libcohttp-lwt-unix-ocaml +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Suggests: ocaml-findlib +Description: CoHTTP implementation for Unix and Windows using Lwt (runtime) + An implementation of an HTTP client and server using the Lwt + concurrency library. See the Cohttp_lwt_unix module for information + on how to use this. The package also installs cohttp-curl-lwt and a + cohttp-server-lwt binaries for quick uses of a HTTP(S) client and + server respectively. + . + Although the name implies that this only works under Unix, it should + also be fine under Windows too. + . + This package contains the shared runtime libraries. + +Package: libcohttp-lwt-jsoo-ocaml-dev +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Recommends: ocaml-findlib +Description: CoHTTP implementation for the Js_of_ocaml JavaScript compiler (dev) + An implementation of an HTTP client for JavaScript, but using the + CoHTTP types. This lets you build HTTP clients that can compile + natively (using one of the other Cohttp backends such as + cohttp-lwt-unix) and also to native JavaScript via js_of_ocaml. + . + This package contains development files. + +Package: libcohttp-lwt-jsoo-ocaml +Architecture: any +Depends: + ${shlibs:Depends}, + ${ocaml:Depends}, + ${misc:Depends} +Provides: ${ocaml:Provides} +Suggests: ocaml-findlib +Description: CoHTTP implementation for the Js_of_ocaml JavaScript compiler (runtime) + An implementation of an HTTP client for JavaScript, but using the + CoHTTP types. This lets you build HTTP clients that can compile + natively (using one of the other Cohttp backends such as + cohttp-lwt-unix) and also to native JavaScript via js_of_ocaml. + . + This package contains the shared runtime libraries. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..f1fb43a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,44 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: 2009-2018, Anil Madhavapeddy, David Sheets, Andy Ray, Romain Calascibetta, Thomas Gazagnaire, Rudi Grinberg, Mika Illouz, Martin Jambon, Trevor Smith +License: ISC + +Files: cohttp/scripts/codes/* +Copyright: 2012-2013, Samuel Ryan (citricsquid) +License: MIT + +Files: debian/* +Copyright: 2021, Stéphane Glondu +License: ISC + +License: ISC + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..cec628c --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar = True diff --git a/debian/libcohttp-lwt-jsoo-ocaml-dev.docs b/debian/libcohttp-lwt-jsoo-ocaml-dev.docs new file mode 100644 index 0000000..badc21d --- /dev/null +++ b/debian/libcohttp-lwt-jsoo-ocaml-dev.docs @@ -0,0 +1 @@ +usr/doc/cohttp-lwt-jsoo/* diff --git a/debian/libcohttp-lwt-jsoo-ocaml-dev.install.in b/debian/libcohttp-lwt-jsoo-ocaml-dev.install.in new file mode 100644 index 0000000..e77686d --- /dev/null +++ b/debian/libcohttp-lwt-jsoo-ocaml-dev.install.in @@ -0,0 +1,8 @@ +@OCamlStdlibDir@/cohttp-lwt-jsoo/*opam* +@OCamlStdlibDir@/cohttp-lwt-jsoo/*dune* +@OCamlStdlibDir@/cohttp-lwt-jsoo/*.cmt* +@OCamlStdlibDir@/cohttp-lwt-jsoo/*.cmi +@OCamlStdlibDir@/cohttp-lwt-jsoo/*.ml* +OPT: @OCamlStdlibDir@/cohttp-lwt-jsoo/*.a +OPT: @OCamlStdlibDir@/cohttp-lwt-jsoo/*.cmxa +OPT: @OCamlStdlibDir@/cohttp-lwt-jsoo/*.cmx diff --git a/debian/libcohttp-lwt-jsoo-ocaml.install.in b/debian/libcohttp-lwt-jsoo-ocaml.install.in new file mode 100644 index 0000000..707b04a --- /dev/null +++ b/debian/libcohttp-lwt-jsoo-ocaml.install.in @@ -0,0 +1,3 @@ +@OCamlStdlibDir@/cohttp-lwt-jsoo/META +@OCamlStdlibDir@/cohttp-lwt-jsoo/*.cma +DYN: @OCamlStdlibDir@/cohttp-lwt-jsoo/*.cmxs diff --git a/debian/libcohttp-lwt-ocaml-dev.docs b/debian/libcohttp-lwt-ocaml-dev.docs new file mode 100644 index 0000000..4ab01cd --- /dev/null +++ b/debian/libcohttp-lwt-ocaml-dev.docs @@ -0,0 +1 @@ +usr/doc/cohttp-lwt/* diff --git a/debian/libcohttp-lwt-ocaml-dev.install.in b/debian/libcohttp-lwt-ocaml-dev.install.in new file mode 100644 index 0000000..0508b41 --- /dev/null +++ b/debian/libcohttp-lwt-ocaml-dev.install.in @@ -0,0 +1,8 @@ +@OCamlStdlibDir@/cohttp-lwt/*opam* +@OCamlStdlibDir@/cohttp-lwt/*dune* +@OCamlStdlibDir@/cohttp-lwt/*.cmt* +@OCamlStdlibDir@/cohttp-lwt/*.cmi +@OCamlStdlibDir@/cohttp-lwt/*.ml* +OPT: @OCamlStdlibDir@/cohttp-lwt/*.a +OPT: @OCamlStdlibDir@/cohttp-lwt/*.cmxa +OPT: @OCamlStdlibDir@/cohttp-lwt/*.cmx diff --git a/debian/libcohttp-lwt-ocaml.install.in b/debian/libcohttp-lwt-ocaml.install.in new file mode 100644 index 0000000..087c462 --- /dev/null +++ b/debian/libcohttp-lwt-ocaml.install.in @@ -0,0 +1,3 @@ +@OCamlStdlibDir@/cohttp-lwt/META +@OCamlStdlibDir@/cohttp-lwt/*.cma +DYN: @OCamlStdlibDir@/cohttp-lwt/*.cmxs diff --git a/debian/libcohttp-lwt-unix-ocaml-dev.docs b/debian/libcohttp-lwt-unix-ocaml-dev.docs new file mode 100644 index 0000000..562ddbd --- /dev/null +++ b/debian/libcohttp-lwt-unix-ocaml-dev.docs @@ -0,0 +1 @@ +usr/doc/cohttp-lwt-unix/* diff --git a/debian/libcohttp-lwt-unix-ocaml-dev.install.in b/debian/libcohttp-lwt-unix-ocaml-dev.install.in new file mode 100644 index 0000000..bce1b3a --- /dev/null +++ b/debian/libcohttp-lwt-unix-ocaml-dev.install.in @@ -0,0 +1,9 @@ +@OCamlStdlibDir@/cohttp-lwt-unix/*opam* +@OCamlStdlibDir@/cohttp-lwt-unix/*dune* +@OCamlStdlibDir@/cohttp-lwt-unix/*.cmt* +@OCamlStdlibDir@/cohttp-lwt-unix/*.cmi +@OCamlStdlibDir@/cohttp-lwt-unix/*.ml* +OPT: @OCamlStdlibDir@/cohttp-lwt-unix/*.a +OPT: @OCamlStdlibDir@/cohttp-lwt-unix/*.cmxa +OPT: @OCamlStdlibDir@/cohttp-lwt-unix/*.cmx +usr/bin/*lwt diff --git a/debian/libcohttp-lwt-unix-ocaml.install.in b/debian/libcohttp-lwt-unix-ocaml.install.in new file mode 100644 index 0000000..31dc600 --- /dev/null +++ b/debian/libcohttp-lwt-unix-ocaml.install.in @@ -0,0 +1,3 @@ +@OCamlStdlibDir@/cohttp-lwt-unix/META +@OCamlStdlibDir@/cohttp-lwt-unix/*.cma +DYN: @OCamlStdlibDir@/cohttp-lwt-unix/*.cmxs diff --git a/debian/libcohttp-ocaml-dev.docs b/debian/libcohttp-ocaml-dev.docs new file mode 100644 index 0000000..6a65cf3 --- /dev/null +++ b/debian/libcohttp-ocaml-dev.docs @@ -0,0 +1 @@ +usr/doc/cohttp/* diff --git a/debian/libcohttp-ocaml-dev.install.in b/debian/libcohttp-ocaml-dev.install.in new file mode 100644 index 0000000..93881cc --- /dev/null +++ b/debian/libcohttp-ocaml-dev.install.in @@ -0,0 +1,8 @@ +@OCamlStdlibDir@/cohttp/*opam* +@OCamlStdlibDir@/cohttp/*dune* +@OCamlStdlibDir@/cohttp/*.cmt* +@OCamlStdlibDir@/cohttp/*.cmi +@OCamlStdlibDir@/cohttp/*.ml* +OPT: @OCamlStdlibDir@/cohttp/*.a +OPT: @OCamlStdlibDir@/cohttp/*.cmxa +OPT: @OCamlStdlibDir@/cohttp/*.cmx diff --git a/debian/libcohttp-ocaml.install.in b/debian/libcohttp-ocaml.install.in new file mode 100644 index 0000000..36562c5 --- /dev/null +++ b/debian/libcohttp-ocaml.install.in @@ -0,0 +1,3 @@ +@OCamlStdlibDir@/cohttp/META +@OCamlStdlibDir@/cohttp/*.cma +DYN: @OCamlStdlibDir@/cohttp/*.cmxs diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3bb7c55 --- /dev/null +++ b/debian/rules @@ -0,0 +1,39 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +DESTDIR=$(CURDIR)/debian/tmp + +include /usr/share/ocaml/ocamlvars.mk + +DUNE_BUILD := OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune build -p +DUNE_INSTALL := dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) +DUNE_RUNTEST := OCAMLPATH=$(CURDIR)/_tmp$(OCAML_STDLIB_DIR) dune runtest -p + +%: + dh $@ --with ocaml + +override_dh_auto_clean: + dune clean + rm -rf _tmp + +override_dh_auto_build: + rm -rf _tmp + $(DUNE_BUILD) cohttp + $(DUNE_INSTALL) cohttp + $(DUNE_BUILD) cohttp-lwt + $(DUNE_INSTALL) cohttp-lwt + $(DUNE_BUILD) cohttp-lwt-unix + $(DUNE_INSTALL) cohttp-lwt-unix + $(DUNE_BUILD) cohttp-lwt-jsoo + $(DUNE_INSTALL) cohttp-lwt-jsoo + +override_dh_auto_test: + $(DUNE_RUNTEST) cohttp + $(DUNE_RUNTEST) cohttp-lwt + $(DUNE_RUNTEST) cohttp-lwt-unix + $(DUNE_RUNTEST) cohttp-lwt-jsoo + +override_dh_auto_install: + rm -rf debian/tmp + cp -a $(CURDIR)/_tmp debian/tmp + rm -rf debian/tmp/usr/doc/*/LICENSE* diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..92330da --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=4 +https://github.com/mirage/ocaml-cohttp/releases .*-v?([\d\.]+)\.tbz -- 2.39.5