mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
this is a million times faster new only in rust 1.68, and fails on older versions, but we have only latest in aports and don't support anything else, so it's okay.
54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
# 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"
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
|
|
|
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
|
|
"
|