blob: eb58f7816a3e8e11a8d0b5c104e92841a66a5a0c (
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
44
45
46
47
48
49
50
51
52
53
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=keepassxc-proxy-static
_projname=keepassxc-proxy-rust
pkgver=0.2.0
pkgrel=0
pkgdesc="A statically linked proxy between Native Messaging browser extension and KeePassXC (for use with Flatpak)"
url="https://github.com/varjolintu/keepassxc-proxy-rust"
# armhf, armv7, riscv64, s390x: fails to build libc crate (SIGSEGV)
arch="all !armhf !armv7 !riscv64 !s390x"
license="GPL-3.0-or-later"
makedepends="cargo"
install="$pkgname.post-install"
source="https://github.com/varjolintu/keepassxc-proxy-rust/archive/$pkgver/$_projname-$pkgver.tar.gz
keepassxc-proxy-install.in
"
builddir="$srcdir/$_projname-$pkgver"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
export RUSTFLAGS="$RUSTFLAGS -C target-feature=+crt-static"
prepare() {
default_prepare
sed "s/@@VERSION@@/$pkgver/" "$srcdir"/keepassxc-proxy-install.in \
> "$srcdir"/keepassxc-proxy-install
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --frozen --release
}
check() {
local bin='target/release/keepassxc-proxy'
if ! file $bin | grep -Fqw 'static-pie linked'; then
file $bin
error "$bin is not a static binary!"
return 1
fi
}
package() {
install -D -m755 target/release/keepassxc-proxy "$pkgdir"/usr/libexec/keepassxc-proxy.static
install -D -m755 "$srcdir"/keepassxc-proxy-install "$pkgdir"/usr/bin/keepassxc-proxy-install
}
sha512sums="
94c4b8ee05ff39d4a96d72198d620fb5ab088cc03cfab81a273fd7aa3b956e55914d1231a03c64d1d80c72d1674391f4c512b1a2273bddf6b94f3891decd6f41 keepassxc-proxy-rust-0.2.0.tar.gz
3d31ed8d2a430f1e61960990128a9b7277106fcf74c16952ccefdeca3a3ba5cb9e6917d08d801bff1d4d354566689bda8f54d10f3711b03063d01374913c0387 keepassxc-proxy-install.in
"
|