2023-04-01 16:39:15 +02:00

63 lines
1.4 KiB
Plaintext

# Contributor: Andy Li <andy@onthewings.net>
# Maintainer: Andy Li <andy@onthewings.net>
pkgname=ocaml-qtest
_pkgname=qtest
pkgver=2.11.2
pkgrel=2
pkgdesc="Lightweight inline test extraction from comments"
url="https://github.com/vincent-hugot/qtest"
arch="all !riscv64" # limited by ocaml aport
license="GPL-3.0-or-later"
depends="ocaml-runtime ocaml-qcheck"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="dune ocaml ocaml-findlib ocaml-qcheck-dev ocaml-ounit-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/vincent-hugot/qtest/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
export OCAMLPATH=/usr/lib/ocaml
dune build @install --no-buffer --verbose
}
check() {
dune runtest --verbose
}
package() {
dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml
# There's just a README and LICENSE.
rm -Rf "$pkgdir"/usr/doc
}
dev() {
default_dev
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
}
sha512sums="
3edb8471b29c9eb2f6ba11b157abf7ca43ef965d4b1500aaaf1acaeb261972a61c9b104887ada6ca63dc85e06b1d27e34f391885b2fbeb7ea5646323d3be08d0 ocaml-qtest-2.11.2.tar.gz
"