Accepting request 1182975 from editors
OBS-URL: https://build.opensuse.org/request/show/1182975 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/neovim?expand=0&rev=63
This commit is contained in:
commit
64a7d0a47a
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 21 23:49:59 UTC 2024 - Richard Rahl <rrahl0@disroot.org>
|
||||
|
||||
- add new make and runtime dependencies (Closes #1225887)
|
||||
- enable LTO
|
||||
- fix spec template creation (fill in macros)
|
||||
- switch to more common defaults in the spec template
|
||||
- turn off the usage of the bundled luajit
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 3 20:47:10 UTC 2024 - Alexandru Gabriel Bradatan <alex.bradatan85@yahoo.it>
|
||||
|
||||
|
77
neovim.spec
77
neovim.spec
@ -36,6 +36,7 @@ URL: https://neovim.io/
|
||||
Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: sysinit.vim
|
||||
Source3: suse-spec-template
|
||||
Source4: spec.vim
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: fdupes
|
||||
@ -46,10 +47,26 @@ BuildRequires: git-core
|
||||
BuildRequires: gperf
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: lua51-bit32
|
||||
BuildRequires: lua51-compat-5.3
|
||||
BuildRequires: lua51-lpeg
|
||||
BuildRequires: lua51-luarocks
|
||||
BuildRequires: lua51-luv
|
||||
BuildRequires: lua51-mpack
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: tree-sitter
|
||||
BuildRequires: tree-sitter-c
|
||||
BuildRequires: tree-sitter-lua
|
||||
BuildRequires: tree-sitter-markdown
|
||||
BuildRequires: tree-sitter-python
|
||||
BuildRequires: tree-sitter-query
|
||||
BuildRequires: tree-sitter-vim
|
||||
BuildRequires: tree-sitter-vimdoc
|
||||
BuildRequires: unzip
|
||||
BuildRequires: pkgconfig(libluv)
|
||||
BuildRequires: pkgconfig(libutf8proc)
|
||||
BuildRequires: pkgconfig(libuv) >= 1.42.0
|
||||
BuildRequires: pkgconfig(msgpack-c)
|
||||
@ -57,32 +74,35 @@ BuildRequires: pkgconfig(termkey)
|
||||
BuildRequires: pkgconfig(tree-sitter) >= 0.20.9
|
||||
BuildRequires: pkgconfig(unibilium) >= 2.0.0
|
||||
BuildRequires: pkgconfig(vterm) >= 0.3.3
|
||||
Requires: gperf
|
||||
Requires: libvterm0 >= 0.3
|
||||
Requires: xdg-utils
|
||||
|
||||
Recommends: wl-clipboard
|
||||
Recommends: xsel
|
||||
|
||||
BuildRequires: libluv-devel
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: lua51-LPeg
|
||||
BuildRequires: lua51-bit32
|
||||
BuildRequires: lua51-luarocks
|
||||
BuildRequires: lua51-luv
|
||||
BuildRequires: lua51-mpack
|
||||
%if %{with luajit}
|
||||
BuildRequires: luajit-devel
|
||||
BuildRequires: pkgconfig(luajit)
|
||||
%else
|
||||
BuildRequires: lua51-BitOp
|
||||
BuildRequires: lua51-devel
|
||||
%endif
|
||||
Requires: gperf
|
||||
Requires: libvterm0 >= 0.3
|
||||
Requires: lua51-bit32
|
||||
Requires: lua51-compat-5.3
|
||||
Requires: lua51-lpeg
|
||||
Requires: lua51-luarocks
|
||||
Requires: lua51-luv
|
||||
Requires: lua51-mpack
|
||||
Requires: tree-sitter
|
||||
Requires: tree-sitter-c
|
||||
Requires: tree-sitter-lua
|
||||
Requires: tree-sitter-markdown
|
||||
Requires: tree-sitter-python
|
||||
Requires: tree-sitter-query
|
||||
Requires: tree-sitter-vim
|
||||
Requires: tree-sitter-vimdoc
|
||||
Requires: xdg-utils
|
||||
Recommends: python3-neovim
|
||||
|
||||
Recommends: wl-clipboard
|
||||
Recommends: xsel
|
||||
Suggests: ripgrep
|
||||
Provides: nvim
|
||||
%lang_package
|
||||
|
||||
%description
|
||||
Neovim is a refactor - and sometimes redactor - in the tradition of
|
||||
@ -94,10 +114,6 @@ removed misfeatures; excepting those few and carefully-considered
|
||||
excisions, Neovim is Vim. It is built for users who want the good
|
||||
parts of Vim, without compromise, and more.
|
||||
|
||||
%lang_package
|
||||
|
||||
%define vimplugin_dir %{_datadir}/vim/site
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
@ -111,29 +127,24 @@ sed -i "s/__DATE__/\"$BUILD_DATE\"/" $(grep -rl '__DATE__')
|
||||
# set vars to make build reproducible in spite of config/CMakeLists.txt
|
||||
HOSTNAME=OBS
|
||||
USERNAME=OBS
|
||||
mkdir -p build
|
||||
pushd build
|
||||
export CFLAGS="%{optflags} -fcommon"
|
||||
export CXXFLAGS="%{optflags} -fcommon"
|
||||
%{__cmake} .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPREFER_LUA=%{?with_luajit:OFF}%{!?with_luajit:ON} \
|
||||
-DLUA_PRG=%{_bindir}/%{?with_luajit:luajit}%{!?with_luajit:lua} \
|
||||
%if %{with luajit}
|
||||
-DLUAJIT_INCLUDE_DIR:PATH=%(pkg-config --cflags-only-I luajit|cut -c 3-) \
|
||||
%endif
|
||||
-DUSE_BUNDLED=OFF -DLUAJIT_USE_BUNDLED=ON \
|
||||
-DUSE_BUNDLED=OFF -DLUAJIT_USE_BUNDLED=OFF \
|
||||
-DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_COLOR_MAKEFILE=OFF \
|
||||
-DCMAKE_COLOR_MAKEFILE=OFF -DLTO_ENABLE=ON \
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$opts" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DLIBLUV_INCLUDE_DIR:PATH=%{lua_incdir}
|
||||
|
||||
%make_build
|
||||
|
||||
popd
|
||||
|
||||
%install
|
||||
%{?!cmake_install:%define cmake_install DESTDIR=%{buildroot} make install -C build}
|
||||
%cmake_install
|
||||
|
||||
# system-wide configuration file
|
||||
@ -142,6 +153,7 @@ ln -sf %{_sysconfdir}/nvim/sysinit.vim %{buildroot}%{_datadir}/nvim/sysinit.vim
|
||||
|
||||
# install SUSE specific spec template
|
||||
install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/nvim/template.spec
|
||||
install -p -m 644 %{SOURCE4} %{buildroot}%{_datadir}/nvim/runtime/plugin/spec.vim
|
||||
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
|
||||
runtime/nvim.desktop
|
||||
@ -158,6 +170,13 @@ mkdir -p %{buildroot}%{vimplugin_dir}/{after,after/syntax,autoload,colors,doc,ft
|
||||
%fdupes %{buildroot}%{_datadir}/
|
||||
%find_lang nvim
|
||||
|
||||
# let's make tree-sitter grammars visible to neovim
|
||||
install -d %{buildroot}%{_datadir}/nvim/runtime/parser
|
||||
for i in c lua markdown python query vim vimdoc; do
|
||||
ln -s %{_libdir}/libtree-sitter-$i.so %{buildroot}%{_datadir}/nvim/runtime/parser/$i.so;
|
||||
done
|
||||
ln -s %{_libdir}/libtree-sitter-markdown-inline.so %{buildroot}%{_datadir}/nvim/runtime/parser/markdown_inline.so
|
||||
|
||||
# We have to have rpath
|
||||
# https://en.opensuse.org/openSUSE:Packaging_checks
|
||||
export NO_BRP_CHECK_RPATH=true
|
||||
@ -167,7 +186,7 @@ export NO_BRP_CHECK_RPATH=true
|
||||
%docdir %{_mandir}
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/nvim
|
||||
%{_mandir}/man1/nvim.1%{?ext_man}
|
||||
%{_mandir}/man?/nvim.1%{?ext_man}
|
||||
%dir %{_datadir}/nvim
|
||||
%{_datadir}/nvim/sysinit.vim
|
||||
%{_datadir}/nvim/template.spec
|
||||
|
40
spec.vim
Normal file
40
spec.vim
Normal file
@ -0,0 +1,40 @@
|
||||
if exists("loaded_spec") || &cp
|
||||
finish
|
||||
endif
|
||||
let loaded_spec = 1
|
||||
|
||||
function! SKEL_spec()
|
||||
0r /usr/share/vim/current/skeletons/skeleton.spec
|
||||
language time en_US
|
||||
if $USER != ''
|
||||
let login = $USER
|
||||
elseif $LOGNAME != ''
|
||||
let login = $LOGNAME
|
||||
else
|
||||
let login = 'unknown'
|
||||
endif
|
||||
let newline = stridx(login, "\n")
|
||||
if newline != -1
|
||||
let login = strpart(login, 0, newline)
|
||||
endif
|
||||
if $HOSTNAME != ''
|
||||
let hostname = $HOSTNAME
|
||||
else
|
||||
let hostname = system('hostname -f')
|
||||
if v:shell_error
|
||||
let hostname = 'localhost'
|
||||
endif
|
||||
endif
|
||||
let newline = stridx(hostname, "\n")
|
||||
if newline != -1
|
||||
let hostname = strpart(hostname, 0, newline)
|
||||
endif
|
||||
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
|
||||
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
|
||||
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
|
||||
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
|
||||
setf spec
|
||||
endfunction
|
||||
|
||||
" Skeleton for spec files
|
||||
autocmd BufNewFile *.spec call SKEL_spec()
|
@ -19,13 +19,11 @@
|
||||
Name: specRPM_CREATION_NAME
|
||||
Version:
|
||||
Release: 0
|
||||
Summary:
|
||||
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:
|
||||
Source0:
|
||||
BuildRequires:
|
||||
|
||||
%description
|
||||
@ -44,7 +42,7 @@ BuildRequires:
|
||||
%postun
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc ChangeLog README
|
||||
%license LICENSE
|
||||
%doc README.md ChangeLog
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user