diff --git a/neovim-0.1.7-bitop.patch b/neovim-0.1.7-bitop.patch new file mode 100644 index 0000000..0e2a00a --- /dev/null +++ b/neovim-0.1.7-bitop.patch @@ -0,0 +1,19 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -477,7 +477,7 @@ endforeach() + + # Find Lua interpreter + include(LuaHelpers) +-set(LUA_DEPENDENCIES lpeg mpack bit) ++set(LUA_DEPENDENCIES lpeg mpack bit32) + if(NOT LUA_PRG) + foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua) + # If LUA_PRG is set find_program() will not search +--- a/src/nvim/ex_cmds.lua ++++ b/src/nvim/ex_cmds.lua +@@ -1,4 +1,4 @@ +-local bit = require 'bit' ++local bit = require 'bit32' + + -- Description of the values below is contained in ex_cmds_defs.h file. + local RANGE = 0x001 diff --git a/neovim-0.2.0-gcc-prototype.patch b/neovim-0.2.0-gcc-prototype.patch new file mode 100644 index 0000000..53ee607 --- /dev/null +++ b/neovim-0.2.0-gcc-prototype.patch @@ -0,0 +1,36 @@ +--- a/src/nvim/ex_cmds.c ++++ b/src/nvim/ex_cmds.c +@@ -67,6 +67,8 @@ + #include "nvim/os/input.h" + #include "nvim/os/time.h" + ++bool do_sub_msg(bool count_only); ++ + /* + * Struct to hold the sign properties. + */ +--- a/src/nvim/normal.c ++++ b/src/nvim/normal.c +@@ -62,6 +62,22 @@ + #include "nvim/os/time.h" + #include "nvim/os/input.h" + ++bool ++find_decl ( ++ char_u *ptr, ++ size_t len, ++ bool locally, ++ bool thisblock, ++ int flags_arg ++); ++ ++bool ++get_visual_text ( ++ cmdarg_T *cap, ++ char_u **pp, ++ size_t *lenp ++); ++ + typedef struct normal_state { + VimState state; + linenr_T conceal_old_cursor_line; diff --git a/neovim-rpmlintrc b/neovim-rpmlintrc new file mode 100644 index 0000000..d7c378f --- /dev/null +++ b/neovim-rpmlintrc @@ -0,0 +1,3 @@ +addFilter("script-without-shebang .*/runtime/doc/makehtml.awk") +addFilter("script-without-shebang .*/runtime/doc/maketags.awk") +addFilter("script-without-shebang .*/runtime/macros/less.bat") diff --git a/neovim.changes b/neovim.changes index bf43572..85a6a03 100644 --- a/neovim.changes +++ b/neovim.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sat Aug 18 15:04:51 UTC 2018 - Matěj Cepl + +- Proper name of the systemwide configuration file is sysinit.vim not + init.vim and it should be stored in /usr/share/nvim/sysinit.vim not in + /etc/xdg/nvim. + +------------------------------------------------------------------- +Thu Aug 16 15:18:26 UTC 2018 - mcepl@suse.com + +- Add default system-wide configuration file to /etc/xdg/nvim/init.vim (boo#1098800) +- Add proper location of the default SPEC file templates +- Add some packages needed for more robust builds + * neovim.patch fix building system + * neovim-0.1.7-bitop.patch for use external bit module + * neovim-0.2.0-gcc-prototype.patch fix build issue on ppc64 + ------------------------------------------------------------------- Sun Jul 22 17:45:11 UTC 2018 - ronisbr@gmail.com diff --git a/neovim.patch b/neovim.patch new file mode 100644 index 0000000..57ddb7a --- /dev/null +++ b/neovim.patch @@ -0,0 +1,13 @@ +--- a/third-party/cmake/BuildLuarocks.cmake ++++ b/third-party/cmake/BuildLuarocks.cmake +@@ -66,7 +66,9 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILI + BuildLuarocks( + CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure + --prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS} +- INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap) ++ INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap ++ INSTALL_COMMAND && ${MAKE_PRG} -j1 build ++ INSTALL_COMMAND && ${MAKE_PRG} -j1 install) + elseif(MSVC OR MINGW) + + if(MINGW) diff --git a/neovim.spec b/neovim.spec index bdfc2c5..659ab02 100644 --- a/neovim.spec +++ b/neovim.spec @@ -23,17 +23,35 @@ Summary: Vim-fork focused on extensibility and agility License: Apache-2.0 AND Vim Group: Productivity/Text/Editors Url: https://neovim.io/ -Source: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: sysinit.vim +Source2: spec-template +Source3: suse-spec-template +Source99: neovim-rpmlintrc +# PATCH-FIX-OPENSUSE neovim.patch mcepl@cepl.eu +Patch0: neovim.patch +# PATCH-FIX-OPENSUSE neovim-0.1.7-bitop.patch mcepl@cepl.eu build with old Lua with external bit module +Patch1: neovim-0.1.7-bitop.patch +# fix build issue on ppc64 +Patch2: neovim-0.2.0-gcc-prototype.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: cmake +BuildRequires: desktop-file-utils BuildRequires: fdupes +BuildRequires: filesystem BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: git-core BuildRequires: gperf BuildRequires: hicolor-icon-theme BuildRequires: libmsgpack-devel >= 1.2.0 BuildRequires: libmsgpackc-devel >= 1.2.0 -BuildRequires: lua51-BitOp -BuildRequires: lua51-LPeg -BuildRequires: lua51-mpack +BuildRequires: libtool +# BuildRequires: lua53-devel +BuildRequires: lua53-lpeg +BuildRequires: lua53-luarocks +BuildRequires: lua53-mpack BuildRequires: luajit-devel BuildRequires: pkgconfig BuildRequires: update-desktop-files @@ -62,7 +80,7 @@ parts of Vim, without compromise, and more. %lang_package %prep -%setup -q +%autosetup -p1 # Remove __DATE__ and __TIME__. BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}') @@ -84,6 +102,14 @@ make %{?_smp_mflags} %install %cmake_install +# system-wide configuration file +install -D -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/nvim/sysinit.vim +%if 0%{?suse_version} +install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/nvim/template.spec +%else +install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/nvim/template.spec +%endif + %suse_update_desktop_file -r nvim ConsoleOnly Application Utility TextEditor %fdupes %{buildroot}%{_datadir}/ diff --git a/spec-template b/spec-template new file mode 100644 index 0000000..8143898 --- /dev/null +++ b/spec-template @@ -0,0 +1,37 @@ +Name: +Version: +Release: 1%{?dist} +Summary: + +License: +URL: +Source0: + +BuildRequires: +Requires: + +%description + + +%prep +%autosetup + + +%build +%configure +%make_build + + +%install +%make_install + + +%check + + +%files +%license +%doc + + +%changelog diff --git a/suse-spec-template b/suse-spec-template new file mode 100644 index 0000000..2c749ba --- /dev/null +++ b/suse-spec-template @@ -0,0 +1,50 @@ +# +# spec file for package specRPM_CREATION_NAME +# +# Copyright (c) specCURRENT_YEAR SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: specRPM_CREATION_NAME +Version: +Release: 0 +Summary: +# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses +License: +# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines" +Group: +Url: +Source: +BuildRequires: + +%description + +%prep +%setup -q + +%build +%configure +%make_build + +%install +%make_install + +%post +%postun + +%files +%license COPYING +%doc ChangeLog README + +%changelog diff --git a/sysinit.vim b/sysinit.vim new file mode 100644 index 0000000..66037d3 --- /dev/null +++ b/sysinit.vim @@ -0,0 +1,7 @@ +augroup Fedora + autocmd! + " RPM spec file template + autocmd BufNewFile *.spec silent! 0read /usr/share/nvim/template.spec +augroup END + +" vim: et ts=2 sw=2