# Contributor: alpine-mips-patches # Maintainer: alpine-mips-patches pkgname=ocaml-num _pkgname=num pkgver=1.3 pkgrel=0 pkgdesc="Arbitray-precision rational arithmetic for OCaml" url="https://github.com/ocaml/num" arch="aarch64 ppc64le x86_64" # reflect ocaml aport platforms license="LGPL-2.1-or-later-WITH-linking-exception-AND-MIT" depends="ocaml-runtime" makedepends="ocaml ocaml-compiler-libs ocaml-findlib" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/$_pkgname/archive/v$pkgver.tar.gz " builddir="$srcdir/$_pkgname-$pkgver" build() { make } check() { make test } package() { local _libdir="usr/lib/ocaml" mkdir -p "$pkgdir/$_libdir" OCAMLFIND_DESTDIR="$pkgdir/$_libdir" \ OCAMLFIND_LDCONF="ignore" \ make DESTDIR="$pkgdir" findlib-install # drop temporary files find "$pkgdir/$_libdir" -name '*.cmti' -delete # move dllnums.so into standard shared stublibs dir local _numdir="$_libdir/$_pkgname" mkdir -p "$pkgdir/$_libdir/stublibs" mv "$pkgdir/$_numdir/"dll*.so "$pkgdir/$_libdir/stublibs" } dev() { depends="$pkgname=$pkgver-r$pkgrel" pkgdesc="$pkgdesc (development files)" local _numdir="usr/lib/ocaml/$_pkgname" mkdir -p "$subpkgdir/$_numdir" for p in '*.a' '*.cmx' '*.cmxa' '*.mli'; do mv "$pkgdir/$_numdir/"$p "$subpkgdir/$_numdir" done } sha512sums="c88310f8c45700990095e6b2e9abf24c27347711b9abfd1dde75e540fbbfc6a365e6713bd69f66009af305728fcb36dc61eb37fdd0be7d73824b0e92fbe8c031 ocaml-num-1.3.tar.gz"