blob: 531ccfb6e33e7102761bc2214039381a5c1bc7d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
pkgname=argon2
pkgver=20171227
pkgrel=3
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')
install=argon2.install
source=("https://github.com/P-H-C/phc-winner-argon2/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
'libargon2.pc')
sha256sums=('eaea0172c1f4ee4550d1b6c9ce01aab8d1ab66b4207776aa67991eb5872fdcd8'
'4189ce6c183319ceaf2c4ec96facd424deeaa9e2819efb7511893bcf3ef5c836')
prepare() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
# Copy and prepare custom pkg-config file
cp "${srcdir}/libargon2.pc" libargon2.pc
sed -i -e "s/@UPSTREAM_VER@/${pkgver}/" libargon2.pc
}
build() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
make OPTTARGET=none
}
check() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
make OPTTARGET=none test
}
package() {
cd "$srcdir/phc-winner-$pkgname-$pkgver"
make OPTTARGET=none DESTDIR="$pkgdir" install
install -D -m0644 LICENSE "${pkgdir}/usr/share/licenses/argon2/LICENSE"
install -D -m0644 libargon2.pc "${pkgdir}/usr/lib/pkgconfig/libargon2.pc"
}
# vim:set ts=2 sw=2 et:
|