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