Skip to content

Commit

Permalink
ipaddr-sexp and macaddr-sexp packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow authored and dinosaure committed Jul 5, 2019
1 parent 3759a96 commit 6c48723
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 21 deletions.
26 changes: 26 additions & 0 deletions ipaddr-sexp.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
opam-version: "2.0"
maintainer: "anil@recoil.org"
authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"]
synopsis: "A library for manipulation of IP (and MAC) address representations"
description: """
Sexp convertions for ipaddr
"""

license: "ISC"
tags: ["org:mirage" "org:xapi-project"]
homepage: "https://github.com/mirage/ocaml-ipaddr"
doc: "https://mirage.github.io/ocaml-ipaddr/"
bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues"
depends: [
"ocaml" {>= "4.04.0"}
"dune" {build}
"ipaddr"
"ounit" {with-test}
"ppx_sexp_conv" {>= "v0.9.0"}
]
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git"
3 changes: 1 addition & 2 deletions ipaddr.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ depends: [
"ocaml" {>= "4.04.0"}
"dune" {build}
"macaddr"
"sexplib0"
"ounit" {with-test}
"ppx_sexp_conv" {with-test}
"ppx_sexp_conv" {with-test & >= "v0.9.0"}
]
build: [
["dune" "subst"] {pinned}
Expand Down
6 changes: 4 additions & 2 deletions lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@

(library
(name ipaddr_sexp)
(public_name ipaddr.sexp)
(public_name ipaddr-sexp)
(modules ipaddr_sexp)
(preprocess (pps ppx_sexp_conv))
(libraries ipaddr sexplib0))

(library
(name macaddr_sexp)
(public_name macaddr.sexp)
(public_name macaddr-sexp)
(modules macaddr_sexp)
(preprocess (pps ppx_sexp_conv))
(libraries macaddr sexplib0))

(library
Expand Down
45 changes: 30 additions & 15 deletions lib_test/dune
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
(executables
(names test_ipaddr test_macaddr test_ppx)
(rule (copy# ../lib/ipaddr_sexp.ml ipaddr_sexp.ml))
(rule (copy# ../lib/macaddr_sexp.ml macaddr_sexp.ml))

(library
(name test_macaddr_sexp)
(wrapped false)
(modules macaddr_sexp)
(preprocess (pps ppx_sexp_conv))
(libraries macaddr sexplib0))

(library
(name test_ipaddr_sexp)
(wrapped false)
(modules ipaddr_sexp)
(preprocess (pps ppx_sexp_conv))
(libraries ipaddr oUnit ipaddr.sexp macaddr.sexp))
(libraries ipaddr sexplib0))

(alias
(name runtest)
(deps test_ppx.exe)
(action (run %{deps})))
(test
(name test_ipaddr)
(package ipaddr)
(modules test_ipaddr)
(libraries ipaddr test_ipaddr_sexp oUnit))

(alias
(name runtest)
(deps test_macaddr.exe)
(action (run %{deps})))
(test
(name test_macaddr)
(package macaddr)
(modules test_macaddr)
(libraries macaddr test_macaddr_sexp oUnit))

(alias
(name runtest)
(deps test_ipaddr.exe)
(action (run %{deps})))
(test
(name test_ppx)
(modules test_ppx)
(package ipaddr)
(libraries ipaddr macaddr test_ipaddr_sexp test_macaddr_sexp oUnit))
26 changes: 26 additions & 0 deletions macaddr-sexp.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
opam-version: "2.0"
maintainer: "anil@recoil.org"
authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"]
synopsis: "A library for manipulation of MAC address representations"
license: "ISC"
tags: ["org:mirage" "org:xapi-project"]
homepage: "https://github.com/mirage/ocaml-ipaddr"
doc: "https://mirage.github.io/ocaml-ipaddr/"
bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues"
depends: [
"ocaml" {>= "4.04.0"}
"dune" {build}
"macaddr"
"ounit" {with-test}
"ppx_sexp_conv" {>= "v0.9.0"}
]
conflicts: [ "ipaddr" {< "3.0.0"} ]
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git"
description: """
Sexp convertions for macaddr
"""
3 changes: 1 addition & 2 deletions macaddr.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues"
depends: [
"ocaml" {>= "4.04.0"}
"dune" {build}
"sexplib0"
"ounit" {with-test}
"ppx_sexp_conv" {with-test}
"ppx_sexp_conv" {with-test & >= "v0.9.0"}
]
conflicts: [ "ipaddr" {< "3.0.0"} ]
build: [
Expand Down

0 comments on commit 6c48723

Please sign in to comment.