# Maintainer: Luis Aranguren # Contributor: Nicola Squartini pkgname=core-lightning-git pkgver=23.08.r13576.990096f90 pkgrel=1 pkgdesc='A lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.' arch=('i686' 'x86_64') url='https://github.com/ElementsProject/lightning' license=('custom') depends=('gmp' 'libsodium' 'sqlite' 'python-grpcio-tools' 'python-flask' 'python-json5' 'gunicorn' 'python-flask-restx') makedepends=('clang' 'git' 'python-pytest' 'python-mako' 'mrkd' 'python-poetry') provides=('python-pyln-client') source=('git+https://github.com/ElementsProject/lightning.git' 'git+https://github.com/zserge/jsmn.git' 'git+https://github.com/ianlancetaylor/libbacktrace.git' 'git+https://github.com/jedisct1/libsodium.git' 'git+https://github.com/ElementsProject/libwally-core.git') sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') pkgver() { cd lightning _tag=$(git tag --list --sort=taggerdate | tail -n1 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') printf $_tag; printf ".r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } prepare() { cd lightning sed -e 's/ -Werror//' -i configure } build() { cd lightning env CC=clang \ COPTFLAGS="${CFLAGS}" \ PYTEST=pytest ./configure --prefix=/usr make LDFLAGS="${LDFLAGS}" libexecdir=/usr/lib cd contrib/pyln-client python -m poetry build --format wheel } package() { cd lightning make DESTDIR="${pkgdir}" libexecdir=/usr/lib install install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE python -m installer --destdir="$pkgdir" contrib/pyln-client/dist/*.whl }