summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 24 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fb4018f233d..d0698da6f3b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,43 @@
-# Maintainer: Luis Martinez
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Credit: desbma
+
pkgname=zoxide-git
-_pkgname=zoxide
-pkgver=0.6.0.r4.g1828414
-pkgrel=2
+pkgver=0.7.4.r9.g9ff8993
+pkgrel=1
pkgdesc='A fast cd command that learns your habits'
-arch=('x86_64')
+arch=('x86_64' 'armv7h' 'aarch64')
url="https://github.com/ajeetdsouza/zoxide"
license=('MIT')
depends=('gcc-libs')
makedepends=('cargo' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-source=("${pkgname}::git+${url}")
+source=("$pkgname::git+$url")
sha512sums=('SKIP')
pkgver() {
- cd "${pkgname}"
- git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ git -C "$pkgname" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+ cargo update
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
- cd "${pkgname}"
- cargo build --release --locked --all-features --target-dir=target
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cd "$pkgname"
+ cargo build --release --frozen --all-features
}
package() {
- cd "${pkgname}"
- install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/zoxide
- install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- find man -name '*.1' -type f \
- -exec install -Dm 644 '{}' -t "${pkgdir}/usr/share/man/man1/" \;
+ cd "$pkgname"
+ install -Dm 755 -t "$pkgdir/usr/bin" target/release/zoxide
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm 644 man/*.1 -t "$pkgdir/usr/share/man/man1/"
+ install -Dm 644 contrib/completions/zoxide.bash "$pkgdir/usr/share/bash-completion/completions/zoxide"
+ install -Dm 644 contrib/completions/_zoxide -t "$pkgdir/usr/share/zsh/site-completions/"
+ install -Dm 644 contrib/completions/zoxide.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/"
}