# Contributor: rubicon # Maintainer: Celeste pkgname=ocaml-trie _pkgname=trie pkgver=1.0.0 pkgrel=2 pkgdesc="Strict impure trie tree OCaml module" url="https://github.com/kandu/trie/" arch="all !riscv64 !loongarch64" # ocaml license="MIT" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="dune ocaml" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/kandu/trie/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 dune build --root . @install --no-buffer --verbose } check() { dune runtest --no-buffer --verbose } package() { dune install \ --destdir="$pkgdir" \ --prefix=/usr \ --libdir=/usr/lib/ocaml rm -Rf "$pkgdir"/usr/doc } dev() { default_dev cd "$pkgdir" local path; find usr/lib/ocaml \( \ -name '*.cmt' -o \ -name '*.cmti' -o \ -name '*.ml' -o \ -name '*.mli' \ \) | while read -r path do amove "$path" done } prepare_py_provides() { local datadir="${subpkgdir:-$pkgdir}" local pkgbasedir=${pkgbasedir:-"$startdir/pkg"} local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname} options_has "!tracedeps" && return 0 ocaml4-abuild-find provides \ "$datadir"/usr/lib/ocaml \ "$controldir" \ "$pkgver-r$pkgrel" } scan_python3_dependency() { local controldir="$2" datadir="$3" ocaml4-abuild-find requires \ "$datadir"/usr/lib/ocaml \ "$controldir" } sha512sums=" 1921a42486a0a221e546507287cbf28ccae5462abe55817269517b7b92e19f35031f2d0fba2b1890b97236d6fff11be9d76ade317ae1dfa1089bd4740a46786f ocaml-trie-1.0.0.tar.gz "