aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-bos/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-bos/APKBUILD')
-rw-r--r--testing/ocaml-bos/APKBUILD91
1 files changed, 91 insertions, 0 deletions
diff --git a/testing/ocaml-bos/APKBUILD b/testing/ocaml-bos/APKBUILD
new file mode 100644
index 00000000000..0e0859abc27
--- /dev/null
+++ b/testing/ocaml-bos/APKBUILD
@@ -0,0 +1,91 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-bos
+_pkgname=bos
+pkgver=0.2.1
+pkgrel=2
+pkgdesc="Basic OS interaction for OCaml"
+url="https://erratique.ch/software/bos"
+arch="all !riscv64 !loongarch64" # ocaml
+license="ISC"
+depends_dev="
+ $pkgname=$pkgver-r$pkgrel
+ ocaml-astring-dev
+ ocaml-fmt-dev
+ ocaml-fpath-dev
+ ocaml-logs-dev
+ ocaml-rresult-dev
+ "
+makedepends="
+ $depends_dev
+ ocaml
+ ocamlbuild
+ ocaml-compiler-libs
+ ocaml-findlib
+ ocaml-topkg
+ cmd:opam-installer
+ "
+checkdepends="ocaml-mtime-dev"
+options="!check"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/bos/releases/bos-$pkgver.tbz"
+builddir="$srcdir/$_pkgname-$pkgver"
+_ocamldir=usr/lib/ocaml
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+ ocaml pkg/pkg.ml build
+}
+
+package() {
+ opam-installer -i \
+ --prefix="$pkgdir"/usr \
+ --libdir="$pkgdir/$_ocamldir" \
+ --docdir="$builddir"/.omit \
+ $_pkgname.install
+}
+
+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="
+8daeb8a4c2dd1f2460f6274ada19f4f1b6ebe875ff83a938c93418ce0e6bdb74b8afc5c9a7d410c1c9df2dad030e4fa276b6ed2da580639484e8b5bc92610b1d ocaml-bos-0.2.1.tar.bz2
+"