# Maintainer: Luis Martinez pkgname=cork-rs-git pkgver=0.2.4.r0.gb739e78 pkgrel=1 pkgdesc="Command-line calculator for hex-lovers" arch=('x86_64') url="https://github.com/reddocmd/cork" license=('GPL') depends=('gcc-libs') makedepends=('cargo' 'git') provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") source=("$pkgname::git+$url") sha256sums=('SKIP') pkgver() { git -C "$pkgname" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./' } prepare() { cd "$pkgname" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cd "$pkgname" cargo build --release --frozen --all-features } check() { export RUSTUP_TOOLCHAIN=stable cd "$pkgname" cargo test --frozen --all-features } package() { cd "$pkgname" install -D target/release/cork -t "$pkgdir/usr/bin/" install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/" }