From cf2667ea82e9b62ce9d47c4a5fc8d18d06fdf4e3 Mon Sep 17 00:00:00 2001 From: rubicon <5662-rubicon@users.gitlab.alpinelinux.org> Date: Sat, 21 May 2022 15:23:14 +0800 Subject: [PATCH] testing/ocaml-eqaf: new aport --- testing/ocaml-eqaf/APKBUILD | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 testing/ocaml-eqaf/APKBUILD diff --git a/testing/ocaml-eqaf/APKBUILD b/testing/ocaml-eqaf/APKBUILD new file mode 100644 index 00000000000..3b03d1a69ca --- /dev/null +++ b/testing/ocaml-eqaf/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: rubicon +# Maintainer: +pkgname=ocaml-eqaf +_pkgname=eqaf +pkgver=0.8 +pkgrel=0 +pkgdesc="Constant-time equal function on string" +url="https://github.com/mirage/eqaf" +arch="all !riscv64" # limited by ocaml aport +license="MIT" +depends="ocaml-runtime ocaml-cstruct" +depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-cstruct-dev" +makedepends="$depends_dev dune ocaml" +checkdepends="ocaml-alcotest-dev ocaml-base64-dev ocaml-crowbar-dev" +options="!check" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/eqaf/releases/download/v$pkgver/eqaf-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=" +303749bdbaae8fc27f57ebaa5cf9b16ed5b8cbaee35f0a35d69f91a437b1a3411a613d145d3aff7ff74a587509d877cc0a569fdae4d00cec65bf50d705361e25 ocaml-eqaf-0.8.tar.bz2 +"