# Contributor: Andy Li # Maintainer: Andy Li pkgname=ocaml-ptmap _pkgname=ptmap pkgver=2.0.5 pkgrel=2 pkgdesc="Maps over integers implemented as Patricia trees" url="https://github.com/backtracking/ptmap" arch="all !riscv64" # limited by ocaml aport license="LGPL-2.1-or-later WITH OCaml-linking-exception" depends="ocaml-runtime" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends=" dune ocaml ocaml-findlib ocaml-stdlib-shims ocaml-seq-dev " subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/backtracking/ptmap/archive/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" # 32-bit archs case "$CARCH" in arm*|x86) options="$options textrels" ;; esac build() { export OCAMLPATH=/usr/lib/ocaml make all } check() { make test } package() { dune install \ --destdir="$pkgdir" \ --prefix=/usr \ --libdir=/usr/lib/ocaml # There's just a readme and changelog. rm -Rf "$pkgdir"/usr/doc } dev() { default_dev cd "$pkgdir" local path; for path in $(find usr/lib/ocaml \( \ -name '*.cmt' -o \ -name '*.cmti' -o \ -name '*.cmx' -o \ -name '*.cmxa' -o \ -name '*.ml' -o \ -name '*.mli' \ \)) do amove "$path" done } sha512sums=" 6815ee977cb9a4c5088af8dfb7d8055c8d35870ceb4e95f658fbdc50405495bea75a8755442dc6f7345d2e9021c3b96d14883603759baf267feced9cd5ba5202 ocaml-ptmap-2.0.5.tar.gz "