summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f9849fd15dd34665573841219302a6289e6dd3fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Noah Rahimzadagan <noah.rahimzadagan@protonmail.com>
pkgname=byteblitz
pkgver=1.0.0  
pkgrel=9
pkgdesc="A CLI tool for viewing the binary content of files."
url='https://github.com/noahra/byteblitz'
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
sha256sums=('2f381a90410c7f5f1b36e7220bbeaa777d739c68b4212253584d62c1105bac0f')  
arch=('x86_64')  
license=('GPL3')
makedepends=('cargo')  


prepare() {
    cd $pkgname-$pkgver
    export RUSTUP_TOOLCHAIN=stable
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

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"
}