# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>

pkgname=minisign
pkgver=0.11
pkgrel=3.1
pkgdesc="A dead-simple tool to sign files and verify digital signatures"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/jedisct1/minisign"
license=('custom:ISC')
depends=('libsodium')
makedepends=('cmake' 'git')
source=("git+https://github.com/jedisct1/minisign.git?signed#tag=$pkgver")
sha512sums=('1f02e0adcdc10e700ff90856f50ad29ba9a6bb36eb99d697dc3fba4a90f5de0bb2e85df9c0d343b6ca6345f1ba380989bf248a254d50af9ab5a5119674d7f018')
validpgpkeys=(54A2B8892CC3D6A597B92B6C210627AABA709FE1) # Frank Denis

build() {
  cmake -B build -S $pkgname \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None \
    -Wno-dev
  cmake --build build
}

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

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