# Maintainer: Daniel Peukert <daniel@peukert.cc> # Contributor: Jakob Gahde <j5lx@fmail.co.uk> _projectname='splittable_random' pkgname="ocaml-$_projectname" pkgver='0.17.0' pkgrel='3' pkgdesc='PRNG that can be split into independent streams' arch=('x86_64' 'aarch64') url="https://github.com/janestreet/$_projectname" license=('MIT') depends=('ocaml>=5.1.0' 'ocaml-base>=0.17.0' 'ocaml-ppx_assert>=0.17.0' 'ocaml-ppx_bench>=0.17.0' 'ocaml-ppx_inline_test>=0.17.0' 'ocaml-ppx_sexp_message>=0.17.0') makedepends=('dune>=3.11.0') options=('!strip') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") b2sums=('46b498628c187410f58f6537d6711e3e75c05fb06b1acda74cb0a11ad0c1bf62db1b2bd75033101b3dd07eca379dc5e97c92d792784995a6593ac19bad610f8f') _sourcedirectory="$_projectname-$pkgver" build() { cd "$srcdir/$_sourcedirectory/" dune build --release --verbose } package() { cd "$srcdir/$_sourcedirectory/" DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose for _folder in "$pkgdir/usr/share/doc/"*; do mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder")" done install -dm755 "$pkgdir/usr/share/licenses/$pkgname" ln -sf "/usr/share/doc/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/MIT" }