Skip to content

Commit

Permalink
metadata fixes and support dune-release
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm committed Jan 22, 2019
1 parent 3d1a7ee commit 923d046
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 45 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
- PACKAGE="cstruct" DISTRO="alpine" OCAML_VERSION="4.06"
- PACKAGE="cstruct" DISTRO="alpine" OCAML_VERSION="4.07"
- PACKAGE="cstruct-lwt" DISTRO="debian-testing" OCAML_VERSION="4.07"
- PACKAGE="cstruct-async" DISTRO="debian-unstable" OCAML_VERSION="4.07"
- PACKAGE="cstruct-async" DISTRO="centos" OCAML_VERSION="4.07"
- PACKAGE="ppx_cstruct" DISTRO="debian-unstable" OCAML_VERSION="4.07"
- PACKAGE="cstruct-unix" DISTRO="ubuntu" OCAML_VERSION="4.07"
- PACKAGE="cstruct-unix" DISTRO="fedora" OCAML_VERSION="4.07"
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ v3.3.0 2019-01-22
primarily there for older compilers, and new uses should be
based around `ppxlib`. (#201 by @edwintorok).

- Upgrade opam metadata to 2.0 format. (#217 by @XVilka)
- Upgrade opam metadata to 2.0 format. (#217 by @XVilka @avsm)

- Support dune-release instead of topkg (@avsm)

v3.2.1 2017-12-13
-----------------
Expand Down
21 changes: 4 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
.PHONY: all clean fuzz build-fuzz

all:
jbuilder build @install --dev
dune build

clean:
jbuilder clean
dune clean

test:
jbuilder runtest --dev
dune runtest

build-fuzz:
jbuilder build --dev fuzz/fuzz.exe
dune build fuzz/fuzz.exe

fuzz: build-fuzz
mkdir -p _build/in
echo > _build/in/empty
afl-fuzz -i _build/in -o _build/out -- _build/default/fuzz/fuzz.exe @@

REPO=../../mirage/opam-repository
PACKAGES=$(REPO)/packages
# until we have https://github.com/ocaml/opam-publish/issues/38
pkg-%:
topkg opam pkg -n $*
mkdir -p $(PACKAGES)/$*
cp -r _build/$*.* $(PACKAGES)/$*/
cd $(PACKAGES) && git add $*

PKGS=$(basename $(wildcard *.opam))
opam-pkg:
$(MAKE) $(PKGS:%=pkg-%)
6 changes: 2 additions & 4 deletions cstruct-async.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
tags: [ "org:mirage" "org:ocamllabs" ]
doc: "https://mirage.githbu.io/ocaml-cstruct/"
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
Expand All @@ -18,13 +19,10 @@ depends: [
"async_kernel" {>= "v0.9.0" & < "v0.12"}
"async_unix" {>= "v0.9.0" & < "v0.12"}
"core_kernel" {>= "v0.9.0" & < "v0.12"}
"cstruct" {>= "3.0.0"}
"cstruct" {>= "3.2.0"}
]
synopsis: "Access C-like structures directly from OCaml"
description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
3 changes: 2 additions & 1 deletion cstruct-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"
tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["dune" "subst"] {pinned}
Expand All @@ -16,7 +17,7 @@ depends: [
"ocaml" {>= "4.03.0"}
"base-unix"
"lwt"
"cstruct"
"cstruct" {>="3.2.0"}
"dune" {build & >= "1.0"}
]
synopsis: "Access C-like structures directly from OCaml"
Expand Down
13 changes: 7 additions & 6 deletions cstruct-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"

tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["dune" "subst"] {pinned}
Expand All @@ -16,13 +18,12 @@ depends: [
"ocaml" {>= "4.03.0"}
"dune" {build & >= "1.0"}
"base-unix"
"cstruct"
"cstruct" {>="3.2.0"}
]
synopsis: "Access C-like structures directly from OCaml"

description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module.
"""
4 changes: 1 addition & 3 deletions cstruct.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"
tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["dune" "subst"] {pinned}
Expand All @@ -24,6 +25,3 @@ description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
8 changes: 0 additions & 8 deletions pkg/pkg.ml

This file was deleted.

5 changes: 2 additions & 3 deletions ppx_cstruct.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"

tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["dune" "subst"] {pinned}
Expand All @@ -29,6 +31,3 @@ description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}

0 comments on commit 923d046

Please sign in to comment.