diff --git a/dune-project b/dune-project index 0f633fb8..c4133d34 100644 --- a/dune-project +++ b/dune-project @@ -29,7 +29,7 @@ astring (fmt (>= 0.8.9)) logs - (cmdliner (>= 1.3.0)) + (cmdliner (>= 2.0.0)) (tar-unix (and (>= 2.6.0) (< 3.0.0))) (yojson (>= 1.6.0)) sexplib diff --git a/obuilder.opam b/obuilder.opam index 5346a1b2..c8f030e1 100644 --- a/obuilder.opam +++ b/obuilder.opam @@ -29,7 +29,7 @@ depends: [ "astring" "fmt" {>= "0.8.9"} "logs" - "cmdliner" {>= "1.3.0"} + "cmdliner" {>= "2.0.0"} "tar-unix" {>= "2.6.0" & < "3.0.0"} "yojson" {>= "1.6.0"} "sexplib" @@ -45,6 +45,7 @@ depends: [ "alcotest-lwt" {>= "1.7.0" & with-test} "odoc" {with-doc} ] +dev-repo: "git+https://github.com/ocurrent/obuilder.git" build: [ ["dune" "subst"] {dev} [ @@ -58,5 +59,11 @@ build: [ "@runtest" {with-test} "@doc" {with-doc} ] + [ + "cmdliner" "install" "tool-support" + "--update-opam-install=%{_:name}%.install" + "_build/install/default/bin/obuilder" {os-family != "windows"} + "_build/install/default/bin/obuilder.exe" {os-family = "windows"} + "_build/cmdliner-install" + ] ] -dev-repo: "git+https://github.com/ocurrent/obuilder.git" diff --git a/obuilder.opam.template b/obuilder.opam.template new file mode 100644 index 00000000..7fd2c625 --- /dev/null +++ b/obuilder.opam.template @@ -0,0 +1,21 @@ +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + [ + "cmdliner" "install" "tool-support" + "--update-opam-install=%{_:name}%.install" + "_build/install/default/bin/obuilder" {os-family != "windows"} + "_build/install/default/bin/obuilder.exe" {os-family = "windows"} + "_build/cmdliner-install" + ] +]