# Contributor: rubicon # Maintainer: pkgname=ocaml-base64 _pkgname=base64 pkgver=3.5.0 pkgrel=1 pkgdesc="Base64 encoding for OCaml" url="https://github.com/mirage/ocaml-base64" arch="all !riscv64" # limited by ocaml aport license="ISC" depends="ocaml-runtime" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="dune ocaml" checkdepends="ocaml-alcotest-dev ocaml-bos-dev ocaml-rresult-dev" options="!check" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/ocaml-base64/releases/download/v$pkgver/base64-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=" 82efc76ca75717dbd533eac20845ca8731f535233f6a3e6081114d7e3dc7ee8367ded16f402ef05ad0bf1217a3a6224161c92b9467023e44fc7f3598a314a432 ocaml-base64-3.5.0.tar.bz2 "