aports/testing/ocaml-otoml/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

83 lines
1.7 KiB
Text

# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-otoml
pkgver=1.0.5
pkgrel=0
_pkgreal=otoml
pkgdesc="TOML parsing, manipulation, and pretty-printing library"
url="https://github.com/dmbaturin/otoml"
arch="all !riscv64 !loongarch64" # ocaml
license="MIT"
depends_dev="
$pkgname=$pkgver-r$pkgrel
ocaml-menhir-dev
ocaml-uutf-dev
"
makedepends="
$depends_dev
dune
ocaml
ocaml-menhir
"
checkdepends="ocaml-ounit-dev"
subpackages="$pkgname-dev"
source="$_pkgreal-$pkgver.tar.gz::https://github.com/dmbaturin/otoml/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
dune build --release --verbose
}
check() {
dune runtest --build-dir=.testenv --verbose
}
package() {
dune install --destdir="$pkgdir" --docdir=/.omit
}
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="
a287bf40ec7bc1458fa74bf88cd30c2f93e0092f962858fa70acdb0e01978cd187cb1135aef66a5b5775cce31353901516ecdb6822a4c29a0a99f077f30a2149 otoml-1.0.5.tar.gz
"