From e9da9f9ff9f3dddce2972b5227db975cb916ee5c Mon Sep 17 00:00:00 2001 From: rubicon <5662-rubicon@users.gitlab.alpinelinux.org> Date: Sat, 21 May 2022 15:23:17 +0800 Subject: [PATCH] testing/ocaml-psq: new aport --- testing/ocaml-psq/APKBUILD | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 testing/ocaml-psq/APKBUILD diff --git a/testing/ocaml-psq/APKBUILD b/testing/ocaml-psq/APKBUILD new file mode 100644 index 00000000000..e24de17d8c6 --- /dev/null +++ b/testing/ocaml-psq/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: rubicon +# Maintainer: +pkgname=ocaml-psq +_pkgname=psq +pkgver=0.2.0 +pkgrel=0 +pkgdesc="Functional Priority Search Queues" +url="https://github.com/pqwy/psq" +arch="all !riscv64" # limited by ocaml aport +license="ISC" +depends="ocaml-runtime ocaml-seq" +depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-seq-dev" +makedepends="dune ocaml" +checkdepends="ocaml-alcotest-dev ocaml-qcheck-alcotest-dev ocaml-qcheck-core-dev" +options="!check" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://github.com/pqwy/psq/releases/download/v$pkgver/psq-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 --release --verbose +} + +check() { + dune runtest --verbose +} + +package() { + dune install \ + --destdir="$pkgdir" \ + --docdir=/.omit + 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=" +0c570c5fc2bb2348b1ec03507abb4f152673a5d8f92c388c4cd5b7fc43a6e8f514007dbf4fb613503c4e8d5c8d3210b24ac37c546c79d94ebdf6b482e5cde024 ocaml-psq-0.2.0.tar.bz2 +"