# comment out if not nightly build #define nightly 20180604 #define gitcommit cf92a76 # rel to bump %define rel 1 # build will override this anyway, so let's skip it %define _fortify_cflags %nil %define luaver 5.1 Name: neovim Version: 0.10.2 Release: 1%{?dist} Summary: Vim-fork focused on extensibility and usability Group: Editors License: ASL 2.0 URL: https://neovim.io/ %if 0%{?nightly:1} Source0: https://github.com/neovim/neovim/archive/nightly/%{name}-%{version}-nightly%{nightly}.tar.gz %else Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz %endif Source1: %{name}-%{version}-vendor.tar.gz Patch0: neovim-0.5.0-bitop.patch BuildRequires: cmake BuildRequires: gperf BuildRequires: pkgconfig(lua-%{?luaver}) BuildRequires: lua%{?luaver}-bit32 BuildRequires: lua%{?luaver}-lpeg BuildRequires: lua%{?luaver}-mpack BuildRequires: pkgconfig(libluv) BuildRequires: (ninja or ninja-build) BuildRequires: pkgconfig(libuv) %if %{?mageia} > 9 BuildRequires: pkgconfig(msgpack-c) %endif BuildRequires: pkgconfig(unibilium) BuildRequires: pkgconfig(termkey) %if %{?mageia} > 9 BuildRequires: pkgconfig(vterm) %endif BuildRequires: pkgconfig(jemalloc) BuildRequires: pkgconfig(libbsd) %if %{?mageia} > 9 BuildRequires: pkgconfig(tree-sitter) #BuildRequires: pkgconfig(tree-sitter-c) #BuildRequires: pkgconfig(tree-sitter-lua) #BuildRequires: pkgconfig(tree-sitter-markdown) #BuildRequires: pkgconfig(tree-sitter-query) #BuildRequires: pkgconfig(tree-sitter-vim) %endif Requires: %{name}-data >= %{version}-%{release} Requires: lua%{?luaver} Provides: nvim = %{version}-%{release} Recommends: xclip Recommends: wl-clipboard Recommends: ripgrep Recommends: python3dist(pynvim) Recommends: npm(neovim) %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 advanced UIs without modifications to the core - Maximize extensibility %package data Summary: Data files for %{name} BuildArch: noarch %description data Data files for %{name}. %prep %setup -q -b1 %autosetup -p1 -n %{name}-%{?nightly:nightly}%{?!nightly:%{version}} sed -i "s|sys/end|bsd/sys/end|g" cmake.config/CMakeLists.txt %build # Make sure we have the dependencies mkdir -p .deps/build/ mv -f ../%{name}-%{version}-vendor .deps/build/downloads cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF \ %if %{?mageia} < 10 -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_MSGPACK=ON -DUSE_BUNDLED_TS=ON \ %endif -DUSE_BUNDLED_TS_PARSERS=ON cmake --build .deps # Now build itself %cmake -GNinja \ -DPREFER_LUA=ON \ -DLUA_PRG=%{_bindir}/lua%{?luaver} %cmake_build %install %cmake_install %find_lang nvim %files %license LICENSE.txt %doc CONTRIBUTING.md README.md %{_bindir}/nvim %{_mandir}/man1/nvim.1* %{_iconsdir}/hicolor/*/apps/nvim.png %{_datadir}/applications/nvim.desktop %{_libdir}/nvim/parser %files data -f nvim.lang %{_datadir}/nvim/