mirror of
https://github.com/neovim/neovim.git
synced 2025-12-13 10:02:49 +00:00
snap: adjust make command depending on architecture
i386, amd64, armhf platforms should be build with luajit all others with lua.
This commit is contained in:
@@ -42,7 +42,23 @@ parts:
|
|||||||
- CMAKE_FLAGS=-DPREFER_LUA=ON
|
- CMAKE_FLAGS=-DPREFER_LUA=ON
|
||||||
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF"
|
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF"
|
||||||
override-build: |
|
override-build: |
|
||||||
snapcraftctl build
|
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
|
||||||
# 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|' ${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|^TryExec=nvim|TryExec=/snap/bin/nvim.nvim|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/nvim.desktop
|
||||||
|
|||||||
Reference in New Issue
Block a user