# Template file for 'ocaml-zarith'
pkgname=ocaml-zarith
version=1.13
revision=1
build_style=configure
hostmakedepends="perl"
makedepends="gmp-devel ocaml"
depends="gmp-devel"
short_desc="OCaml operations over arbitrary-precision integers"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
homepage="https://github.com/ocaml/zarith"
distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
nocross=yes
disable_parallel_build=yes

post_configure() {
	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
}
pre_install() {
	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
}
post_install() {
	vcopy META usr/lib/ocaml/zarith
}
do_check() {
	command -v ocamlc.opt >/dev/null || return 0
	make tests
}
