# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=double-conversion
pkgver=%version%
pkgrel=%release%
pkgdesc='Binary-decimal and decimal-binary routines for IEEE doubles'
arch=(x86_64)
url='https://github.com/google/double-conversion'
license=(BSD)
depends=(gcc-libs)
makedepends=(cmake)
source=(https://github.com/google/double-conversion/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('04ec44461850abbf33824da84978043b22554896b552c5fd11a9c5ae4b4d296e')

build() {
  cmake -B build -S $pkgname-$pkgver \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_SHARED_LIBS=ON
  cmake --build build
}

package () {
  DESTDIR="$pkgdir" cmake --install build

  install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
