blob: 57ee59aec41dac8954fee02c52dc8f89c23fb393 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# Maintainer: A Farzat <a@farzat.xyz>
# Contributor: éclairevoyant
# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Florian Walch <florian+aur@fwalch.com>
# Contributor: Florian Hahn <flo@fhahn.com>
# Contributor: Gregory Anders <aur@gpanders.com>
_pkgname=neovim
pkgname="$_pkgname-git"
pkgver=0.11.0.r711.g7b7c95dac9
pkgrel=1
pkgdesc='Fork of Vim aiming to improve user experience, plugins, and GUIs'
arch=(i686 x86_64 armv7h armv6h aarch64)
url='https://neovim.io'
backup=('etc/xdg/nvim/sysinit.vim')
license=('custom:neovim')
depends=(
'libluv'
'libutf8proc'
'libuv'
'lua51-lpeg'
'luajit'
'msgpack-c'
'tree-sitter-c'
'tree-sitter-lua'
'tree-sitter-markdown'
'tree-sitter-query'
'tree-sitter-vimdoc'
'tree-sitter-vim'
'tree-sitter>=0.22.2'
'unibilium'
)
makedepends=('cmake' 'git' 'ninja' 'unzip')
optdepends=(
'python-pynvim: for Python plugin support (see :help python)'
'tree-sitter-bash: tree-sitter parser for bash'
'tree-sitter-python: tree-sitter parser for python'
'xclip: for clipboard support on X11 (or xsel) (see :help clipboard)'
'xsel: for clipboard support on X11 (or xclip) (see :help clipboard)'
'wl-clipboard: for clipboard support on wayland (see :help clipboard)'
)
provides=("$_pkgname=${pkgver/\.r*/}" 'vim-plugin-runtime')
conflicts=("$_pkgname")
source=(
"git+https://github.com/neovim/$_pkgname.git"
nvimdoc{,.hook}
)
sha512sums=('SKIP'
'22662462c823de243599cdd3483e46ade4ab59b219e907468d34c18e584fe7477548e357ee2ce56bb098cf54b770b108a3511703dd486f0774a65c84af78f6aa'
'3c6ee1e4646d09c164a2212f9e4d2f53158ff32911b0972e060a395a8d4685334574a7ede995a81680dcc0750cd3327a78beb7904a4bb326b2399d79a8b12d5e')
b2sums=('SKIP'
'd31cf81659e238fada8092755eb9be16f77c00a466107eb5770c6c9c32e043c91e6efada7ddb51663716a0e38ffa6e3d0093b3e6833aa961d845c7451a95491e'
'26588b9da6459393076723bdfb8d2b16fed882070f2326bf7c35cd272dee9c18df603afb1ae2254cd0a59eff68189caf04828ef165d5de42c7a4222267604101')
pkgver() {
cd "$_pkgname"
local nvim_version nvim_version_git
nvim_version="$(sed -nE '/NVIM_VERSION_/ s/.* +([0-9]+)\).*/\1/p' ./CMakeLists.txt | sed ':b;N;$!bb;s/\n/\./g')"
nvim_version_git="$(git describe --first-parent --always | sed -E 's/^v[0-9]+.[0-9]+.[0-9]+-//; s/^([0-9]+)-([a-z0-9]+)/\1\.\2/')"
printf "%s.r%s\n" "$nvim_version" "$nvim_version_git"
}
build() {
cd "$_pkgname"
# Use bundled utf8proc until upstream pins back to a stable release
cmake -S cmake.deps -B .deps -G Ninja -DUSE_BUNDLED=OFF -DUSE_BUNDLED_UTF8PROC=ON
cmake --build .deps
cmake \
-Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-G Ninja \
-W no-dev
cmake --build build
}
check() {
cd "$_pkgname"
./build/bin/nvim --version
./build/bin/nvim --headless -u NONE -i NONE +q
}
package() {
install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks/" nvimdoc.hook
install -Dt "$pkgdir/usr/share/libalpm/scripts/" nvimdoc
cd "$_pkgname"
DESTDIR="$pkgdir" cmake --install build
install -Dm644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
install -Dm644 runtime/nvim.desktop -t "${pkgdir}/usr/share/applications/"
install -Dm644 runtime/nvim.appdata.xml -t "${pkgdir}/usr/share/metainfo/"
install -Dm644 runtime/nvim.png -t "${pkgdir}/usr/share/pixmaps/"
# Make Arch Vim packages work
mkdir -p "${pkgdir}"/etc/xdg/nvim
echo "\" This line makes pacman-installed global Arch Linux vim packages work." > "${pkgdir}"/etc/xdg/nvim/sysinit.vim
echo "source /usr/share/nvim/archlinux.vim" >> "${pkgdir}"/etc/xdg/nvim/sysinit.vim
mkdir -p "${pkgdir}"/usr/share/vim
echo "set runtimepath+=/usr/share/vim/vimfiles" > "${pkgdir}"/usr/share/nvim/archlinux.vim
ln -s /usr/lib/tree_sitter "${pkgdir}"/usr/lib/nvim/parser
}
# vim:set sw=2 sts=2 et:
|