From ae2301c8b26620afe79ece3420707eb0c66e48cd Mon Sep 17 00:00:00 2001 From: Antoine Pouille Date: Mon, 18 Mar 2024 16:44:12 +0100 Subject: [PATCH] Move opam packages definition in dune-project --- dune-project | 83 ++++++++++++++++++++++++++++++++++++ kappa-agents.opam | 57 ++++++++++++++++++------- kappa-binaries.opam | 59 ++++++++++++++++--------- kappa-binaries.opam.template | 1 + kappa-library.opam | 53 +++++++++++++++++------ kappa-server.opam | 57 ++++++++++++++++++------- 6 files changed, 245 insertions(+), 65 deletions(-) create mode 100644 kappa-binaries.opam.template diff --git a/dune-project b/dune-project index c994249ac2..2342bd8ee6 100644 --- a/dune-project +++ b/dune-project @@ -1 +1,84 @@ (lang dune 2.9) +(generate_opam_files) + +(name kappa-tool-suite) +(version 4.1~dev) ; could be removed and generated at release time instead using dune-release +(source (github Kappa-Dev/KappaTools)) ; no need to specifybug-reports and dev-repo +(license LGPL-3.0-only) +(authors + "Jean Krivine" "Jérôme Feret" "Pierre Boutillier" + "Ioana Cristescu" "Mutaamba Maasha" "Lý Kim Quyên" "Antoine Pouille") +(maintainers "Antoine Pouille " + "Pierre Boutillier ") +(homepage https://kappalanguage.org/) +(documentation https://kappalanguage.org/sites/kappalanguage.org/files/inline-files/Kappa_Manual.pdf) + +(package + (name kappa-library) + (synopsis "Public internals of the Kappa tool suite") + (depends + (ocaml ( >= 4.05.0 )) + num + re + (yojson ( >= 2.0 )) + (lwt ( >= 4.2.0 )) + stdlib-shims + fmt + logs + result + ) + ; no need to declare dependancies in `dune` files: generated automatically +) + +(package + (name kappa-binaries) + (synopsis "Command line interfaces of the Kappa tool suite") + (depends + (ocaml ( >= 4.04.0 )) + num + re + (yojson ( >= 1.6.0 )) + (lwt ( >= 4.2.0 )) + fmt + logs + kappa-library + ) + (depopts + labltk) +) + +(package + (name kappa-agents) + (synopsis "Backends for an interactive use of the Kappa tool suite") + (depends + (ocaml ( >= 4.05.0 )) + num + re + (yojson ( >= 1.6.0 )) + (lwt ( >= 4.2.0 )) + fmt + logs + kappa-library + atdgen-runtime + (atdgen (= build)) + ) +) + +(package + (name kappa-server) + (synopsis "HTTP server to query the Kappa tool suite") + (depends + (ocaml ( >= 4.05.0 )) + num + re + (yojson ( >= 1.6.0 )) + (lwt ( >= 4.2.0 )) + fmt + logs + kappa-binaries + kappa-agents + cohttp-lwt-unix + atdgen-runtime + (atdgen (= build)) + ) +) diff --git a/kappa-agents.opam b/kappa-agents.opam index 10d5ec5b60..b74356f865 100644 --- a/kappa-agents.opam +++ b/kappa-agents.opam @@ -1,28 +1,53 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" -synopsis: "Backends for an interactive use of the Kappa tool suite" version: "4.1~dev" -maintainer: "Pierre Boutillier " +synopsis: "Backends for an interactive use of the Kappa tool suite" +maintainer: [ + "Antoine Pouille " + "Pierre Boutillier " +] authors: [ - "Jean Krivine" "Jérôme Feret" "Pierre Boutillier" - "Ioana Cristescu" "Mutaamba Maasha" "Lý Kim Quyên" + "Jean Krivine" + "Jérôme Feret" + "Pierre Boutillier" + "Ioana Cristescu" + "Mutaamba Maasha" + "Lý Kim Quyên" + "Antoine Pouille" ] -license: "LGPL-3.0" +license: "LGPL-3.0-only" homepage: "https://kappalanguage.org/" -bug-reports: "https://github.com/Kappa-Dev/KaSim/issues" -dev-repo: "git+https://github.com/Kappa-Dev/KaSim.git" - -depends : [ - "ocaml" { >= "4.05.0" } +doc: + "https://kappalanguage.org/sites/kappalanguage.org/files/inline-files/Kappa_Manual.pdf" +bug-reports: "https://github.com/Kappa-Dev/KappaTools/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.05.0"} "num" "re" - "dune" - "yojson" { >= "1.6.0" } - "lwt" { >= "4.2.0" } + "yojson" {>= "1.6.0"} + "lwt" {>= "4.2.0"} "fmt" "logs" "kappa-library" "atdgen-runtime" - "atdgen" {build} + "atdgen" {= "build"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] ] - -build: ["dune" "build" "-p" name "-j" jobs] +dev-repo: "git+https://github.com/Kappa-Dev/KappaTools.git" diff --git a/kappa-binaries.opam b/kappa-binaries.opam index 6babafb75e..eadd1b190b 100644 --- a/kappa-binaries.opam +++ b/kappa-binaries.opam @@ -1,32 +1,53 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" -synopsis: "Command line interfaces of the Kappa tool suite" version: "4.1~dev" -maintainer: "Pierre Boutillier " +synopsis: "Command line interfaces of the Kappa tool suite" +maintainer: [ + "Antoine Pouille " + "Pierre Boutillier " +] authors: [ - "Jean Krivine" "Jérôme Feret" "Pierre Boutillier" - "Ioana Cristescu" "Mutaamba Maasha" "Lý Kim Quyên" + "Jean Krivine" + "Jérôme Feret" + "Pierre Boutillier" + "Ioana Cristescu" + "Mutaamba Maasha" + "Lý Kim Quyên" + "Antoine Pouille" ] -license: "LGPL-3.0" +license: "LGPL-3.0-only" homepage: "https://kappalanguage.org/" -bug-reports: "https://github.com/Kappa-Dev/KaSim/issues" -dev-repo: "git+https://github.com/Kappa-Dev/KaSim.git" - -depends : [ - "ocaml" { >= "4.04.0" } +doc: + "https://kappalanguage.org/sites/kappalanguage.org/files/inline-files/Kappa_Manual.pdf" +bug-reports: "https://github.com/Kappa-Dev/KappaTools/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.04.0"} "num" "re" - "dune" - "yojson" { >= "1.6.0" } - "lwt" { >= "4.2.0" } + "yojson" {>= "1.6.0"} + "lwt" {>= "4.2.0"} "fmt" "logs" "kappa-library" + "odoc" {with-doc} ] - -depopts: [ - "labltk" +depopts: ["labltk"] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] ] - -build: ["dune" "build" "-p" name "-j" jobs] - +dev-repo: "git+https://github.com/Kappa-Dev/KappaTools.git" run-test: [ make "check" ] diff --git a/kappa-binaries.opam.template b/kappa-binaries.opam.template new file mode 100644 index 0000000000..fbbea28fb2 --- /dev/null +++ b/kappa-binaries.opam.template @@ -0,0 +1 @@ +run-test: [ make "check" ] diff --git a/kappa-library.opam b/kappa-library.opam index 63ca81a0ff..8455d819af 100644 --- a/kappa-library.opam +++ b/kappa-library.opam @@ -1,27 +1,52 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" version: "4.1~dev" synopsis: "Public internals of the Kappa tool suite" -maintainer: "Pierre Boutillier " +maintainer: [ + "Antoine Pouille " + "Pierre Boutillier " +] authors: [ - "Jean Krivine" "Jérôme Feret" "Pierre Boutillier" - "Ioana Cristescu" "Mutaamba Maasha" "Lý Kim Quyên" + "Jean Krivine" + "Jérôme Feret" + "Pierre Boutillier" + "Ioana Cristescu" + "Mutaamba Maasha" + "Lý Kim Quyên" + "Antoine Pouille" ] -license: "LGPL-3.0" +license: "LGPL-3.0-only" homepage: "https://kappalanguage.org/" -bug-reports: "https://github.com/Kappa-Dev/KaSim/issues" -dev-repo: "git+https://github.com/Kappa-Dev/KaSim.git" - -depends : [ - "ocaml" { >= "4.05.0" } +doc: + "https://kappalanguage.org/sites/kappalanguage.org/files/inline-files/Kappa_Manual.pdf" +bug-reports: "https://github.com/Kappa-Dev/KappaTools/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.05.0"} "num" "re" - "dune" - "yojson" { >= "2.0" } - "lwt" { >= "4.2.0" } + "yojson" {>= "2.0"} + "lwt" {>= "4.2.0"} "stdlib-shims" "fmt" "logs" "result" + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] ] - -build: ["dune" "build" "-p" name "-j" jobs] +dev-repo: "git+https://github.com/Kappa-Dev/KappaTools.git" diff --git a/kappa-server.opam b/kappa-server.opam index 62ba5063a8..6d76dada8b 100644 --- a/kappa-server.opam +++ b/kappa-server.opam @@ -1,30 +1,55 @@ +# This file is generated by dune, edit dune-project instead opam-version: "2.0" -synopsis:"HTTP server to query the Kappa tool suite" version: "4.1~dev" -maintainer: "Pierre Boutillier " +synopsis: "HTTP server to query the Kappa tool suite" +maintainer: [ + "Antoine Pouille " + "Pierre Boutillier " +] authors: [ - "Jean Krivine" "Jérôme Feret" "Pierre Boutillier" - "Ioana Cristescu" "Mutaamba Maasha" "Lý Kim Quyên" + "Jean Krivine" + "Jérôme Feret" + "Pierre Boutillier" + "Ioana Cristescu" + "Mutaamba Maasha" + "Lý Kim Quyên" + "Antoine Pouille" ] -license: "LGPL-3.0" +license: "LGPL-3.0-only" homepage: "https://kappalanguage.org/" -bug-reports: "https://github.com/Kappa-Dev/KaSim/issues" -dev-repo: "git+https://github.com/Kappa-Dev/KaSim.git" - -depends : [ - "ocaml" { >= "4.05.0" } +doc: + "https://kappalanguage.org/sites/kappalanguage.org/files/inline-files/Kappa_Manual.pdf" +bug-reports: "https://github.com/Kappa-Dev/KappaTools/issues" +depends: [ + "dune" {>= "2.9"} + "ocaml" {>= "4.05.0"} "num" "re" - "dune" - "yojson" { >= "1.6.0" } - "lwt" { >= "4.2.0" } + "yojson" {>= "1.6.0"} + "lwt" {>= "4.2.0"} "fmt" "logs" "kappa-binaries" "kappa-agents" "cohttp-lwt-unix" "atdgen-runtime" - "atdgen" {build} + "atdgen" {= "build"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] ] - -build: ["dune" "build" "-p" name "-j" jobs] +dev-repo: "git+https://github.com/Kappa-Dev/KappaTools.git"