summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 18 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c8af7846c189..6e450797ec33 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,17 @@
# Maintainer: 160R@protonmail.com
_pkgname=page
pkgname=${_pkgname}-git
-pkgrel=1
-pkgver=v2.3.4
-pkgdesc='Advanced, fast pager powered by neovim and inspired by neovim-remote'
+pkgrel=2
+pkgver=v4.6.3
+pkgdesc='Pager powered by neovim and inspired by neovim-remote'
arch=('i686' 'x86_64')
url="https://github.com/I60R/page"
license=('MIT')
-depends=('neovim' 'gcc-libs')
+depends=('neovim' 'gcc-libs' 'file' 'bat')
makedepends=('rust' 'cargo' 'git')
provides=('page')
conflicts=('page')
-source=("git+https://github.com/I60R/page.git")
+source=("git+https://github.com/I60R/page.git#branch=main")
md5sums=('SKIP')
@@ -20,21 +20,6 @@ pkgver() {
git describe --tags --abbrev=0
}
-prepare() {
- rustc_version=$([[ "$(rustc --version)" =~ rustc\ 1.([0-9]+).* ]] && echo "${BASH_REMATCH[1]}")
-
- (($rustc_version >= 40)) && return 0;
-
- # Set error color
- echo -e '\e[0;31m'
- echo 'Minimum supported rust version is 1.40.0, please update'
- echo ' * rustup way: `rustup update`'
- echo ' * pacman way: `pacman -Sy rust`'
- # Reset color
- echo -e '\e[0m'
- return 1
-}
-
package() {
checkout_project_root
@@ -42,14 +27,23 @@ package() {
# Install binaries
install -D -m755 "target/release/page" "$pkgdir/usr/bin/page"
+ install -D -m755 "target/release/nv" "$pkgdir/usr/bin/nv"
# Find last build directory where completions was generated
- completions_dir=$(find "target" -name "shell_completions" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}')
+ out_dir=$(find "target" -name "assets" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}')
# Install shell completions
- install -D -m644 "$completions_dir/_page" "$pkgdir/usr/share/zsh/site-functions/_page"
- install -D -m644 "$completions_dir/page.bash" "$pkgdir/usr/share/bash-completion/completions/page"
- install -D -m644 "$completions_dir/page.fish" "$pkgdir/usr/share/fish/completions/page.fish"
+ install -D -m644 "$out_dir/_page" "$pkgdir/usr/share/zsh/site-functions/_page"
+ install -D -m644 "$out_dir/page.bash" "$pkgdir/usr/share/bash-completion/completions/page.bash"
+ install -D -m644 "$out_dir/page.fish" "$pkgdir/usr/share/fish/completions/page.fish"
+
+ install -D -m644 "$out_dir/_nv" "$pkgdir/usr/share/zsh/site-functions/_nv"
+ install -D -m644 "$out_dir/nv.bash" "$pkgdir/usr/share/bash-completion/completions/nv.bash"
+ install -D -m644 "$out_dir/nv.fish" "$pkgdir/usr/share/fish/completions/nv.fish"
+
+ # Install man pages
+ install -D -m644 "$out_dir/page.1" "$pkgdir/usr/share/man/man1/page.1"
+ install -D -m644 "$out_dir/nv.1" "$pkgdir/usr/share/man/man1/nv.1"
# Install MIT license
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"