Snapcraft updates issue #1149 (#1238)

* tweak dependencies copy latest from https://github.com/neovim/neovim-snap/blob/master/snap/snapcraft.yaml

* remove dev pacakges
macos-click-through
j4qfrost 3 years ago committed by GitHub
parent 15234bd093
commit 9e3500501d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,26 +23,14 @@ parts:
source: https://github.com/neovim/neovim.git source: https://github.com/neovim/neovim.git
override-pull: | override-pull: |
snapcraftctl pull snapcraftctl pull
latest_tag="$(git tag -l --sort=refname|head -1)" branch="$(git tag -l --sort=refname | awk '/v[0-9\.]/{print $0}' | tail -1)"
git checkout "${latest_tag}" git checkout tags/${branch} -b ${branch}
major="$(awk '/NVIM_VERSION_MAJOR/{gsub(")","",$2); print $2}' CMakeLists.txt)" major="$(awk '/NVIM_VERSION_MAJOR/{gsub(")","",$2); print $2}' CMakeLists.txt)"
minor="$(awk '/NVIM_VERSION_MINOR/{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)" patch="$(awk '/NVIM_VERSION_PATCH/{gsub(")","",$2); print $2}' CMakeLists.txt)"
version_prefix="v$major.$minor.$patch" VERSION="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)}"
if [ "${version_prefix}" != "${git_described}" ]; then
VERSION="${version_prefix}-${git_described}-${latest_tag}"
else
VERSION="${version_prefix}-${latest_tag}"
fi
snapcraftctl set-version "${VERSION}" snapcraftctl set-version "${VERSION}"
plugin: make plugin: make
make-parameters:
- CMAKE_BUILD_TYPE=RelWithDebInfo
- CMAKE_INSTALL_PREFIX=/usr
- CMAKE_FLAGS=-DPREFER_LUA=ON
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF"
override-build: | override-build: |
echo "Building on $SNAP_ARCH" echo "Building on $SNAP_ARCH"
set -x set -x
@ -62,19 +50,24 @@ parts:
esac esac
make DESTDIR="$SNAPCRAFT_PART_INSTALL" install make DESTDIR="$SNAPCRAFT_PART_INSTALL" install
# Fix Desktop file # Fix Desktop file
sed -i 's|^Exec=nvim|Exec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop sed -i 's|^Exec=nvim|Exec=/snap/bin/nvim.nvim|' \
sed -i 's|^TryExec=nvim|TryExec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/pixmaps/nvim.png|' ${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
sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/128x128/apps/nvim.png|' \
${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
build-packages: build-packages:
- ninja-build - ninja-build
- libtool - libtool
- libtool-bin - libtool-bin
- autoconf - autoconf
- automake - automake
- cmake
- gawk - gawk
- g++ - g++
- git - git
- gettext - gettext
- pkg-config
- unzip - unzip
- wget - wget
prime: prime:
@ -90,21 +83,22 @@ parts:
- fontconfig - fontconfig
- libfontconfig1-dev - libfontconfig1-dev
- libfreetype6-dev - libfreetype6-dev
- libxcb-composite0-dev
stage-packages: stage-packages:
- libxkbcommon0 - libxkbcommon0
- libxkbcommon-x11-0 - libxkbcommon-x11-0
- libegl1-mesa-dev - libegl1-mesa
- libgl1-mesa-dev - libgl1-mesa-glx
- fontconfig - fontconfig
- fonts-noto - fonts-noto
- libfontconfig1 - libfontconfig1
- libibus-1.0-5 - libibus-1.0-5
- libpng16-16 - libpng16-16
- libx11-dev - libx11-6
- libx11-xcb1 - libx11-xcb1
- libxcursor1 - libxcursor1
- libxi-dev - libxi6
- libxrandr-dev - libxrandr2
- locales-all - locales-all
- xdg-user-dirs - xdg-user-dirs
@ -116,6 +110,7 @@ apps:
- desktop-legacy - desktop-legacy
- wayland - wayland
- unity7 - unity7
- opengl
- x11 - x11
command-chain: command-chain:
- bin/desktop-launch - bin/desktop-launch

Loading…
Cancel
Save