summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d08ee0a25120491680424dc487091defd6c89eba (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
# Maintainer: Jonas Riedel <jonasriedel@protonmail.com>

pkgname=rustyfetch
pkgver=0.2.0
pkgdesc="Fetch stuff with Rust!"
pkgrel=1
arch=('x86_64')
url="https://github.com/jonasrdl/rustyfetch"
license=('MPL-2.0')
makedepends=('cargo')
source=("${pkgname}-${pkgver}.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
sha512sums=('SKIP')

build(){
        export RUSTUP_TOOLCHAIN=stable
        export CARGO_TARGET_DIR=target
        # use cargo to build from a tagged release
        cd "${srcdir}/${pkgname}-${pkgver}"
        cargo build --release --all-features
        cd -
}

package(){
        # install executable
        install -Dm755 "${srcdir}/${pkgname}-${pkgver}/target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}