aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-biniou/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-biniou/APKBUILD')
-rw-r--r--testing/ocaml-biniou/APKBUILD66
1 files changed, 46 insertions, 20 deletions
diff --git a/testing/ocaml-biniou/APKBUILD b/testing/ocaml-biniou/APKBUILD
index 37edc8dd146..79a3a58f6f9 100644
--- a/testing/ocaml-biniou/APKBUILD
+++ b/testing/ocaml-biniou/APKBUILD
@@ -1,54 +1,80 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=ocaml-biniou
_pkgname=biniou
pkgver=1.2.1
-pkgrel=0
+pkgrel=5
pkgdesc="Extensible binary data format, like JSON but faster"
url="https://github.com/ocaml-community/biniou"
-arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport
+arch="all !riscv64 !loongarch64" # ocaml
license="BSD-3-Clause"
-depends="ocaml-runtime ocaml-easy-format"
depends_dev="$pkgname=$pkgver-r$pkgrel"
-makedepends="dune ocaml ocaml-easy-format-dev ocaml-findlib opam"
+makedepends="dune ocaml ocaml-easy-format-dev ocaml-findlib"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/mjambon/$_pkgname/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-community/biniou/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
build() {
- jbuilder build @install
+ export OCAMLPATH=/usr/lib/ocaml
+ dune build @install
}
check() {
- jbuilder runtest
+ dune runtest
}
package() {
- mkdir -p "$pkgdir"/usr/lib/ocaml
- jbuilder install \
+ dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml
# There's just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc
-
- # Remove annotation files and sources.
- cd "$pkgdir"/usr/lib/ocaml/$_pkgname
- rm -f *.cmt* *.ml
}
dev() {
- local sitelib="usr/lib/ocaml/$_pkgname"
default_dev
- mkdir -p "$subpkgdir"/$sitelib
+ 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"
+}
- mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+scan_python3_dependency() {
+ local controldir="$2" datadir="$3"
- cd "$pkgdir"/$sitelib
- mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+ ocaml4-abuild-find requires \
+ "$datadir"/usr/lib/ocaml \
+ "$controldir"
}
-sha512sums="f0166666559f3a767fdc6987bad45ec4a772b70b8880b6d769ef644c9bfd46962f089c7b5dfff368413015e765daf4bacffe253bdb3478d9a4d30a15f0d29589 ocaml-biniou-1.2.1.tar.gz"
+sha512sums="
+f0166666559f3a767fdc6987bad45ec4a772b70b8880b6d769ef644c9bfd46962f089c7b5dfff368413015e765daf4bacffe253bdb3478d9a4d30a15f0d29589 ocaml-biniou-1.2.1.tar.gz
+"