From f7444826e4dc1a016b6103304722ff54fd27b408 Mon Sep 17 00:00:00 2001 From: "Hezekiah M. Carty" Date: Wed, 26 Jun 2019 16:06:02 -0600 Subject: [PATCH] Update to dune and opam 2.x --- Makefile | 13 ++++++------- benchmark/dune | 3 +++ benchmark/jbuild | 5 ----- dune-project | 2 ++ ezgzip.opam | 25 ++++++++++++++----------- src/dune | 4 ++++ src/jbuild | 6 ------ test/dune | 10 ++++++++++ test/jbuild | 10 ---------- 9 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 benchmark/dune delete mode 100644 benchmark/jbuild create mode 100644 dune-project create mode 100644 src/dune delete mode 100644 src/jbuild create mode 100644 test/dune delete mode 100644 test/jbuild diff --git a/Makefile b/Makefile index d89a4cf..01932a2 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,22 @@ .PHONY: all test benchmark doc repl clean gh-pages all: - jbuilder build --dev + dune build test: - jbuilder runtest --dev + dune runtest benchmark: - jbuilder build benchmark/bench.exe - _build/default/benchmark/bench.exe + dune exec benchmark/bench.exe doc: - jbuilder build @doc + dune build @doc repl: - jbuilder utop src + dune utop src clean: - jbuilder clean + dune clean gh-pages: doc git clone `git config --get remote.origin.url` .gh-pages --reference . diff --git a/benchmark/dune b/benchmark/dune new file mode 100644 index 0000000..9d9f2a7 --- /dev/null +++ b/benchmark/dune @@ -0,0 +1,3 @@ +(executable + (name bench) + (libraries ezgzip benchmark)) diff --git a/benchmark/jbuild b/benchmark/jbuild deleted file mode 100644 index 094622b..0000000 --- a/benchmark/jbuild +++ /dev/null @@ -1,5 +0,0 @@ -(jbuild_version 1) - -(executable - ((name bench) - (libraries (ezgzip benchmark)))) diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..ea97083 --- /dev/null +++ b/dune-project @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name ezgzip) diff --git a/ezgzip.opam b/ezgzip.opam index 63007f3..2d18c1f 100644 --- a/ezgzip.opam +++ b/ezgzip.opam @@ -1,22 +1,25 @@ -opam-version: "1.2" +opam-version: "2.0" maintainer: "Hezekiah M. Carty " authors: [ "Hezekiah M. Carty " ] license: "MIT" +synopsis: "Simple gzip (de)compression library" homepage: "https://github.com/hcarty/ezgzip" -dev-repo: "https://github.com/hcarty/ezgzip.git" +dev-repo: "git+https://github.com/hcarty/ezgzip.git" bug-reports: "https://github.com/hcarty/ezgzip/issues" -build: ["jbuilder" "build" "-p" name "-j" jobs] -build-test: ["jbuilder" "runtest" "-p" name] -build-doc: [ "jbuilder" "build" "@doc" "-p" name] +build: [ + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "-p" name "-j" jobs] {with-doc} +] depends: [ - "alcotest" {test & >= "0.8.1"} + "alcotest" {with-test & >= "0.8.1"} "astring" - "benchmark" {test & >= "1.4"} - "jbuilder" {build & >= "1.0+beta13"} + "benchmark" {with-test & >= "1.4"} + "dune" {>= "1.0"} "ocplib-endian" - "odoc" {doc & >= "1.1.1"} - "qcheck" {test & >= "0.7"} + "odoc" {with-doc & >= "1.1.1"} + "qcheck" {with-test & >= "0.7"} "rresult" "camlzip" + "ocaml" {>= "4.03.0"} ] -available: [ ocaml-version >= "4.03.0" ] diff --git a/src/dune b/src/dune new file mode 100644 index 0000000..5695db5 --- /dev/null +++ b/src/dune @@ -0,0 +1,4 @@ +(library + (name ezgzip) + (public_name ezgzip) + (libraries astring ocplib-endian rresult camlzip)) diff --git a/src/jbuild b/src/jbuild deleted file mode 100644 index bf1cc6b..0000000 --- a/src/jbuild +++ /dev/null @@ -1,6 +0,0 @@ -(jbuild_version 1) - -(library - ((name ezgzip) - (public_name ezgzip) - (libraries (astring ocplib-endian rresult camlzip)))) diff --git a/test/dune b/test/dune new file mode 100644 index 0000000..776c83f --- /dev/null +++ b/test/dune @@ -0,0 +1,10 @@ +(executable + (name test) + (libraries alcotest ezgzip qcheck)) + +(alias + (name runtest) + (deps + (:< test.exe)) + (action + (run %{<} --color=always))) diff --git a/test/jbuild b/test/jbuild deleted file mode 100644 index 557e890..0000000 --- a/test/jbuild +++ /dev/null @@ -1,10 +0,0 @@ -(jbuild_version 1) - -(executable - ((name test) - (libraries (alcotest ezgzip qcheck)))) - -(alias - ((name runtest) - (deps (test.exe)) - (action (run ${<} --color=always))))