summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee442c719a3b3ce49b40adad40d900cc5c717149 (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
39
40
41
# Maintainer: tkirishima <tkirishima[at]proton[dot]me>
pkgname=hbd
pkgver=0.1.0
pkgrel=3
pkgdesc="A command-line tool to remember birthdays easily!"
arch=('any')
url="https://github.com/tkr-sh/hbd"
license=('GPL-3.0-or-later')
makedepends=(cargo)

source=(
    "${pkgname}::git+$url.git"
)


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

build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cd "${srcdir}/${pkgname}"
    cargo build --frozen --release
}


check() {
    export RUSTUP_TOOLCHAIN=stable
    cd "${srcdir}/${pkgname}"
    cargo test
    target/release/hbd get
}

package() {
    cd "${srcdir}/${pkgname}"
    install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}
sha256sums=('SKIP')