mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-18 15:36:59 +02:00
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
79 lines
1.7 KiB
Text
79 lines
1.7 KiB
Text
# Contributor: rubicon <rubicon@mailo.com>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-mmap
|
|
_pkgname=mmap
|
|
pkgver=1.2.0
|
|
pkgrel=3
|
|
pkgdesc="File mapping functionality"
|
|
url="https://github.com/mirage/mmap"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-bigarray-compat-dev"
|
|
makedepends="$depends_dev dune ocaml"
|
|
options="!check"
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/mirage/mmap/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$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; 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="
|
|
cef6c37953d62f2f7472147a03707d60401d92aaf4ddb2dbaa697ee4eee252f70d8068e8fe5c6a36e005d4cc738f61d2c5bea12d844f1e3a696fef2f6546d59c ocaml-mmap-1.2.0.tar.gz
|
|
"
|