summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68788ff275eb072314f0757d4b7714a1ffc6bb99 (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
47
48
# Maintainer: Diego Frias <styx5242@gmail.com>
# Maintainer: Absobel <imkonnu@gmail.com>

pkgname=projectable-git
_pkgname=projectable
_bin=prj
pkgver=1.3.0.9.gcd26095
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
}

# The tests are way too long on top of a long build time
#check() {
#    cd "$_pkgname"
#    export RUSTUP_TOOLCHAIN=stable
#    cargo test --frozen --all-features
#}

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