# Maintainer: bipin kumar pkgname=cramino pkgver=0.14.5 pkgrel=1 pkgdesc='A fast tool for BAM/CRAM quality evaluation of long reads. https://doi.org/10.1093/bioinformatics/btad311' arch=(x86_64) depends=('gcc-libs' 'glibc' 'bzip2') makedepends=('git' 'rust' 'cmake') url='https://github.com/wdecoster/cramino' license=('MIT') options=(!lto) source=(${pkgname}-${pkgver}.tar.gz::https://github.com/wdecoster/cramino/archive/refs/tags/v${pkgver}.tar.gz) sha256sums=('d3b31ab76808ca76171e2539cfe30e66fe24cbd4af4ff9a941c282a0bc438032') prepare() { cd ${pkgname}-${pkgver} export RUSTUP_TOOLCHAIN=stable cargo fetch --target "$CARCH-unknown-linux-gnu" } build() { cd ${pkgname}-${pkgver} export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cargo build --frozen --release --all-features } check() { cd ${pkgname}-${pkgver} export RUSTUP_TOOLCHAIN=stable cargo test --frozen --all-features } package() { cd ${pkgname}-${pkgver} install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" }