summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 88ff1bf807e20ebf3e40ccfe215648a7b94d6704 (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
42
43
44
45
46
# Maintainer: Ayoub Canon <imkonnu@gmail.com>

pkgname=projectable-git
_pkgname=projectable
_bin=prj
pkgver=1.1.0.2.g0f1e053
pkgrel=1
pkgdesc="A TUI file manager built for projects."
arch=('any')
url="https://github.com/dzfrias/projectable"
_git="https://github.com/dzfrias/projectable.git"
license=('MIT')
depends=()
makedepends=('git' 'cargo')
source=("${_pkgname}::git+${_git}")
sha256sums=('SKIP')

pkgver() {
    cd "${_pkgname}"
    git describe --tags | sed 's/-/./g'
}

prepare() {
    cd "$_pkgname"
    export RUSTUP_TOOLCHAIN=stable
    cargo update
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

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

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

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