# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: namelessjon <jonathan.stott@gmail.com>
# Contributor: Alessio Sergi <asergi at archlinux dot us>

pkgname=libsodium
pkgver=1.0.20
pkgrel=1
pkgdesc="A modern, portable, easy to use crypto library"
arch=(x86_64 powerpc64le powerpc64 powerpc espresso riscv64)
url="https://github.com/jedisct1/libsodium"
license=('custom:ISC')
depends=('glibc')
makedepends=('git')
provides=('libsodium.so')
source=("git+${url}.git?signed#tag=${pkgver}-RELEASE")
sha512sums=('6e3ec8de30e7e027f9705a427e243583b0f2174ad7a2baa5eb9115e4569caa16ed2156f5de939bb797b372a042891be1dd118120dd4ed491c13138f645666215')
validpgpkeys=('54A2B8892CC3D6A597B92B6C210627AABA709FE1') # Frank Denis

build() {
  cd $pkgname

  ./configure --prefix=/usr
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install

  # install license
  install -d -m 755 "$pkgdir/usr/share/licenses/$pkgname"
  install -m 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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