# Maintainer: Violet Iapalucci

pkgname='silico-calculator'
pkgver=0.1.1
pkgrel=1
pkgdesc='A dead simple, Windows-like calculator available on all major operating systems and desktop environments.'
url='https://github.com/silico-apps/calculator'
license=('LGPL-3.0')
makedepends=('cargo')
depends=()
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=()
b2sums=()

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

build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

check() {
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
}

