summaryrefslogtreecommitdiffstats
path: root/neovim/PKGBUILD
blob: f86fe08260db349a9f3a0fb6ab0a7ec9df66a924 (plain) (blame)
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
# Maintainer: Justin Gassner <justin.gassner@mailbox.org>

_pkgname=neovim
pkgname=$_pkgname-jxir
pkgver=0.4.0.r64.gcb2520717
pkgrel=1
pkgdesc='Fork of Vim aiming to improve user experience, plugins, and GUIs'
arch=('x86_64')
url='https://neovim.io'
license=('custom:neovim')
depends=('bash' 'libluv' 'libtermkey' 'libvterm' 'msgpack-c')
makedepends=('cmake' 'git' 'gperf' 'lua51-lpeg' 'lua51-mpack')
optdepends=('python2-neovim: for Python 2 plugin support (see :help python)'
            'python-neovim: for Python 3 plugin support (see :help python)'
            'xclip: for clipboard support (or xsel) (see :help clipboard)'
            'xsel: for clipboard support (or xclip) (see :help clipboard)')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/$_pkgname/$_pkgname.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir"
  cmake -Hneovim -Bbuild -GNinja \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DENABLE_LIBINTL=OFF
  cmake --build build
}

check() {
  cd "$srcdir/build"
  ./bin/nvim --version
  ./bin/nvim --headless -u NONE -i NONE -c ':quit'
}

package() {
  cd "$srcdir/build"
  DESTDIR="$pkgdir" cmake --build . --target install
  cd "$srcdir/$_pkgname"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
  #rm -rf "$pkgdir/usr/share/applications/"
  #rm -rf "$pkgdir/usr/share/pixmaps/"
  #rm -rf "$pkgdir/usr/share/nvim/runtime/"{autoload/tutor.vim,doc/pi_tutor.txt,plugin/tutor.vim,syntax/tutor.vim,tutor/}
  #rm -rf "$pkgdir/usr/share/nvim/runtime/"{doc/pi_matchit.txt,macros/matchit.vim,plugin/matchit.vim}
  #rm "$pkgdir/usr/share/nvim/runtime/plugin/"{gzip,matchparen,netrwPlugin,rplugin,spellfile,tarPlugin,tohtml,zipPlugin}.vim
  ln -s nvim "$pkgdir/usr/bin/vim"
}