Skip to content

Commit a59f7bd

Browse files
authored
Merge pull request #6 from hcarty/dune
Update to dune and opam 2.x
2 parents f73127f + f744482 commit a59f7bd

File tree

9 files changed

+39
-39
lines changed

9 files changed

+39
-39
lines changed

Makefile

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
.PHONY: all test benchmark doc repl clean gh-pages
22

33
all:
4-
jbuilder build --dev
4+
dune build
55

66
test:
7-
jbuilder runtest --dev
7+
dune runtest
88

99
benchmark:
10-
jbuilder build benchmark/bench.exe
11-
_build/default/benchmark/bench.exe
10+
dune exec benchmark/bench.exe
1211

1312
doc:
14-
jbuilder build @doc
13+
dune build @doc
1514

1615
repl:
17-
jbuilder utop src
16+
dune utop src
1817

1918
clean:
20-
jbuilder clean
19+
dune clean
2120

2221
gh-pages: doc
2322
git clone `git config --get remote.origin.url` .gh-pages --reference .

benchmark/dune

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(executable
2+
(name bench)
3+
(libraries ezgzip benchmark))

benchmark/jbuild

-5
This file was deleted.

dune-project

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(lang dune 1.0)
2+
(name ezgzip)

ezgzip.opam

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
opam-version: "1.2"
1+
opam-version: "2.0"
22
maintainer: "Hezekiah M. Carty <[email protected]>"
33
authors: [ "Hezekiah M. Carty <[email protected]>" ]
44
license: "MIT"
5+
synopsis: "Simple gzip (de)compression library"
56
homepage: "https://github.com/hcarty/ezgzip"
6-
dev-repo: "https://github.com/hcarty/ezgzip.git"
7+
dev-repo: "git+https://github.com/hcarty/ezgzip.git"
78
bug-reports: "https://github.com/hcarty/ezgzip/issues"
8-
build: ["jbuilder" "build" "-p" name "-j" jobs]
9-
build-test: ["jbuilder" "runtest" "-p" name]
10-
build-doc: [ "jbuilder" "build" "@doc" "-p" name]
9+
build: [
10+
["dune" "build" "-p" name "-j" jobs]
11+
["dune" "runtest" "-p" name "-j" jobs] {with-test}
12+
["dune" "build" "-p" name "-j" jobs] {with-doc}
13+
]
1114
depends: [
12-
"alcotest" {test & >= "0.8.1"}
15+
"alcotest" {with-test & >= "0.8.1"}
1316
"astring"
14-
"benchmark" {test & >= "1.4"}
15-
"jbuilder" {build & >= "1.0+beta13"}
17+
"benchmark" {with-test & >= "1.4"}
18+
"dune" {>= "1.0"}
1619
"ocplib-endian"
17-
"odoc" {doc & >= "1.1.1"}
18-
"qcheck" {test & >= "0.7"}
20+
"odoc" {with-doc & >= "1.1.1"}
21+
"qcheck" {with-test & >= "0.7"}
1922
"rresult"
2023
"camlzip"
24+
"ocaml" {>= "4.03.0"}
2125
]
22-
available: [ ocaml-version >= "4.03.0" ]

src/dune

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(library
2+
(name ezgzip)
3+
(public_name ezgzip)
4+
(libraries astring ocplib-endian rresult camlzip))

src/jbuild

-6
This file was deleted.

test/dune

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(executable
2+
(name test)
3+
(libraries alcotest ezgzip qcheck))
4+
5+
(alias
6+
(name runtest)
7+
(deps
8+
(:< test.exe))
9+
(action
10+
(run %{<} --color=always)))

test/jbuild

-10
This file was deleted.

0 commit comments

Comments
 (0)