# Maintainer:
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: suasageandeggs <s_stoakley@hotmail.co.uk>
# Contributor: Michael Fellinger <manveru@www.weez-int.com>

pkgname=libtommath
pkgver=1.3.0
pkgrel=2
pkgdesc='Highly optimized and portable routines for integer based number theoretic applications'
arch=(x86_64 aarch64)
url='https://www.libtom.net/'
license=(Unlicense)
depends=(glibc)
makedepends=(git)
source=("$pkgname::git+https://github.com/libtom/libtommath#tag=v$pkgver")
sha512sums=('5205f1c95343bc405d60c519b6dde905f6b1136a46d944d02e672e3a7097b527fb5261562d79495cca7e45efb2739c4636a8e2841ea5a9f2ab7f328237ee7510')
b2sums=('65472e276a6d0ef51bed3fc669c545ae02ef27906b0eca0f9a614ac14c132a04d63ff6bb7873c7b6fbe343d2a92120aa6191c67973de0f82b0aac889f46953da')

build() {
  cd "$pkgname"

  make -f makefile.shared IGNORE_SPEED=1
}

package() {
  cd "$pkgname"

  make -f makefile.shared PREFIX=/usr DESTDIR="$pkgdir" INSTALL_GROUP=root install

  # license
  #install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
