%global debug_package %{nil} %global _build_id_links none Name: neovim-minimal Version: 0.12.5 Release: 1%{?dist} Summary: Minimal Vim-fork focused on extensibility and agility License: Apache-2.0 AND Vim AND MIT URL: https://github.com/neovim/neovim Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/neovim-%{version}.tar.gz Provides: neovim = %{version}-%{release} Conflicts: neovim BuildRequires: cmake BuildRequires: gcc BuildRequires: gperf BuildRequires: libluv-devel BuildRequires: lua5.1-lpeg >= 1.1.0 BuildRequires: lua5.1-mpack >= 1.0.11 BuildRequires: luajit-devel BuildRequires: pkgconfig(libutf8proc) >= 2.10.0 BuildRequires: pkgconfig(libuv) >= 1.50.0 BuildRequires: pkgconfig(tree-sitter) BuildRequires: pkgconfig(unibilium) Requires: libtree-sitter Requires: lua5.1-lpeg >= 1.1.0 Requires: luajit2.1-luv %description Neovim is a refactor of Vim focused on extensibility and usability. This minimal build provides the core Lua runtime, built-in help, the system Tree-sitter runtime, and Neovim's built-in Tree-sitter parsers. Other runtime features can be installed per user. %prep %autosetup -n neovim-%{version} %build # Build only Neovim's built-in Tree-sitter parsers. # # The Tree-sitter runtime itself comes from the system package. cmake \ -S cmake.deps \ -B .deps \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_BUNDLED=OFF \ -DUSE_BUNDLED_TS=OFF \ -DUSE_BUNDLED_TS_PARSERS=ON cmake --build .deps --parallel %{_smp_build_ncpus} # Build Neovim against system libraries. %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_LIBINTL=OFF \ -DLUA_PRG=%{_bindir}/luajit \ -DLUA_GEN_PRG=%{_bindir}/luajit \ -DLIBLUV_INCLUDE_DIR:PATH=%{_includedir}/luv %cmake_build %install %cmake_install # Install Neovim's built-in Tree-sitter parsers. install -d -m0755 \ %{buildroot}%{_libdir}/nvim/parser install -p -m0755 \ .deps/usr/lib/nvim/parser/*.so \ %{buildroot}%{_libdir}/nvim/parser/ # This package has no desktop integration. rm -f \ %{buildroot}%{_datadir}/applications/nvim.desktop \ %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/nvim.png \ %{buildroot}%{_datadir}/nvim/runtime/neovim.ico \ %{buildroot}%{_datadir}/nvim/runtime/pack/dist/opt/netrw/LICENSE.txt # Keep core Lua runtime, built-in Tree-sitter support, and built-in help. # Optional runtime features can be installed later through the user's # runtimepath. runtime=%{buildroot}%{_datadir}/nvim/runtime rm -f \ "$runtime/doc"/dev*.txt \ "$runtime/doc"/ft*.txt \ "$runtime/doc"/l10n-*.txt \ "$runtime/doc"/news*.txt \ "$runtime/doc"/pi*.txt \ "$runtime/doc"/spell*.txt \ "$runtime/doc/credits.txt" \ "$runtime/doc/if_perl.txt" \ "$runtime/doc/if_pyth.txt" \ "$runtime/doc/if_ruby.txt" \ "$runtime/doc/provider.txt" \ "$runtime/doc/remote_plugin.txt" \ "$runtime/doc/uganda.txt" sed -i \ -e '/\tdev[^[:space:]]*\.txt\t/d' \ -e '/\tft[^[:space:]]*\.txt\t/d' \ -e '/\tl10n-[^[:space:]]*\.txt\t/d' \ -e '/\tnews[^[:space:]]*\.txt\t/d' \ -e '/\tpi[^[:space:]]*\.txt\t/d' \ -e '/\tspell[^[:space:]]*\.txt\t/d' \ -e '/\tcredits\.txt\t/d' \ -e '/\tif_perl\.txt\t/d' \ -e '/\tif_pyth\.txt\t/d' \ -e '/\tif_ruby\.txt\t/d' \ -e '/\tprovider\.txt\t/d' \ -e '/\tremote_plugin\.txt\t/d' \ -e '/\tuganda\.txt\t/d' \ "$runtime/doc/tags" rm -rf \ "$runtime/autoload" \ "$runtime/colors" \ "$runtime/compiler" \ "$runtime/keymap" \ "$runtime/pack" \ "$runtime/plugin" \ "$runtime/scripts" \ "$runtime/spell" \ "$runtime/tutor" find "$runtime/ftplugin" -type f \ ! -name 'help.lua' \ ! -name 'help.vim' \ ! -name 'lua.lua' \ ! -name 'lua.vim' \ -delete find "$runtime/indent" -type f \ ! -name 'lua.vim' \ -delete find "$runtime/syntax" -type f \ ! -name 'help.vim' \ ! -name 'lua.vim' \ ! -name 'syntax.vim' \ -delete rm -f \ "$runtime/delmenu.vim" \ "$runtime/example_init.lua" \ "$runtime/makemenu.vim" \ "$runtime/menu.vim" \ "$runtime/synmenu.vim" find "$runtime" -depth -type d -empty -delete %files %{_bindir}/nvim %{_libdir}/nvim/ %{_datadir}/nvim/ %{_mandir}/man1/nvim.1* %changelog %autochangelog