1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 11:15:13 +03:00
aports/testing/android-apkeep/APKBUILD
psykose 39f6fef713 */*: cargo fetch with --target
this does not download deps that won't be used for the default build
target (the ctarget we are building for implicitly).
this makes quite a few fetches faster.. because a ton of crates download
a 10mb "windows-sys" that is never used, amongst other things.

maybe breaks a thing or two.
2023-02-11 16:56:41 +01:00

48 lines
1.2 KiB
Text

# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
pkgname=android-apkeep
pkgver=0.15.0
pkgrel=0
pkgdesc="A command-line tool for downloading Android APK files from various sources"
url="https://github.com/EFForg/apkeep"
# ppc64le, riscv64, s390x: ring crate
arch="all !ppc64le !riscv64 !s390x"
license="MIT"
makedepends="
bzip2-dev
cargo
openssl-dev
zstd-dev
"
source="https://github.com/EFForg/apkeep/archive/refs/tags/$pkgver/apkeep-$pkgver.tar.gz"
options="!check" # no tests
builddir="$srcdir/apkeep-$pkgver"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
# Rust target triple.
local target=$(rustc -vV | sed -n 's/host: //p')
# Build against system-provided libs
mkdir -p .cargo
cat >> .cargo/config.toml <<-EOF
[target.$target]
bzip2 = { rustc-link-lib = ["bz2"] }
zstd = { rustc-link-lib = ["zstd"] }
EOF
}
build() {
cargo build --frozen --release
}
package() {
install -Dm755 target/release/apkeep "$pkgdir"/usr/bin/apkeep
}
sha512sums="
ffc089896a0d223cdbb8534f7e77a86cbc899d3c8200d416f88fdce143e5583403322484b45aa238f27beb5f125f0152d3e6ff678a59f4adba54c4d6d5c6b42a apkeep-0.15.0.tar.gz
"