Skip to content

Commit cafe65f

Browse files
committed
Generate opam file using Dune
1 parent 62cf9b3 commit cafe65f

3 files changed

Lines changed: 72 additions & 27 deletions

File tree

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
(library
2-
(name ocaml_version)
2+
(name ocaml_version)
33
(public_name ocaml-version))

dune-project

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
(lang dune 1.0)
1+
(lang dune 3.6)
22
(name ocaml-version)
3+
4+
(formatting (enabled_for dune))
5+
(generate_opam_files true)
6+
7+
(source (github ocurrent/ocaml-version))
8+
(authors "Anil Madhavapeddy <anil@recoil.org>")
9+
(maintainers "Anil Madhavapeddy <anil@recoil.org>")
10+
(documentation "https://ocurrent.github.io/ocaml-version/doc")
11+
(license ISC)
12+
13+
(package
14+
(name ocaml-version)
15+
(synopsis "Manipulate, parse and generate OCaml compiler version strings")
16+
(description "\
17+
This library provides facilities to parse version numbers of the OCaml \
18+
compiler, and enumerates the various official OCaml releases and configuration \
19+
variants.
20+
21+
OCaml version numbers are of the form `major.minor.patch+extra`, where the \
22+
`patch` and `extra` fields are optional. This library offers the following \
23+
functionality:
24+
25+
- Functions to parse and serialise OCaml compiler version numbers.
26+
- Enumeration of official OCaml compiler version releases.
27+
- Test compiler versions for a particular feature (e.g. the `bytes` type)
28+
- [opam](https://opam.ocaml.org) compiler switch enumeration.
29+
30+
### Further information
31+
32+
- **Discussion:** Post on <https://discuss.ocaml.org/> with the `ocaml` tag \
33+
under the Ecosystem category.
34+
- **Bugs:** <https://github.com/ocurrent/ocaml-version/issues>
35+
- **Docs:** <http://docs.mirage.io/ocaml-version>
36+
")
37+
(depends
38+
(ocaml (>= 4.07.0))
39+
(alcotest :with-test))
40+
(tags (org:ocamllabs)))

ocaml-version.opam

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
1+
# This file is generated by dune, edit dune-project instead
12
opam-version: "2.0"
2-
maintainer: "Anil Madhavapeddy <anil@recoil.org>"
3-
authors: "Anil Madhavapeddy <anil@recoil.org>"
4-
license: "ISC"
5-
tags: "org:ocamllabs"
6-
homepage: "https://github.com/ocurrent/ocaml-version"
7-
doc: "https://ocurrent.github.io/ocaml-version/doc"
8-
bug-reports: "https://github.com/ocurrent/ocaml-version/issues"
9-
depends: [
10-
"ocaml" {>= "4.07.0"}
11-
"dune" {>= "1.0"}
12-
"alcotest" {with-test}
13-
]
14-
build: [
15-
["dune" "subst"] {dev}
16-
["dune" "build" "-p" name "-j" jobs]
17-
]
18-
dev-repo: "git+https://github.com/ocurrent/ocaml-version.git"
193
synopsis: "Manipulate, parse and generate OCaml compiler version strings"
204
description: """
21-
This library provides facilities to parse version numbers of the OCaml
22-
compiler, and enumerates the various official OCaml releases and configuration
23-
variants.
5+
This library provides facilities to parse version numbers of the OCaml compiler, and enumerates the various official OCaml releases and configuration variants.
246

25-
OCaml version numbers are of the form `major.minor.patch+extra`, where the
26-
`patch` and `extra` fields are optional. This library offers the following
27-
functionality:
7+
OCaml version numbers are of the form `major.minor.patch+extra`, where the `patch` and `extra` fields are optional. This library offers the following functionality:
288

299
- Functions to parse and serialise OCaml compiler version numbers.
3010
- Enumeration of official OCaml compiler version releases.
@@ -33,8 +13,35 @@ functionality:
3313

3414
### Further information
3515

36-
- **Discussion:** Post on <https://discuss.ocaml.org/> with the `ocaml` tag under
37-
the Ecosystem category.
16+
- **Discussion:** Post on <https://discuss.ocaml.org/> with the `ocaml` tag under the Ecosystem category.
3817
- **Bugs:** <https://github.com/ocurrent/ocaml-version/issues>
3918
- **Docs:** <http://docs.mirage.io/ocaml-version>
4019
"""
20+
maintainer: ["Anil Madhavapeddy <anil@recoil.org>"]
21+
authors: ["Anil Madhavapeddy <anil@recoil.org>"]
22+
license: "ISC"
23+
tags: ["org:ocamllabs"]
24+
homepage: "https://github.com/ocurrent/ocaml-version"
25+
doc: "https://ocurrent.github.io/ocaml-version/doc"
26+
bug-reports: "https://github.com/ocurrent/ocaml-version/issues"
27+
depends: [
28+
"dune" {>= "3.6"}
29+
"ocaml" {>= "4.07.0"}
30+
"alcotest" {with-test}
31+
"odoc" {with-doc}
32+
]
33+
build: [
34+
["dune" "subst"] {dev}
35+
[
36+
"dune"
37+
"build"
38+
"-p"
39+
name
40+
"-j"
41+
jobs
42+
"@install"
43+
"@runtest" {with-test}
44+
"@doc" {with-doc}
45+
]
46+
]
47+
dev-repo: "git+https://github.com/ocurrent/ocaml-version.git"

0 commit comments

Comments
 (0)