# Contributor: Jakub Jirutka # Maintainer: pkgname=bupstash pkgver=0.12.0 pkgrel=3 pkgdesc="Easy and efficient encrypted backups" url="https://bupstash.io/" # armhf,armv7,x86: sodium bindgen test fails # s390x: fails to build nix crate arch="all !armhf !armv7 !s390x !x86" license="MIT" makedepends=" cargo cargo-auditable libsodium-dev lz4-dev sqlite-dev zstd-dev " options="net" source="$pkgname-$pkgver.tar.gz::https://github.com/andrewchambers/bupstash/archive/v$pkgver.tar.gz regex-features.patch unbundle-sqlite.patch " _cargo_opts="--no-default-features --frozen" prepare() { default_prepare # Rust target triple. local target=$(rustc -vV | sed -n 's/host: //p') # Build against system-provided lz4 and zstd. mkdir -p .cargo cat >> .cargo/config.toml <<-EOF [target.$target] lz4 = { rustc-link-lib = ["lz4"] } zstd = { rustc-link-lib = ["zstd"] } EOF cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build $_cargo_opts --release } check() { cargo test $_cargo_opts } package() { install -Dm755 target/release/bupstash -t "$pkgdir"/usr/bin/ } sha512sums=" a1fb8af217dcca4322bceb6286379096586c0b7359d7e794d8f8b2890dc2a3ee8cc8baace15b42a3466dedc83ed12443bb24931d817cb06702e62f5e46ff33f8 bupstash-0.12.0.tar.gz c10c8dd9ddd17d53a730da07d2eb1595e9924ed4ec50aaf55db30e197f8cc77ca76194bfb4a04808db4be53789ba2eead3b0a23625e662911e38cb82ca730b34 regex-features.patch 9963dee4793d2c365ad05d0141dd7b28ddb4098d1b9b60561d6f3f05401dbdbb581b6a89e0d63ec0f5167a4e8478390eff6e3380581867d1dfe0ed2074449870 unbundle-sqlite.patch "