File PKGBUILD of Package hourglass

# Maintainer: Alxhr0 <alxhr0@proton.me>
pkgname=hourglass
pkgver=1.3.7
pkgrel=0
pkgdesc="Install age tool made in Rust"
arch=('x86_64')
url="https://gitlab.com/Alxhr0/hourglass"
license=('GPL')
makedepends=("gcc" "make" "rust")
provides=("hourglass")
conflicts=("hourglass-git")
source=("${pkgname}_${pkgver}.tar.xz" "cargo_config.tar.gz")
md5sums=("4319d4916acd84548e49371d17115908" "63e9f0c2f0b903f346bcbb1199e6d23c")

prepare() {
    cd "$pkgname-$pkgver"
    install -D -m 644 ../cargo_config .cargo/config.toml
}

build() {
    cd "$pkgname-$pkgver"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --offline --release
}

package() {
    cd "$pkgname-$pkgver"
    install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
}
openSUSE Build Service is sponsored by