summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c41790601f34521b60d33d0d54af57f31a64a4b1 (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=v0.4.3.r17.geaf63bc
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 | sed '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"
}