# Maintainer: Konstantin Gizdov <arch at kge dot pw>
# Contributor: Baptiste Jonglez <archlinux at bitsofnetworks dot org>

pkgname=ocaml-num
pkgver=1.5
pkgrel=4
pkgdesc="Library for arbitrary-precision integer and rational arithmetic that used to be part of the OCaml core distribution"
arch=('x86_64')
url="https://github.com/ocaml/num"
license=('LGPL2.1')
depends=('ocaml')
makedepends=('ocaml-findlib')
options=('!strip' '!makeflags' '!debug')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ocaml/num/archive/v${pkgver}.tar.gz")
sha512sums=('110dd01140c1c96f5f067aa824bb63f74a26411dcaa65aaf04cb6c44b116ca02aaab9505f431c66964388ce4a31d86da5928b4c0e5557800e834de80bed46495')

build() {
  cd "${srcdir}/num-${pkgver}"
  make
}

package() {
  cd "${srcdir}/num-${pkgver}"

  local _destdir="${pkgdir}$(ocamlfind printconf destdir)"
  install -d "${_destdir}/stublibs"

  make OCAMLFIND_DESTDIR="${_destdir}" findlib-install
}

# vim:set ts=2 sw=2 et:
