# Maintainer: Your Name pkgname=teapot-tools _pkgname=teapot_tools pkgver=0.4.2 pkgrel=1 pkgdesc="Reimplementation of gclient from depot_tools and cipd from luci-go in Rust (or as some may call it, Python with extra steps)." arch=("any") url="https://crates.io/crates/teapot_tools" license=('Apache-2.0') depends=("python" "git") makedepends=("cargo" "protobuf") source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$_pkgname/$_pkgname-$pkgver.crate") sha256sums=('b0b1409097378a5f1634dcf00c23bdf2f2ddfbb4aedf2ea0ce04d90232cfec3b') prepare() { export RUSTUP_TOOLCHAIN=stable cd $_pkgname-$pkgver cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cd $_pkgname-$pkgver cargo build --frozen --release --all-features } check() { export RUSTUP_TOOLCHAIN=stable cd $_pkgname-$pkgver cargo test --frozen --all-features } package() { cd $_pkgname-$pkgver find target/release \ -maxdepth 1 \ -executable \ -type f \ -exec install -Dm0755 -t "$pkgdir/usr/bin/" {} + }