diff options
author | Luis Martinez | 2021-08-30 23:13:11 -0500 |
---|---|---|
committer | Luis Martinez | 2021-08-30 23:13:11 -0500 |
commit | 0b1c116549153bc75a4b35622dc849b6bed5d859 (patch) | |
tree | 7f4ce028185f1bbc87f2c882ed90a9981335fba9 | |
parent | b24e1d665058854ffe769dd6e6dd0d12dfdbe862 (diff) | |
download | aur-0b1c116549153bc75a4b35622dc849b6bed5d859.tar.gz |
rewrite PKGBUILD according to new Arch guidelines for Rust
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | navi.install | 7 |
3 files changed, 32 insertions, 26 deletions
@@ -1,21 +1,19 @@ pkgbase = navi-git pkgdesc = An interactive cheatsheet tool for the command-line. - pkgver = 2.16.0.r23.gad46a3a + pkgver = 2.17.0.r10.g5860498 pkgrel = 1 url = https://github.com/denisidoro/navi - install = navi.install arch = x86_64 license = Apache - makedepends = git - makedepends = make makedepends = cargo + makedepends = git depends = fzf + optdepends = bash-completion optdepends = skim: drop-in replacement for fzf provides = navi conflicts = navi - source = navi-git::git+https://github.com/denisidoro/navi - source = navi.install + source = navi-git::git+https://github.com/denisidoro/navi?signed + validpgpkeys = 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23 sha256sums = SKIP - sha256sums = 524d552a47da4f16c0608522dc72cd9be292aabfcb4f0a302259ac13a1a16105 pkgname = navi-git @@ -1,40 +1,55 @@ -# Maintainer: Luis Martinez <luis dot martinez at tuta dot io> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: Kibouo <csonka.mihaly@hotmail.com> pkgname=navi-git -pkgver=2.16.0.r23.gad46a3a +pkgver=2.17.0.r10.g5860498 pkgrel=1 pkgdesc='An interactive cheatsheet tool for the command-line.' arch=('x86_64') url='https://github.com/denisidoro/navi' license=('Apache') depends=('fzf') -optdepends=('skim: drop-in replacement for fzf') -makedepends=('git' 'make' 'cargo') +optdepends=( + 'bash-completion' + 'skim: drop-in replacement for fzf') +makedepends=('cargo' 'git') provides=('navi') conflicts=('navi') -install='navi.install' -source=("${pkgname}::git+${url}" - navi.install) -sha256sums=('SKIP' - '524d552a47da4f16c0608522dc72cd9be292aabfcb4f0a302259ac13a1a16105') +source=("$pkgname::git+$url?signed") +sha256sums=('SKIP') +validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') pkgver() { + git -C "$pkgname" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./' +} + +prepare() { cd "$pkgname" - git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./' + cargo update + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target cd "$pkgname" - cargo build --release --locked --all-features --target-dir=target + cargo build --release --frozen --all-features + cd target/release + ./navi widget bash > "$srcdir/navi.bash" + ./navi widget zsh > "$srcdir/_navi" + ./navi widget fish > "$srcdir/navi.fish" } check() { + export RUSTUP_TOOLCHAIN=stable cd "$pkgname" - cargo test --release --locked --target-dir=target + cargo test --frozen --all-features } package() { + install -Dm 644 navi.bash "$pkgdir/usr/share/bash-completion/completions/navi" + install -Dm 644 _navi -t "$pkgdir/usr/share/zsh/site-functions/" + install -Dm 644 navi.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" cd "$pkgname" install -Dm 755 target/release/navi -t "$pkgdir/usr/bin" find docs -type f -exec install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" '{}' \; diff --git a/navi.install b/navi.install deleted file mode 100644 index 27a5f6dc6ade..000000000000 --- a/navi.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - echo " - -Source shell plugins using 'navi widget [shell]' in your dotfile. This enables proper populating of shell history and editting commands before executing them. - -" -} |