# Contributor: rubicon # Maintainer: pkgname=ocaml-randomconv _pkgname=randomconv pkgver=0.1.3 pkgrel=1 pkgdesc="Convert from random byte vectors (Cstruct.t) to random native numbers" url="https://github.com/hannesm/randomconv" arch="all !riscv64" # limited by ocaml aport license="ISC" depends="ocaml-runtime ocaml-cstruct" depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-cstruct-dev" makedepends="$depends_dev dune ocaml" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.bz2::https://github.com/hannesm/randomconv/releases/download/v$pkgver/randomconv-v$pkgver.tbz" builddir="$srcdir/$_pkgname-v$pkgver" _ocamldir=usr/lib/ocaml # 32-bit archs case "$CARCH" in arm*|x86) options="$options textrels" ;; esac build() { dune build --release --verbose } check() { dune runtest --verbose } package() { dune install \ --destdir="$pkgdir" \ --docdir=/.omit rm -Rf "$pkgdir"/.omit } dev() { default_dev cd "$pkgdir" local path; for path in $(find $_ocamldir \( \ -name '*.cmt' -o \ -name '*.cmti' -o \ -name '*.cmx' -o \ -name '*.cmxa' -o \ -name '*.ml' -o \ -name '*.mli' \ \)) do amove "$path" done } sha512sums=" f5186f7669a6b1b943442fdcfcdb37cf6c8199a1c644ed815f351f50428b9b7e1e5408ff4a0fcdfb093451b5237e48602af60f87a1b93e49897576c8aa2cd23f ocaml-randomconv-0.1.3.tar.bz2 "