aports/testing/ocaml-mirage-profile/APKBUILD
Celeste 40ea6c48d7 */*: add maintainer variable for aports i maintain
leaving the Maintainer comment there for better visual cues, syntax highlighting, and easy conversion to a Contributor comment

since Contributor comments are not being removed, just treat my Maintainer comments like Contributor ones, as a normal comment
2024-10-16 16:20:45 +00:00

88 lines
2 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-mirage-profile
_pkgname=mirage-profile
pkgver=0.9.1
pkgrel=3
pkgdesc="Collect runtime profiling information in CTF format"
url="https://github.com/mirage/mirage-profile"
arch="all !riscv64 !loongarch64" # ocaml
license="BSD-2-Clause"
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; find $_ocamldir \( \
-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="
23cc4a2a62f5cc05b48d626bd6c8171a442fd46490da6810b1c507fcd7661c7fcd901d8328cddf687af4144136bf0d34b63f8484e32550077ab63d23e6eaea2b ocaml-mirage-profile-0.9.1.tar.bz2
"