summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 34983ef6428354a0d949bda1428dcb15d4dec701 (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
# Maintainer: Luis Martinez
# Credit: desbma
pkgname=zoxide-git
_pkgname=zoxide
pkgver=0.5.0.r3.g21018d5
pkgrel=1
pkgdesc='A fast cd command that learns your habits'
arch=('x86_64')
url="https://github.com/ajeetdsouza/${_pkgname}"
license=('MIT')
makedepends=('rust' 'git')
provides=('zoxide')
conflicts=('zoxide' 'zoxide-bin')
source=("${pkgname}::git+${url}")
sha512sums=('SKIP')

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

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

package() {
    cd "${pkgname}"
    install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/${_pkgname}
    install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}