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

92 lines
2.1 KiB
Text

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-mirage-crypto
_pkgname=mirage-crypto
pkgver=0.10.6
pkgrel=3
pkgdesc="Simple symmetric cryptography for the modern age"
url="https://github.com/mirage/mirage-crypto"
arch="all !riscv64 !loongarch64" # ocaml
license="ISC"
# ocaml-zarith is not separated into a -dev subpackage
depends_dev="
$pkgname=$pkgver-r$pkgrel
ocaml-cstruct-dev
ocaml-duration-dev
ocaml-eqaf-dev
ocaml-logs-dev
ocaml-mtime-dev
ocaml-zarith
"
makedepends="$depends_dev dune dune-configurator ocaml"
checkdepends="ocaml-ounit2-dev"
options="!check"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.bz2::https://github.com/mirage/mirage-crypto/releases/download/v$pkgver/mirage-crypto-$pkgver.tbz"
builddir="$srcdir/$_pkgname-$pkgver"
_ocamldir=usr/lib/ocaml
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
dune build \
-p mirage-crypto,mirage-crypto-ec,mirage-crypto-pk,mirage-crypto-rng \
--verbose
}
check() {
dune runtest --verbose
}
package() {
dune install \
--destdir="$pkgdir" \
--docdir=/.omit \
mirage-crypto mirage-crypto-ec mirage-crypto-pk mirage-crypto-rng
rm -Rf "$pkgdir"/.omit
}
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="
870b7d0d32acde970afcd3fac2cb51131ac74bb20c887d07ddfccd239467a5dc8b700adf463427fa916393c503f106feb733cba5bf4b9d1f8eb57f52b5af9f9c ocaml-mirage-crypto-0.10.6.tar.bz2
"