summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13e23896749d52d5e6de5dd1c2c5b426f3142d73 (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: Mjoyufull <https://github.com/Mjoyufull>

pkgname=fsel-git
pkgver=2.0.0.r0.g160ae55
pkgrel=2
pkgdesc="Fast TUI app launcher and fuzzy finder for GNU/Linux and *BSD (git version)"
arch=('x86_64')
url="https://github.com/Mjoyufull/fsel"
license=('BSD-2-Clause')
depends=()
makedepends=('cargo' 'git')
optdepends=(
    'chafa: image previews in clipboard mode'
    'cclip: clipboard history'
)
provides=('fsel')
conflicts=('fsel')
source=("$pkgname::git+https://github.com/Mjoyufull/fsel.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

check() {
    cd "$pkgname"
    cargo test --release --locked
}

package() {
    cd "$pkgname"
    
    # Install binary
    install -Dm755 "target/release/fsel" "$pkgdir/usr/bin/fsel"
    
    # Install license
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}