diff options
author | Andy Li <andy@onthewings.net> | 2019-12-01 09:32:31 +0800 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-12-04 02:12:49 +0100 |
commit | 39be927a1124e1aeb3553a752b84699973fde8e9 (patch) | |
tree | 776f2a4e4edf17f2b82fd68bf964e6605ab92c53 /testing/ocaml-qcheck/APKBUILD | |
parent | 481a30a3e50a9b0ea5b392bdc32f351955321fb3 (diff) | |
download | aports-39be927a1124e1aeb3553a752b84699973fde8e9.tar.bz2 aports-39be927a1124e1aeb3553a752b84699973fde8e9.tar.xz |
testing/ocaml-qcheck: new aport
https://github.com/c-cube/qcheck
QuickCheck inspired property-based testing for OCaml
Diffstat (limited to 'testing/ocaml-qcheck/APKBUILD')
-rw-r--r-- | testing/ocaml-qcheck/APKBUILD | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/ocaml-qcheck/APKBUILD b/testing/ocaml-qcheck/APKBUILD new file mode 100644 index 0000000000..d100067b42 --- /dev/null +++ b/testing/ocaml-qcheck/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Andy Li <andy@onthewings.net> +# Maintainer: Andy Li <andy@onthewings.net> +pkgname=ocaml-qcheck +_pkgname=qcheck +pkgver=0.12 +pkgrel=0 +pkgdesc="QuickCheck inspired property-based testing for OCaml" +url="https://github.com/c-cube/qcheck" +arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport +license="BSD-2-Clause" +depends="ocaml-runtime" +depends_dev="$pkgname=$pkgver-r$pkgrel" +makedepends="dune ocaml ocaml-findlib ocaml-ounit-dev" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + + dune build @install -p qcheck,qcheck-core,qcheck-ounit -j1 --no-buffer --verbose +} + +check() { + dune runtest --no-buffer +} + +package() { + cd "$builddir" + + mkdir -p "$pkgdir"/usr/lib/ocaml + dune install \ + --destdir="$pkgdir" \ + qcheck qcheck-core qcheck-ounit + + # There's just a readme and changelog. + rm -Rf "$pkgdir"/usr/doc + + # Remove annotation files and sources. + local path; for path in $(find "$pkgdir"/usr/lib/ocaml \ + -name '*.cmt' \ + -o -name '*.ml') + do + rm "$path" + done +} + +dev() { + default_dev + + cd "$pkgdir" + + local path; for path in $(find usr/lib/ocaml \ + -name '*.cmx' \ + -o -name '*.cmxa' \ + -o -name '*.mli') + do + mkdir -p "${path%/*}" + mv "$path" "$subpkgdir"/${path%/*}/ + done +} + +sha512sums="a8b844d66b65fdc8cd1cb2ff1a84801815501559dccac5e4188593f5b294ca318f7de971987ce810b6f7840a292999a98ea8beb1e2c989ee3abd78314fca3ad3 ocaml-qcheck-0.12.tar.gz" |