mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-10 14:24:06 +02:00
57 lines
1.4 KiB
Text
57 lines
1.4 KiB
Text
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=opam-monorepo
|
|
pkgver=0.4.2
|
|
pkgrel=0
|
|
pkgdesc="Opam plugin that assembles a self-contained Dune workspace based on a precise lock file"
|
|
url="https://github.com/tarides/opam-monorepo"
|
|
arch="all"
|
|
license="ISC"
|
|
depends="opam"
|
|
makedepends="dune ocaml-compiler-libs"
|
|
checkdepends="git rsync"
|
|
subpackages="$pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.bz2::https://github.com/tarides/opam-monorepo/releases/download/$pkgver/opam-monorepo-$pkgver.tbz"
|
|
|
|
case "$CARCH" in
|
|
riscv64|loongarch64)
|
|
makedepends="${makedepends//ocaml/ocaml5}"
|
|
;;
|
|
esac
|
|
|
|
export OPAMROOT="${OPAMROOT:-"$srcdir/opam-root"}"
|
|
export OPAMLOGS="${OPAMLOGS:-"$srcdir/opam-logs"}"
|
|
|
|
_opam_opts="-v -y --cli=2.2 --no-self-upgrade"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
if want_check && [ ! -f "$OPAMROOT"/config ]; then
|
|
opam init $_opam_opts \
|
|
--compiler=ocaml-system \
|
|
--disable-sandboxing \
|
|
--no-setup
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
dune build --release --verbose
|
|
}
|
|
|
|
check() {
|
|
export GIT_AUTHOR_NAME="test"
|
|
export GIT_COMMITTER_NAME="test"
|
|
export GIT_AUTHOR_EMAIL="test@example.com"
|
|
export GIT_COMMITTER_EMAIL="test@example.com"
|
|
|
|
dune runtest --build-dir=.testenv
|
|
}
|
|
|
|
package() {
|
|
dune install --destdir="$pkgdir"
|
|
}
|
|
|
|
sha512sums="
|
|
40e6ac5f66fabdf7f1dd997dcdc7b25c188274e8d51b8fea5631c19252bcd742ab64e554b10e9631ba1ff49961f59bb76c8d67cba0e03d6ec5ada5b9fefa3be9 opam-monorepo-0.4.2.tar.bz2
|
|
"
|