mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 09:27:19 +02:00
83 lines
1.8 KiB
Text
83 lines
1.8 KiB
Text
# Contributor: rubicon <rubicon@mailo.com>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-mtime
|
|
_pkgname=mtime
|
|
pkgver=1.4.0
|
|
pkgrel=2
|
|
pkgdesc="Monotonic wall-clock time for OCaml"
|
|
url="https://erratique.ch/software/mtime"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="ISC"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends="
|
|
ocaml
|
|
ocamlbuild
|
|
ocaml-compiler-libs
|
|
ocaml-findlib
|
|
ocaml-topkg
|
|
cmd:opam-installer
|
|
"
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/mtime/releases/mtime-$pkgver.tbz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
_ocamldir=usr/lib/ocaml
|
|
options="!check" # FIXME: run tests if possible!
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
ocaml pkg/pkg.ml build
|
|
}
|
|
|
|
package() {
|
|
opam-installer -i \
|
|
--prefix="$pkgdir"/usr \
|
|
--libdir="$pkgdir/$_ocamldir" \
|
|
--docdir="$builddir"/.omit \
|
|
$_pkgname.install
|
|
}
|
|
|
|
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="
|
|
0492fa5f5187b909fe2b0550363c7dcb8cffef963d51072272ef3d876b51e1ddf8de4c4e221cffb0144658fccf6a0dc584a5c8094a4b2208156e43bad5b269d4 ocaml-mtime-1.4.0.tar.bz2
|
|
"
|