2019-11-20 15:28:18 -07:00
|
|
|
name: nvim
|
2020-09-05 22:30:00 -07:00
|
|
|
base: core18
|
2019-11-20 15:28:18 -07:00
|
|
|
adopt-info: nvim
|
2018-01-29 15:02:15 -07:00
|
|
|
summary: Vim-fork focused on extensibility and agility.
|
|
|
|
description: |
|
|
|
|
Neovim is a project that seeks to aggressively refactor Vim in order to:
|
|
|
|
|
|
|
|
Simplify maintenance and encourage contributions
|
|
|
|
Split the work between multiple developers
|
|
|
|
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!
|
2019-11-20 15:28:18 -07:00
|
|
|
|
|
|
|
grade: stable # must be 'stable' to release into candidate/stable channels
|
2019-12-23 22:43:25 -07:00
|
|
|
confinement: classic
|
2018-01-29 15:02:15 -07:00
|
|
|
|
|
|
|
apps:
|
2019-11-20 15:28:18 -07:00
|
|
|
nvim:
|
|
|
|
command: usr/bin/nvim
|
2018-01-29 15:02:15 -07:00
|
|
|
environment:
|
|
|
|
HOME: /home/$USER
|
2019-11-21 13:26:11 -07:00
|
|
|
VIM: $SNAP/usr/share/nvim
|
|
|
|
VIMRUNTIME: $SNAP/usr/share/nvim/runtime
|
|
|
|
desktop: usr/share/applications/nvim.desktop
|
2018-01-29 15:02:15 -07:00
|
|
|
|
|
|
|
parts:
|
2019-11-20 15:28:18 -07:00
|
|
|
nvim:
|
2020-09-09 20:41:03 -07:00
|
|
|
source: https://github.com/neovim/neovim.git
|
2019-11-20 15:28:18 -07:00
|
|
|
override-pull: |
|
|
|
|
snapcraftctl pull
|
2020-09-05 22:41:19 -07:00
|
|
|
latest_tag="$(git tag -l --sort=refname|head -1)"
|
|
|
|
git checkout "${latest_tag}"
|
2019-11-20 15:28:18 -07:00
|
|
|
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)}"
|
2020-09-05 22:42:47 -07:00
|
|
|
if [ "${version_prefix}" != "${git_described}" ]; then
|
2020-09-09 20:41:03 -07:00
|
|
|
VERSION="${version_prefix}-${git_described}-${latest_tag}"
|
2020-09-05 22:42:47 -07:00
|
|
|
else
|
2020-09-09 20:41:03 -07:00
|
|
|
VERSION="${version_prefix}-${latest_tag}"
|
2020-09-05 22:42:47 -07:00
|
|
|
fi
|
|
|
|
snapcraftctl set-version "${VERSION}"
|
2018-01-29 15:02:15 -07:00
|
|
|
plugin: make
|
|
|
|
make-parameters:
|
2020-06-14 19:41:40 -07:00
|
|
|
- CMAKE_BUILD_TYPE=RelWithDebInfo
|
2019-11-20 15:28:18 -07:00
|
|
|
- CMAKE_INSTALL_PREFIX=/usr
|
2020-06-14 19:42:21 -07:00
|
|
|
- CMAKE_FLAGS=-DPREFER_LUA=ON
|
|
|
|
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF"
|
2019-11-21 13:26:11 -07:00
|
|
|
override-build: |
|
2020-09-05 22:36:21 -07:00
|
|
|
echo "Building on $SNAP_ARCH"
|
|
|
|
set -x
|
|
|
|
case "$SNAP_ARCH" in
|
|
|
|
"arm64" | "ppc64el" | "s390x")
|
|
|
|
make -j"${SNAPCRAFT_PARALLEL_BUILD_COUNT}" \
|
|
|
|
CMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
CMAKE_FLAGS=-DPREFER_LUA=ON \
|
|
|
|
DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
make -j"${SNAPCRAFT_PARALLEL_BUILD_COUNT}" \
|
|
|
|
CMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
CMAKE_INSTALL_PREFIX=/usr
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
make DESTDIR="$SNAPCRAFT_PART_INSTALL" install
|
2019-11-21 13:26:11 -07:00
|
|
|
# Fix Desktop file
|
|
|
|
sed -i 's|^Exec=nvim|Exec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
|
|
|
|
sed -i 's|^TryExec=nvim|TryExec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
|
2021-05-27 13:37:24 -07:00
|
|
|
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/128x128/apps/nvim.png|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
|
2018-01-29 15:02:15 -07:00
|
|
|
build-packages:
|
|
|
|
- ninja-build
|
|
|
|
- libtool
|
|
|
|
- libtool-bin
|
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- cmake
|
2020-06-14 19:40:37 -07:00
|
|
|
- gawk
|
2018-01-29 15:02:15 -07:00
|
|
|
- g++
|
2019-11-20 15:28:18 -07:00
|
|
|
- git
|
|
|
|
- gettext
|
2018-01-29 15:02:15 -07:00
|
|
|
- pkg-config
|
|
|
|
- unzip
|
2020-06-14 19:40:37 -07:00
|
|
|
- wget
|
2019-11-20 15:28:18 -07:00
|
|
|
prime:
|
|
|
|
- -usr/share/man
|
|
|
|
|