archrelease: copy trunk to community-any
[ArchLinux/community.git] / zoxide / trunk / PKGBUILD
blobb8d38bb8f2808705cbe0bd30435edafece4413d7
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: desbma
4 pkgname=zoxide
5 pkgver=0.9.1
6 pkgrel=1
7 pkgdesc='A smarter cd command for your terminal'
8 arch=('x86_64')
9 url='https://github.com/ajeetdsouza/zoxide'
10 license=('MIT')
11 depends=('gcc-libs')
12 makedepends=('git' 'rust')
13 optdepends=(
14   'fzf: for interactive selection'
16 options=('!lto')
17 _commit='686d116ad54635d0ea86b69b7a00238ebc0a8bbb'
18 source=("$pkgname::git+$url.git#commit=$_commit")
19 b2sums=('SKIP')
21 pkgver() {
22   cd "$pkgname"
24   git describe --tags | sed 's/^v//'
27 prepare() {
28   cd "$pkgname"
30   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
33 build() {
34   cd "$pkgname"
36   cargo build --frozen --release --all-features
39 package() {
40   cd "$pkgname"
42   # binary
43   install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
45   # license
46   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
48   # man pages
49   install -vDm644 -t "$pkgdir/usr/share/man/man1" man/man1/*.1
51   # documentation
52   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
54   # shell auto-completions
55   cd contrib/completions
56   install -vDm644 -t "$pkgdir/usr/share/zsh/site-functions" _zoxide
57   install -vDm644 -t "$pkgdir/usr/share/fish/vendor_completions.d" zoxide.fish
58   install -vDm644 zoxide.bash "$pkgdir/usr/share/bash-completion/completions/zoxide"