snap: fix/update snap builds

* rename to nvim
* bump base to core18
* fix versioning, match binary
* set prefix to /usr
This commit is contained in:
Carlos Hernandez 2019-11-20 15:28:18 -07:00 committed by Justin M. Keyes
parent ee1199eaba
commit 86867c2f95

View File

@ -1,5 +1,6 @@
name: neovim
version: git
name: nvim
base: core18
adopt-info: nvim
summary: Vim-fork focused on extensibility and agility.
description: |
Neovim is a project that seeks to aggressively refactor Vim in order to:
@ -9,22 +10,33 @@ description: |
Enable the implementation of new/modern user interfaces without any modifications to the core source
Improve extensibility with a new plugin architecture
For lots more details, see the wiki!
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: classic
apps:
neovim:
command: usr/local/bin/nvim
plugs: [network, network-bind, x11]
nvim:
command: usr/bin/nvim
environment:
HOME: /home/$USER
VIM: $SNAP/usr/local/share/nvim/runtime
VIM: $SNAP/usr/share/nvim/runtime
parts:
neovim:
nvim:
source: .
override-pull: |
snapcraftctl pull
major="$(awk '/NVIM_VERSION_MAJOR/{gsub(")","",$2); print $2}' CMakeLists.txt)"
minor="$(awk '/NVIM_VERSION_MINOR/{gsub(")","",$2); print $2}' CMakeLists.txt)"
patch="$(awk '/NVIM_VERSION_PATCH/{gsub(")","",$2); print $2}' CMakeLists.txt)"
version_prefix="v$major.$minor.$patch"
git_described="$(git describe --first-parent --dirty 2> /dev/null | perl -lpe 's/v\d.\d.\d-//g')"
git_described="${git_described:-$(git describe --first-parent --tags --always --dirty)}"
snapcraftctl set-version "${version_prefix}-${git_described}"
plugin: make
make-parameters:
- CMAKE_BUILD_TYPE=Release
- CMAKE_INSTALL_PREFIX=/usr
build-packages:
- ninja-build
- libtool
@ -33,9 +45,10 @@ parts:
- automake
- cmake
- g++
- git
- gettext
- pkg-config
- unzip
snap:
- usr/local/bin
- usr/local/share/nvim
- -usr/local/share/man
prime:
- -usr/share/man