# Contributor: tcely # Maintainer: tcely _project="sequoia" pkgname="${_project}-sqv" pkgver="0.7.0" pkgrel=0 pkgdesc="A simple signature verification program" url="https://sequoia-pgp.org/" arch="x86_64" # limited by cargo license="GPL-3.0-or-later" depends="" makedepends="capnproto-dev cargo clang-dev nettle-dev openssl-dev py3-cffi py3-pytest py3-setuptools python3-dev sqlite-dev" install="" subpackages="" source="https://gitlab.com/${_project}-pgp/${_project}/-/archive/v${pkgver}/${_project}-v${pkgver}.tar.gz Cargo.lock " builddir="$srcdir/${_project}-v${pkgver}" _cargo_env() { cd "$builddir" CARGO_TARGET_DIR="$PWD/target" export CARGO_TARGET_DIR SQV="$CARGO_TARGET_DIR/release/sqv" export SQV } build() { _cargo_env # Detect mismatching versions from upstream sed -i.orig -e '/^version =/s/=.*$/= "'"$pkgver"'"/' sqv/Cargo.toml diff -us sqv/Cargo.toml.orig sqv/Cargo.toml diff -us "$builddir/Cargo.lock" "$srcdir/Cargo.lock" install -m 00644 "$srcdir/Cargo.lock" "$builddir/Cargo.lock" make -C sqv build-release CARGO_FLAGS='--locked' } check() { _cargo_env cd sqv && cargo test --locked --release --package "$pkgname" "$SQV" --version } package() { _cargo_env make DESTDIR="$pkgdir" -C sqv install } sha512sums="5159b28f9b197beb9b8b8e1b25fb042220abcb29a24b49212cf4e409425d3964cc6494e83d74407288e62ab3c64eedbbba59a6ae75531c32a6b2d0ceb13d372f sequoia-v0.7.0.tar.gz 605f68da8d128c55f44fcba7635ce21f74d706a76fd6adc483943443fc3a772d182095eafdc28b8171b8be8b2e5d79a2d0dc5d683b2f46b439255bab0b44638d Cargo.lock"