Advertisement
Goodevil95

neovim-git

Feb 21st, 2020
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.91 KB | None | 0 0
  1. pkgname=neovim-git
  2. pkgver=0.4.0.r946.gff1730373
  3. pkgrel=1
  4. pkgdesc='Fork of Vim aiming to improve user experience, plugins, and GUIs'
  5. arch=('x86_64')
  6. url='https://neovim.io'
  7. backup=('etc/xdg/nvim/sysinit.vim')
  8. license=('custom:neovim')
  9. depends=('libtermkey' 'libuv' 'msgpack-c' 'unibilium' 'libvterm' 'luajit' 'libluv')
  10. makedepends=('git' 'cmake' 'ninja' 'lua51-mpack' 'lua51-lpeg' 'gperf')
  11. optdepends=('python-neovim: for Python 3 plugin support (see :help python)'
  12.             'xclip: for clipboard support (or xsel) (see :help clipboard)'
  13.             'xsel: for clipboard support (or xclip) (see :help clipboard)')
  14. source=("git+https://github.com/neovim/neovim.git")
  15. sha256sums=('SKIP')
  16. provides=("neovim=${pkgver}")
  17. conflicts=('neovim')
  18.  
  19. pkgver() {
  20.   cd "${pkgname%-git}"
  21.   git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  22. }
  23.  
  24. build() {
  25.   cmake -H${pkgname%-git} -Bbuild -GNinja \
  26.         -DCMAKE_BUILD_TYPE=Release \
  27.         -DCMAKE_INSTALL_PREFIX=/usr
  28.   cmake --build build
  29. }
  30.  
  31. check() {
  32.   cd "${srcdir}/build"
  33.   ./bin/nvim --version
  34.   ./bin/nvim --headless -u NONE -i NONE -c ':quit'
  35. }
  36.  
  37. package() {
  38.   cd "${srcdir}/build"
  39.   DESTDIR="${pkgdir}" cmake --build . --target install
  40.  
  41.   cd "${srcdir}/${pkgname%-git}"
  42.   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
  43.   install -Dm644 runtime/nvim.desktop "${pkgdir}/usr/share/applications/nvim.desktop"
  44.   install -Dm644 runtime/nvim.png "${pkgdir}/usr/share/pixmaps/nvim.png"
  45.  
  46.   # Make Arch vim packages work
  47.   mkdir -p "${pkgdir}"/etc/xdg/nvim
  48.   echo "\" This line makes pacman-installed global Arch Linux vim packages work." > "${pkgdir}"/etc/xdg/nvim/sysinit.vim
  49.   echo "source /usr/share/nvim/archlinux.vim" >> "${pkgdir}"/etc/xdg/nvim/sysinit.vim
  50.  
  51.   mkdir -p "${pkgdir}"/usr/share/vim
  52.   echo "set runtimepath+=/usr/share/vim/vimfiles" > "${pkgdir}"/usr/share/nvim/archlinux.vim
  53. }
  54.  
  55. # vim:set sw=2 sts=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement