diff options
author | Carlos Hernandez <carlos@techbyte.ca> | 2020-09-06 05:36:21 +0000 |
---|---|---|
committer | Carlos Hernandez <carlos@techbyte.ca> | 2020-09-06 05:36:21 +0000 |
commit | 92eab3baef2cd7a381946ced334f72a3897e430d (patch) | |
tree | fc133b6779e4cd1f29993b929d9c95639faa597b | |
parent | b5cbd448bfd0578b7a0a9b11019fd63904f32f92 (diff) | |
download | rneovim-92eab3baef2cd7a381946ced334f72a3897e430d.tar.gz rneovim-92eab3baef2cd7a381946ced334f72a3897e430d.tar.bz2 rneovim-92eab3baef2cd7a381946ced334f72a3897e430d.zip |
snap: adjust make command depending on architecture
i386, amd64, armhf platforms should be build with luajit all others with
lua.
-rw-r--r-- | snap/snapcraft.yaml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d60566e6a3..873e249eb8 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -42,7 +42,23 @@ parts: - CMAKE_FLAGS=-DPREFER_LUA=ON - DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUA=ON -DUSE_BUNDLED_LUAJIT=OFF" 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 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 |