]> git.pld-linux.org Git - packages/neovim.git/blame - neovim.spec
up to 0.9.1
[packages/neovim.git] / neovim.spec
CommitLineData
0a9d0af1
ER
1# TODO
2# - -rt subpackage? -lang subpackage?
ccead671
ER
3#
4# Conditional build:
1b20afad
ER
5%bcond_with prefer_lua # Prefer Lua over LuaJit
6
68403de9 7%ifnarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 mipsel ppc
53acdf9b 8%define with_prefer_lua 1
1b20afad 9%endif
ccead671 10
68403de9
JP
11%if %{with prefer_lua}
12%define luv_includedir /usr/include/lua5.1
13%define luv_library /usr/%{_lib}/lua/5.1/luv.so
14%else
15%define luv_includedir /usr/include/luajit-2.1
16%define luv_library /usr/%{_lib}/luajit/2.1/luv.so
17%endif
18
0a9d0af1
ER
19Summary: Vim-fork focused on extensibility and agility
20Name: neovim
ba36db21 21Version: 0.9.1
829eb63b 22Release: 1
0a9d0af1
ER
23License: Apache v2.0
24Group: Applications/Editors/Vim
6b16d9c4 25# Source0Download: https://github.com/neovim/neovim/releases
0a9d0af1 26Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz
ba36db21 27# Source0-md5: e7677dbba956c71508cf298a9f4e11ac
0a9d0af1 28URL: https://neovim.io/
0a9d0af1 29Source2: %{name}.svg
6b16d9c4 30Patch0: desktop.patch
87eb7082 31Patch1: build-type.patch
aa9cae8d 32Patch2: luv.patch
68403de9 33BuildRequires: cmake >= 3.10
ccead671 34BuildRequires: gcc >= 6:4.4
1fb17d62 35BuildRequires: gettext-tools
0a9d0af1 36BuildRequires: libstdc++-devel
87eb7082 37BuildRequires: libtermkey-devel >= 0.22
db104e7b 38BuildRequires: libuv-devel >= 1.28.0
87eb7082 39BuildRequires: libvterm-devel >= 0.3
1ffaa605
ER
40BuildRequires: lua-bitop >= 1.0.2
41BuildRequires: lua-lpeg
42BuildRequires: lua-mpack >= 1.0.2
7d69921c 43BuildRequires: msgpack-devel >= 1.1.0
ccead671 44BuildRequires: pkgconfig
6c39e619 45BuildRequires: rpm-build >= 4.6
55431efd 46BuildRequires: rpmbuild(macros) >= 1.605
aa9cae8d 47BuildRequires: tree-sitter-devel >= 0.20.8
6fff6319 48BuildRequires: unibilium-devel >= 2.0.0
1b20afad 49%if %{with prefer_lua}
2d2f06ed 50BuildRequires: lua51
1a0c55f9 51BuildRequires: lua51-devel
68403de9 52BuildRequires: lua51-luv-devel >= 1.43.0
1ffaa605 53%else
9ed1ea4f 54BuildRequires: luajit
1ffaa605 55BuildRequires: luajit-devel
68403de9 56BuildRequires: luajit-luv-devel >= 1.43.0
ccead671 57%endif
87eb7082 58Requires: libtermkey >= 0.22
db104e7b 59Requires: libuv >= 1.28.0
87eb7082 60Requires: libvterm >= 0.3
e4135160 61Requires: %{?with_prefer_lua:lua51}%{!?with_prefer_lua:luajit}-luv
aa9cae8d 62Requires: tree-sitter >= 0.20.8
6c39e619 63Suggests: %{name}-desktop = %{version}-%{release}
0a9d0af1
ER
64Suggests: python-neovim
65Suggests: python3-neovim
3f05c041 66Suggests: ruby-neovim
0a9d0af1
ER
67Suggests: xsel
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
a2169a2f
ER
70# gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently
71# does not work with Neovim due to some uses of dynamically-sized structures.
72# See https://github.com/neovim/neovim/issues/223 for details.
73%define filterout_c -Wp,-D_FORTIFY_SOURCE=2
74
0a9d0af1
ER
75%description
76Neovim is a refactor - and sometimes redactor - in the tradition of
77Vim, which itself derives from Stevie. It is not a rewrite, but a
78continuation and extension of Vim. Many rewrites, clones, emulators
79and imitators exist; some are very clever, but none are Vim. Neovim
80strives to be a superset of Vim, notwithstanding some intentionally
81removed misfeatures; excepting those few and carefully-considered
82excisions, Neovim is Vim. It is built for users who want the good
83parts of Vim, without compromise, and more.
84
6c39e619
JP
85%package desktop
86Summary: Desktop files for Neovim
87Group: Applications/Editors/Vim
88Requires(post,postun): desktop-file-utils
89Requires(post,postun): gtk-update-icon-cache
90Requires(post,postun): hicolor-icon-theme
4bf4013f 91Requires: %{name} = %{version}-%{release}
6c39e619
JP
92BuildArch: noarch
93
94%description desktop
95Desktop files for Neovim.
96
0a9d0af1
ER
97%prep
98%setup -q
81796542 99%patch0 -p1
87eb7082 100%patch1 -p1
aa9cae8d 101%patch2 -p1 -R
0a9d0af1 102
0a9d0af1 103%build
68403de9 104%cmake -B build \
1b20afad 105 -DPREFER_LUA=%{!?with_prefer_lua:OFF}%{?with_prefer_lua:ON} \
68403de9 106 -DLUA_PRG=%{!?with_prefer_lua:/usr/bin/luajit}%{?with_prefer_lua:/usr/bin/lua5.1} \
5a19c3a0 107 -DLUA_INCLUDE_DIR=/usr/include/lua5.1 \
68403de9 108 -DUSE_BUNDLED=OFF \
7d69921c 109 -DENABLE_JEMALLOC=ON \
68403de9
JP
110 -DLIBLUV_INCLUDE_DIR=%{luv_includedir} \
111 -DLIBLUV_LIBRARY=%{luv_library}
0a9d0af1 112
68403de9 113%{__make} -C build
0a9d0af1
ER
114
115%install
116rm -rf $RPM_BUILD_ROOT
7d69921c 117%{__make} -C build install \
0a9d0af1
ER
118 DESTDIR=$RPM_BUILD_ROOT
119
6b16d9c4 120install -d $RPM_BUILD_ROOT{/etc/xdg/nvim,%{_iconsdir}/hicolor/scalable/apps}
3fb7b0d6 121touch $RPM_BUILD_ROOT/etc/xdg/nvim/init.vim
6b16d9c4 122cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/nvim.svg
0a9d0af1 123
46240029
ER
124%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cs.cp1250
125%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ja.euc-jp
46240029
ER
126%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ko.UTF-8
127%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
128%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/pl.UTF-8
46240029 129%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sk.cp1250
46240029 130%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_CN.UTF-8
46240029
ER
131%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_TW.UTF-8
132
0a9d0af1
ER
133%find_lang nvim
134
135%clean
136rm -rf $RPM_BUILD_ROOT
137
138%post
b086dcf2
ER
139%banner -e -o %{name} << 'EOF'
140
141The Neovim executable is called 'nvim'. To use your existing Vim
142configuration:
143 ln -s ~/.vim ~/.config/nvim
144 ln -s ~/.vimrc ~/.config/nvim/init.vim
145See ':help nvim' for more information on Neovim.
146
147If you want support for Python plugins such as YouCompleteMe, you need
148to install a Python module in addition to Neovim itself.
149
150See ':help provider-python' or this page for more information:
151 http://neovim.io/doc/user/provider.html
152
153If you have any questions, have a look at:
154 https://github.com/neovim/neovim/wiki/FAQ.
155EOF
0a9d0af1 156
6c39e619
JP
157%post desktop
158%update_desktop_database
159%update_icon_cache hicolor
160
161%postun desktop
0a9d0af1 162%update_desktop_database
ccead671 163%update_icon_cache hicolor
0a9d0af1
ER
164
165%files -f nvim.lang
166%defattr(644,root,root,755)
68403de9 167%doc BACKERS.md CONTRIBUTING.md LICENSE.txt README.md
3fb7b0d6
ER
168%dir /etc/xdg/nvim
169%config(noreplace) %verify(not md5 mtime size) /etc/xdg/nvim/init.vim
0a9d0af1 170%attr(755,root,root) %{_bindir}/nvim
0a9d0af1 171%{_mandir}/man1/nvim.1*
6b16d9c4 172%{_datadir}/nvim
6c39e619
JP
173
174%files desktop
175%defattr(644,root,root,755)
6b16d9c4 176%{_desktopdir}/nvim.desktop
68403de9 177%{_iconsdir}/hicolor/*/apps/nvim.png
6b16d9c4 178%{_iconsdir}/hicolor/*/apps/nvim.svg
This page took 0.335418 seconds and 4 git commands to generate.