archrelease: copy trunk to community-any
[ArchLinux/community.git] / libsecp256k1 / trunk / PKGBUILD
blob71e9e62b607dd54931b69dc294982fe34e8a3f01
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Maintainer: Baptiste Jonglez <archlinux at bitsofnetworks dot org>
3 # Contributor: Andy Weidenbaum <archbaum@gmail.com>
5 pkgname=libsecp256k1
6 _gitcommit=43756da819a235d813e7ecd53eae6df073b53247
7 pkgver=20220630+1625+g43756da
8 pkgrel=1
9 pkgdesc="Optimized C library for EC operations on curve secp256k1"
10 arch=(x86_64)
11 url="https://github.com/bitcoin-core/secp256k1"
12 license=(MIT)
13 depends=(glibc)
14 source=(${url}/archive/${_gitcommit}/${pkgname}-${pkgver}.tar.gz)
15 sha256sums=('e189c22c3e2acda8e4765ba505c3b2f683bbc9fa551672fe004c925f930ae892')
17 prepare() {
18   cd secp256k1-${_gitcommit}
19   autoreconf -vfi
22 build() {
23   cd secp256k1-${_gitcommit}
24   ./configure \
25     --prefix=/usr \
26     --sbindir=/usr/bin \
27     --libexecdir=/usr/bin \
28     --sysconfdir=/etc \
29     --sharedstatedir=/usr/share/libsecp256k1 \
30     --localstatedir=/var/lib/libsecp256k1 \
31     --disable-static \
32     --disable-benchmark \
33     --disable-coverage \
34     --enable-module-ecdh \
35     --enable-module-recovery \
36     --enable-tests \
37     --enable-exhaustive-tests \
38     --with-gnu-ld
39   make
42 check() {
43   cd secp256k1-${_gitcommit}
44   make check
47 package() {
48   cd secp256k1-${_gitcommit}
49   make DESTDIR="${pkgdir}" install
50   install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}