rubicon e1420fa140 testing/ocaml-*: standardize how source artifacts (.cmt, .cmti, .mli, .ml files) are handled
They are no longer deleted, but instead moved to the -dev subpackages. This allows dev tools
like Merlin to use them: http://rgrinberg.com/posts/opam-package-checklist/#omitting-bin-annot
2022-05-13 23:23:17 +00:00

63 lines
1.3 KiB
Plaintext

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-seq
_pkgname=seq
pkgver=0.2.2
pkgrel=1
pkgdesc="Compatibility package for the standard OCaml iterator type"
url="https://github.com/c-cube/seq"
arch="all !riscv64" # limited by ocaml aport
license="LGPL-2.1-only"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="dune ocaml ocaml-findlib"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/c-cube/seq/archive/$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
}
check() {
dune runtest
}
package() {
dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml
# There's just a readme and changelog.
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="
cab0eb4cb6d9788b7cbd7acbefefc15689d706c97ff7f75dd97faf3c21e466af4d0ff110541a24729db587e7172b1a30a3c2967e17ec2e49cbd923360052c07c ocaml-seq-0.2.2.tar.gz
"