summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c622d5586783961870f350ed68e984011f5209a9 (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
38
# Maintainer: Kemel Zaidan <kemelzaidan@gmail.com
pkgname=zeitfetch
pkgver=0.1.14
pkgrel=1
pkgdesc="A neofetch implementation in Rust aiming to be near instantaneous, with the least amount of dependencies possible"
arch=('i686' 'x86_64' 'armv6h' 'aarch64')
license=("MIT")
url="https://github.com/nidnogg/zeitfetch"
makedepends=('rust' 'cargo')
depends=('glibc' 'gcc-libs')
conflicts=('zeitfetch-git')
source=("${url}/archive/refs/tags/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('645fc44f8926b1518cf13ad0fc26d4bea20e916aad3a657d4cf615e4a3833ffb')

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

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

check(){
    export RUSTUP_TOOLCHAIN=stable
    cd "${pkgname}-${pkgver}"
    cargo test --frozen --all-features
}

package() {
    cd "${pkgname}-${pkgver}"
    install -Dm0755 -t "${pkgdir}/usr/bin/" "target/release/${pkgname}"
    install -Dm655 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}