From 55f8b90492f6d27106469bbd87ba40aa86c48dec Mon Sep 17 00:00:00 2001
From: Michele Alberti <michele.alberti@cea.fr>
Date: Wed, 22 Jun 2022 17:27:58 +0200
Subject: [PATCH] [opam] Add/update metada for opam package.

---
 caisar.opam   | 15 +++++++++--
 dune-project  | 75 ++++++++++++++++++++++++++++++---------------------
 lib/nnet/dune |  9 ++++---
 lib/onnx/dune | 14 +++++-----
 lib/ovo/dune  |  9 ++++---
 nnet.opam     | 10 +++++++
 onnx.opam     | 10 +++++++
 ovo.opam      | 12 ++++++++-
 src/main.ml   |  2 +-
 tests/help.t  |  2 +-
 10 files changed, 106 insertions(+), 52 deletions(-)

diff --git a/caisar.opam b/caisar.opam
index 8cc6922d..9d0db220 100644
--- a/caisar.opam
+++ b/caisar.opam
@@ -2,7 +2,15 @@
 opam-version: "2.0"
 version: "0.1"
 synopsis:
-  "Platform for characterizing the safety and robustness of artificial intelligence based software."
+  "Platform for characterizing the safety and robustness of artificial intelligence based software"
+maintainer: [
+  "LAISER team, Software Safety and Security Laboratory, CEA-List"
+]
+authors: ["LAISER team, Software Safety and Security Laboratory, CEA-List"]
+license: "LGPL-2.1-only"
+homepage: "https://git.frama-c.com/pub/caisar"
+doc: "https://git.frama-c.com/pub/caisar"
+bug-reports: "https://git.frama-c.com/pub/caisar/issues"
 depends: [
   "ocaml" {>= "4.13.0"}
   "dune-site" {= "2.9.0"}
@@ -23,7 +31,9 @@ depends: [
   "csv" {>= "2.4"}
   "why3" {= "1.4.0"}
   "re"
-  "onnx"
+  "nnet" {= version}
+  "ovo" {= version}
+  "onnx" {= version}
   "odoc" {with-doc}
 ]
 build: [
@@ -42,6 +52,7 @@ build: [
   ]
   ["dune" "install" "-p" name "--create-install-files" name]
 ]
+dev-repo: "git+https://git.frama-c.com/pub/caisar.git"
 pin-depends: [
   [ "why3.1.4.0" "git+https://gitlab.inria.fr/why3/why3.git#047c34a8" ]
 ]
diff --git a/dune-project b/dune-project
index c1bf8203..399bc794 100644
--- a/dune-project
+++ b/dune-project
@@ -9,36 +9,13 @@
 
 (generate_opam_files true)
 
-(package
-  (name caisar)
-  (synopsis "Platform for characterizing the safety and robustness of artificial intelligence based software.")
-  (depends
-   (ocaml (>= 4.13.0))
-   (dune-site (= 2.9.0))
-   (piqi (>= 0.7.6))
-   (piqilib (>= 0.6.14))
-   (zarith (>= 1.7))
-   (ocplib-endian (>= 1.0))
-   (dune (>= 2.9.3))
-   (base (>= v0.14.0))
-   (stdio (>= v0.14.0))
-   (cmdliner (= 1.0.4))
-   (fmt (>= 0.8.9))
-   (logs (>= 0.7.0))
-   (ppx_deriving (>= 5.1))
-   (yojson (>= 1.7.0))
-   (menhirLib (>= 20210310))
-   (ppx_deriving_yojson (>= 3.6.1))
-   (csv (>= 2.4))
-   (why3 (= 1.4.0))
-   re
-   onnx
-  )
-  (sites
-   (share stdlib)
-   (share config)
-  )
-)
+(license LGPL-2.1-only)
+(authors "LAISER team, Software Safety and Security Laboratory, CEA-List")
+(maintainers "LAISER team, Software Safety and Security Laboratory, CEA-List")
+(source (uri "git+https://git.frama-c.com/pub/caisar.git"))
+(bug_reports https://git.frama-c.com/pub/caisar/issues)
+(homepage https://git.frama-c.com/pub/caisar)
+(documentation https://git.frama-c.com/pub/caisar)
 
 (package
   (name nnet)
@@ -47,6 +24,7 @@
    (ocaml (>= 4.13))
    (dune (>= 2.9.3))
    (base (>= v0.14.0))
+   (csv (>= 2.4))
   )
 )
 
@@ -54,9 +32,10 @@
   (name ovo)
   (synopsis "OVO parser")
   (depends
-   (ocaml (>= 4.10))
+   (ocaml (>= 4.13))
    (dune (>= 2.9.1))
    (base (>= v0.14.0))
+   (csv (>= 2.4))
   )
 )
 
@@ -67,6 +46,40 @@
    (ocaml (>= 4.13))
    (dune (>= 2.9.3))
    (base (>= v0.14.0))
+   (stdio (>= v0.14.0))
    (ocaml-protoc-plugin (= 4.2.0))
   )
 )
+
+(package
+  (name caisar)
+  (synopsis "Platform for characterizing the safety and robustness of artificial intelligence based software")
+  (depends
+   (ocaml (>= 4.13.0))
+   (dune-site (= 2.9.0))
+   (piqi (>= 0.7.6))
+   (piqilib (>= 0.6.14))
+   (zarith (>= 1.7))
+   (ocplib-endian (>= 1.0))
+   (dune (>= 2.9.3))
+   (base (>= v0.14.0))
+   (stdio (>= v0.14.0))
+   (cmdliner (= 1.0.4))
+   (fmt (>= 0.8.9))
+   (logs (>= 0.7.0))
+   (ppx_deriving (>= 5.1))
+   (yojson (>= 1.7.0))
+   (menhirLib (>= 20210310))
+   (ppx_deriving_yojson (>= 3.6.1))
+   (csv (>= 2.4))
+   (why3 (= 1.4.0))
+   re
+   (nnet (= :version))
+   (ovo (= :version))
+   (onnx (= :version))
+  )
+  (sites
+   (share stdlib)
+   (share config)
+  )
+)
diff --git a/lib/nnet/dune b/lib/nnet/dune
index c6303823..06d73db5 100644
--- a/lib/nnet/dune
+++ b/lib/nnet/dune
@@ -1,5 +1,6 @@
 (library
- (name nnet)
- (public_name nnet)
- (libraries base csv)
- (synopsis "NNet parser"))
+  (name nnet)
+  (public_name nnet)
+  (libraries base csv)
+  (synopsis "NNet parser")
+)
diff --git a/lib/onnx/dune b/lib/onnx/dune
index c8fcadaa..ad21171b 100644
--- a/lib/onnx/dune
+++ b/lib/onnx/dune
@@ -2,13 +2,11 @@
   (name onnx)
   (public_name onnx)
   (libraries base stdio ocaml-protoc-plugin)
-  (synopsis "ONNX parser"))
+  (synopsis "ONNX parser")
+)
+
 (rule
+  (deps onnx_protoc.proto generate_onnx_interface.sh)
   (targets onnx_protoc.ml)
-  (action
-    (run ./generate_onnx_interface.sh)
-    )
-  (deps
-    onnx_protoc.proto
-    generate_onnx_interface.sh)
-  )
+  (action (run ./generate_onnx_interface.sh))
+)
diff --git a/lib/ovo/dune b/lib/ovo/dune
index d4f6f094..fb7f8f77 100644
--- a/lib/ovo/dune
+++ b/lib/ovo/dune
@@ -1,5 +1,6 @@
 (library
- (name ovo)
- (public_name ovo)
- (libraries base csv)
- (synopsis "OVO SVM format parser"))
+  (name ovo)
+  (public_name ovo)
+  (libraries base csv)
+  (synopsis "OVO parser")
+)
diff --git a/nnet.opam b/nnet.opam
index 52a1ad9f..74dd2183 100644
--- a/nnet.opam
+++ b/nnet.opam
@@ -2,10 +2,19 @@
 opam-version: "2.0"
 version: "0.1"
 synopsis: "NNet parser"
+maintainer: [
+  "LAISER team, Software Safety and Security Laboratory, CEA-List"
+]
+authors: ["LAISER team, Software Safety and Security Laboratory, CEA-List"]
+license: "LGPL-2.1-only"
+homepage: "https://git.frama-c.com/pub/caisar"
+doc: "https://git.frama-c.com/pub/caisar"
+bug-reports: "https://git.frama-c.com/pub/caisar/issues"
 depends: [
   "ocaml" {>= "4.13"}
   "dune" {>= "2.9" & >= "2.9.3"}
   "base" {>= "v0.14.0"}
+  "csv" {>= "2.4"}
   "odoc" {with-doc}
 ]
 build: [
@@ -24,3 +33,4 @@ build: [
   ]
   ["dune" "install" "-p" name "--create-install-files" name]
 ]
+dev-repo: "git+https://git.frama-c.com/pub/caisar.git"
diff --git a/onnx.opam b/onnx.opam
index 46e753ce..9ddf1b18 100644
--- a/onnx.opam
+++ b/onnx.opam
@@ -2,10 +2,19 @@
 opam-version: "2.0"
 version: "0.1"
 synopsis: "ONNX parser"
+maintainer: [
+  "LAISER team, Software Safety and Security Laboratory, CEA-List"
+]
+authors: ["LAISER team, Software Safety and Security Laboratory, CEA-List"]
+license: "LGPL-2.1-only"
+homepage: "https://git.frama-c.com/pub/caisar"
+doc: "https://git.frama-c.com/pub/caisar"
+bug-reports: "https://git.frama-c.com/pub/caisar/issues"
 depends: [
   "ocaml" {>= "4.13"}
   "dune" {>= "2.9" & >= "2.9.3"}
   "base" {>= "v0.14.0"}
+  "stdio" {>= "v0.14.0"}
   "ocaml-protoc-plugin" {= "4.2.0"}
   "odoc" {with-doc}
 ]
@@ -25,3 +34,4 @@ build: [
   ]
   ["dune" "install" "-p" name "--create-install-files" name]
 ]
+dev-repo: "git+https://git.frama-c.com/pub/caisar.git"
diff --git a/ovo.opam b/ovo.opam
index 6adaf24e..14d1b2d7 100644
--- a/ovo.opam
+++ b/ovo.opam
@@ -2,10 +2,19 @@
 opam-version: "2.0"
 version: "0.1"
 synopsis: "OVO parser"
+maintainer: [
+  "LAISER team, Software Safety and Security Laboratory, CEA-List"
+]
+authors: ["LAISER team, Software Safety and Security Laboratory, CEA-List"]
+license: "LGPL-2.1-only"
+homepage: "https://git.frama-c.com/pub/caisar"
+doc: "https://git.frama-c.com/pub/caisar"
+bug-reports: "https://git.frama-c.com/pub/caisar/issues"
 depends: [
-  "ocaml" {>= "4.10"}
+  "ocaml" {>= "4.13"}
   "dune" {>= "2.9" & >= "2.9.1"}
   "base" {>= "v0.14.0"}
+  "csv" {>= "2.4"}
   "odoc" {with-doc}
 ]
 build: [
@@ -24,3 +33,4 @@ build: [
   ]
   ["dune" "install" "-p" name "--create-install-files" name]
 ]
+dev-repo: "git+https://git.frama-c.com/pub/caisar.git"
diff --git a/src/main.ml b/src/main.ml
index 0c5b6669..f2ae0f60 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -199,7 +199,7 @@ let default_cmd =
       `P "Email bug reports to <...>";
     ]
   in
-  let version = "0.0" in
+  let version = "0.1" in
   ( Term.(ret (const (fun _ -> `Help (`Pager, None)) $ const ())),
     Term.info caisar ~version ~doc ~sdocs ~exits:Term.default_exits ~man )
 
diff --git a/tests/help.t b/tests/help.t
index 60d6eace..150ff8c1 100644
--- a/tests/help.t
+++ b/tests/help.t
@@ -1,3 +1,3 @@
 Test help
   $ caisar --version
-  0.0
+  0.1
-- 
GitLab