# Maintainer: Baptiste Jonglez <archlinux at bitsofnetworks dot org>

pkgname=ocaml-num
pkgver=1.2
pkgrel=3
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')
source=($pkgname-$pkgver.tar.gz::https://github.com/ocaml/num/archive/v$pkgver.tar.gz)
sha256sums=('c5023104925ff4a79746509d4d85294d8aafa98da6733e768ae53da0355453de')

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:
