diff --git a/testing/ocaml-mirage-profile/APKBUILD b/testing/ocaml-mirage-profile/APKBUILD new file mode 100644 index 00000000000..cd901b65781 --- /dev/null +++ b/testing/ocaml-mirage-profile/APKBUILD @@ -0,0 +1,75 @@ +# Contributor: rubicon +# Maintainer: +pkgname=ocaml-mirage-profile +_pkgname=mirage-profile +pkgver=0.9.1 +pkgrel=0 +pkgdesc="Collect runtime profiling information in CTF format" +url="https://github.com/mirage/mirage-profile" +arch="all !riscv64" # limited by ocaml aport +license="BSD-2-clause" +depends=" + ocaml-runtime + ocaml-cstruct + ocaml-lwt + ocaml-ocplib-endian + ocaml-mtime + " +depends_dev=" + $pkgname=$pkgver-r$pkgrel + ocaml-cstruct-dev + ocaml-lwt-dev + ocaml-ocplib-endian-dev + ocaml-mtime-dev + " +makedepends="$depends_dev dune ocaml" +options="!check" # needs MProf.Trace.Control module +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/mirage-profile/releases/download/v$pkgver/mirage-profile-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 \ + -p mirage-profile,mirage-profile-unix \ + --verbose +} + +check() { + dune runtest --verbose +} + +package() { + dune install \ + --destdir="$pkgdir" \ + --docdir=/.omit \ + mirage-profile mirage-profile-unix + 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=" +23cc4a2a62f5cc05b48d626bd6c8171a442fd46490da6810b1c507fcd7661c7fcd901d8328cddf687af4144136bf0d34b63f8484e32550077ab63d23e6eaea2b ocaml-mirage-profile-0.9.1.tar.bz2 +"