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

pkgname=libsodium
pkgver=%version%
pkgrel=%release%
pkgdesc="A modern, portable, easy to use crypto library"
arch=('x86_64')
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=('SKIP')
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:
