upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / sequoia-sq / trunk / PKGBUILD
blob85f030f90f662e7a476ec4ac7da3149e955d3752
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: David Runge <dvzrv@archlinux.org>
4 pkgname=sequoia-sq
5 pkgver=0.30.0
6 _commit=2f3f75e8c2117ae2ff118219dc7a118eb8f52b0b  # refs/tags/v0.30.0
7 pkgrel=2
8 pkgdesc='Command-line frontends for Sequoia'
9 url='https://sequoia-pgp.org/'
10 arch=('x86_64')
11 license=('GPL2')
12 groups=('sequoia')
13 replaces=('sequoia')
14 depends=(
15   'bzip2' 'libbz2.so'
16   'gcc-libs'
17   'glibc'
18   'gmp'
19   'nettle' 'libnettle.so' 'libhogweed.so'
20   'openssl'
21   'sqlite'
23 makedepends=(
24   'git'
25   'cargo'
26   'clang'
28 options=('!lto')
29 source=("git+https://gitlab.com/sequoia-pgp/sequoia-sq.git#tag=$_commit?signed")
30 sha512sums=('SKIP')
31 validpgpkeys=(
32   D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD # justus@sequoia-pgp.org
33   CBCD8F030588653EEDD7E2659B7DD433F254904A # justus@sequoia-pgp.org
34   8F17777118A33DDA9BA48E62AACB3243630052D9  # Neal H. Walfield <neal@sequoia-pgp.org>
37 prepare() {
38   cd $pkgname
39   export RUSTUP_TOOLCHAIN=stable
40   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
43 build() {
44   cd $pkgname
45   export CARGO_TARGET_DIR=../target
46   export RUSTUP_TOOLCHAIN=stable
47   # NOTE: we select specific (default) features, as there are multiple crypto backends
48   cargo build --release --frozen --features 'default'
52 check() {
53   cd $pkgname
54   # NOTE: we use a different target dir, as otherwise cargo test --release alters the sq binary
55   # https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/96
56   export CARGO_TARGET_DIR=../target-test
57   export RUSTUP_TOOLCHAIN=stable
58   cargo test --release --frozen --features 'default'
61 package() {
62   install -Dm 755 target/release/sq -t "${pkgdir}/usr/bin"
64   install -Dm 644 target/sq.bash "${pkgdir}/usr/share/bash-completion/completions/sq"
65   install -Dm 644 target/_sq -t "${pkgdir}/usr/share/zsh/site-functions"
66   install -Dm 644 target/sq.fish -t "${pkgdir}/usr/share/fish/vendor_completions.d"
68   for manpage in target/release/build/$pkgname-*/out/*.1; do
69     install -Dm 644 $manpage -t "${pkgdir}/usr/share/man/man1/"
70   done
73 # vim: ts=2 sw=2 et: