Skip to content

Commit

Permalink
port to dune from jbuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Anil Madhavapeddy <[email protected]>
  • Loading branch information
avsm committed Jan 14, 2019
1 parent a6f4822 commit c205305
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_build/
*.install
*.merlin

.*.swp
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ env:
global:
- PACKAGE="mirage-block-xen"
matrix:
- DISTRO="ubuntu-16.04" OCAML_VERSION="4.03.0"
- DISTRO="alpine" OCAML_VERSION="4.04.2"
- DISTRO="ubuntu" OCAML_VERSION="4.03"
- DISTRO="alpine" OCAML_VERSION="4.04"
- DISTRO="alpine" OCAML_VERSION="4.05"
- DISTRO="alpine" OCAML_VERSION="4.06"
- DISTRO="alpine" OCAML_VERSION="4.07"
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.6.0 (2019-01-11):
* Port to dune from jbuilder (@avsm)

## 1.5.4 (2017-07-05):
* Use `ppx_cstruct` directly instead of the `cstruct.ppx` compat
package, which makes it easier for jbuilder subdirectory embedding.
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
.PHONY: build clean test

build:
jbuilder build @install --dev
dune build

test:
jbuilder runtest --dev
dune runtest

install:
jbuilder install
dune install

uninstall:
jbuilder uninstall
dune uninstall

xen-depends: Dockerfile build.sh
docker build -t mirage-block-xen .
Expand Down
4 changes: 0 additions & 4 deletions build.sh

This file was deleted.

2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.0)
(name mirage-block-xen)
2 changes: 1 addition & 1 deletion lib/blkproto.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)

open Printf
[@@@warning "-32"]

type ('a, 'b) result = [
| `OK of 'a
Expand Down
26 changes: 26 additions & 0 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(library
(name mirage_block_xen)
(public_name mirage-block-xen)
(modules Blkproto Device_number)
(libraries cstruct io-page)
(wrapped false)
(preprocess
(pps ppx_cstruct)))

(library
(name mirage_block_xen_front)
(public_name mirage-block-xen.front)
(modules Blkfront Block)
(libraries logs stringext lwt cstruct ppx_cstruct mirage-block-lwt io-page
io-page-xen shared-memory-ring shared-memory-ring-lwt mirage-block-xen
xen-evtchn xen-gnt mirage-xen)
(wrapped false))

(library
(name mirage_block_xen_back)
(public_name mirage-block-xen.back)
(modules Blkback Block_request)
(libraries logs lwt cstruct ppx_cstruct io-page shared-memory-ring
shared-memory-ring-lwt mirage-block-xen xen-evtchn xen-gnt xenstore
xenstore.client mirage-block-lwt rresult)
(wrapped false))
24 changes: 0 additions & 24 deletions lib/jbuild

This file was deleted.

58 changes: 30 additions & 28 deletions mirage-block-xen.opam
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
opam-version: "1.2"
maintainer: "[email protected]"
homepage: "https://github.com/mirage/mirage-block-xen"
dev-repo: "https://github.com/mirage/mirage-block-xen.git"
bug-reports: "https://github.com/mirage/mirage-block-xen/issues"
doc: "https://mirage.github.io/mirage-block-xen"

authors: [
"Anil Madhavapeddy"
"David Scott"
"Thomas Leonard"
]
opam-version: "2.0"
maintainer: "[email protected]"
authors: ["Anil Madhavapeddy" "David Scott" "Thomas Leonard"]
license: "ISC"
tags: [
"org:mirage"
"org:xapi-project"
]

build: [
[ "jbuilder" "subst"] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
]

tags: ["org:mirage" "org:xapi-project"]
homepage: "https://github.com/mirage/mirage-block-xen"
doc: "https://mirage.github.io/mirage-block-xen/"
bug-reports: "https://github.com/mirage/mirage-block-xen/issues"
depends: [
"ocamlfind" {build}
"jbuilder" {build & >="1.0+beta9"}
"ocaml" {>= "4.02.0"}
"dune" {build}
"cmdliner"
"logs"
"stringext"
"lwt" {>= "2.4.3"}
"cstruct" {>= "1.9.0"}
"ppx_tools"
"shared-memory-ring-lwt"
"mirage-block-lwt" {>= "1.0.0"}
"ipaddr"
"io-page-xen" {>= "2.0.0"}
"mirage-xen" {>= "1.0.1" }
"mirage-xen" {>= "1.0.1"}
"rresult"
]
available: [
ocaml-version >= "4.02.0"
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
dev-repo: "git+https://github.com/mirage/mirage-block-xen.git"
synopsis: "MirageOS block driver for Xen that implements the blkfront/back protocol"
description: """
This library allows a Mirage OCaml application to

1. read and write blocks from any Xen "backend" (server)
2. service block requests from any Xen "frontend" (client)

This library can be used in both kernelspace (on Xen)
or in userspace (using libraries that come with Xen).

This library depends on the
[shared-memory-ring](https://github.com/mirage/shared-memory-ring)
library which enables high-throughput, low-latency data
transfers over shared memory on both x86 and ARM architectures,
using the standard Xen RPC and event channel semantics.
"""
3 changes: 0 additions & 3 deletions pkg/pkg.ml

This file was deleted.

0 comments on commit c205305

Please sign in to comment.