summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c119d0f18e7a8de112d33324a3cbff06c2c71ac (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
# Maintainer: Nikolaos Bezirgiannis

pkgname=blst
pkgver=0.3.11
pkgrel=1
pkgdesc='Multilingual BLS12-381 signature library'
arch=('aarch64' 'x86_64')
url='https://github.com/supranational/blst'
license=('Apache')
depends=('glibc')
source=("https://github.com/supranational/blst/archive/refs/tags/v${pkgver}.tar.gz")
options=('staticlibs')
sha256sums=('d0a6e2a69490cc45f0a531a684a225e56fe22303665157cfa397ba5605447eb9')

build() {
cd "${pkgname}-${pkgver}"
./build.sh -shared
}

package() {
cd "${pkgname}-${pkgver}"
install -Dm755 -t "${pkgdir}/usr/lib" libblst.so
install -Dm644 -t "${pkgdir}/usr/lib" libblst.a
install -Dm644 -t "${pkgdir}/usr/include" bindings/*.h
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

mkdir -p ${pkgdir}/usr/lib/pkgconfig
cat <<EOF > ${pkgdir}/usr/lib/pkgconfig/libblst.pc
prefix=/usr
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include

Name: libblst
Description: ${pkgdesc}
URL: ${url}
Version: ${pkgver}

Cflags: -I\${includedir}
Libs: -L\${libdir} -lblst
Libs.private:
EOF
}