Skip to content
Snippets Groups Projects
PKGBUILD 1006 B
Newer Older
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>

pkgname=argon2
Christian Hesse's avatar
Christian Hesse committed
pkgver=20190702
Christian Hesse's avatar
Christian Hesse committed
pkgrel=5
pkgdesc='A password-hashing function (reference C implementation)'
arch=('x86_64')
url='https://github.com/P-H-C/phc-winner-argon2'
license=('Apache' 'custom:CC0')
depends=('glibc')
Christian Hesse's avatar
Christian Hesse committed
provides=('libargon2.so')
Christian Hesse's avatar
Christian Hesse committed
source=("https://github.com/P-H-C/phc-winner-argon2/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c')

build() {
  cd "$srcdir/phc-winner-$pkgname-$pkgver"

  make ARGON2_VERSION="${pkgver}" OPTTARGET='none' LIBRARY_REL='lib'
}

check() {
  cd "$srcdir/phc-winner-$pkgname-$pkgver"

  make ARGON2_VERSION="${pkgver}" OPTTARGET='none' LIBRARY_REL='lib' test
}

package() {
  cd "$srcdir/phc-winner-$pkgname-$pkgver"

  make ARGON2_VERSION="${pkgver}" OPTTARGET='none' LIBRARY_REL='lib' DESTDIR="$pkgdir" install

  install -D -m0644 LICENSE "${pkgdir}/usr/share/licenses/argon2/LICENSE"
}

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