]>
Commit | Line | Data |
---|---|---|
0a9d0af1 ER |
1 | # TODO |
2 | # - -rt subpackage? -lang subpackage? | |
ccead671 ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_with lua # LUA | |
6 | ||
0a9d0af1 ER |
7 | Summary: Vim-fork focused on extensibility and agility |
8 | Name: neovim | |
9 | Version: 0.1.5 | |
7d69921c | 10 | Release: 0.4 |
0a9d0af1 ER |
11 | License: Apache v2.0 |
12 | Group: Applications/Editors/Vim | |
13 | Source0: https://github.com/neovim/neovim/archive/v%{version}/%{name}-%{version}.tar.gz | |
14 | URL: https://neovim.io/ | |
15 | Source1: %{name}.desktop | |
16 | Source2: %{name}.svg | |
ccead671 | 17 | BuildRequires: cmake >= 2.8.7 |
0a9d0af1 | 18 | BuildRequires: fdupes |
ccead671 | 19 | BuildRequires: gcc >= 6:4.4 |
0a9d0af1 ER |
20 | BuildRequires: hicolor-icon-theme |
21 | BuildRequires: jemalloc-devel | |
0a9d0af1 | 22 | BuildRequires: libstdc++-devel |
ccead671 | 23 | BuildRequires: libtermkey-devel |
0a9d0af1 | 24 | BuildRequires: libuv-devel |
7d69921c ER |
25 | BuildRequires: libvterm-devel |
26 | BuildRequires: msgpack-devel >= 1.1.0 | |
ccead671 | 27 | BuildRequires: pkgconfig |
ccead671 ER |
28 | BuildRequires: rpmbuild(macros) >= 1.596 |
29 | BuildRequires: unibilium-devel | |
30 | %if %{with lua} | |
7d69921c ER |
31 | BuildRequires: lua-lpeg |
32 | BuildRequires: lua-mpack >= 1.0.2 | |
0a9d0af1 | 33 | BuildRequires: lua51-BitOp |
0a9d0af1 | 34 | BuildRequires: luajit-devel |
ccead671 ER |
35 | %endif |
36 | Requires: desktop-file-utils | |
37 | Requires: gtk-update-icon-cache | |
38 | Requires: hicolor-icon-theme | |
0a9d0af1 ER |
39 | Suggests: python-neovim |
40 | Suggests: python3-neovim | |
41 | Suggests: xsel | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
a2169a2f ER |
44 | # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently |
45 | # does not work with Neovim due to some uses of dynamically-sized structures. | |
46 | # See https://github.com/neovim/neovim/issues/223 for details. | |
47 | %define filterout_c -Wp,-D_FORTIFY_SOURCE=2 | |
48 | ||
0a9d0af1 ER |
49 | %description |
50 | Neovim is a refactor - and sometimes redactor - in the tradition of | |
51 | Vim, which itself derives from Stevie. It is not a rewrite, but a | |
52 | continuation and extension of Vim. Many rewrites, clones, emulators | |
53 | and imitators exist; some are very clever, but none are Vim. Neovim | |
54 | strives to be a superset of Vim, notwithstanding some intentionally | |
55 | removed misfeatures; excepting those few and carefully-considered | |
56 | excisions, Neovim is Vim. It is built for users who want the good | |
57 | parts of Vim, without compromise, and more. | |
58 | ||
59 | %prep | |
60 | %setup -q | |
61 | ||
ccead671 | 62 | %if 0 |
0a9d0af1 ER |
63 | # Remove __DATE__ and __TIME__. |
64 | BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}') | |
65 | BUILD_DATE=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{b} %{d} %{Y}') | |
66 | sed -i "s/__TIME__/\"$BUILD_TIME\"/" $(grep -rl '__TIME__') | |
67 | sed -i "s/__DATE__/\"$BUILD_DATE\"/" $(grep -rl '__DATE__') | |
ccead671 | 68 | %endif |
0a9d0af1 ER |
69 | |
70 | %build | |
7d69921c ER |
71 | install -d .deps build |
72 | cd .deps | |
0a9d0af1 | 73 | %cmake \ |
7d69921c ER |
74 | -DUSE_BUNDLED=OFF \ |
75 | -DUSE_BUNDLED_JEMALLOC=OFF \ | |
76 | -DUSE_BUNDLED_UNIBILIUM=OFF \ | |
77 | -DUSE_BUNDLED_LIBTERMKEY=OFF \ | |
78 | -DUSE_BUNDLED_LIBVTERM=OFF \ | |
79 | -DUSE_BUNDLED_LIBUV=OFF \ | |
80 | -DUSE_BUNDLED_MSGPACK=OFF \ | |
ccead671 ER |
81 | -DUSE_BUNDLED_LUAJIT=ON \ |
82 | -DUSE_BUNDLED_LUAROCKS=ON \ | |
83 | -DUSE_BUNDLED_LUV=ON \ | |
7d69921c ER |
84 | ../third-party |
85 | %{__make} | |
ccead671 | 86 | |
7d69921c ER |
87 | cd ../build |
88 | %cmake \ | |
89 | -DLUA_PRG=/usr/bin/luajit \ | |
90 | -DENABLE_JEMALLOC=ON \ | |
91 | -DLUAJIT_USE_BUNDLED=OFF \ | |
92 | -DLIBUV_USE_BUNDLED=OFF \ | |
93 | -DMSGPACK_USE_BUNDLED=OFF \ | |
94 | -DUNIBILIUM_USE_BUNDLED=OFF \ | |
95 | -DLIBTERMKEY_USE_BUNDLED=OFF \ | |
96 | -DLIBVTERM_USE_BUNDLED=OFF \ | |
97 | -DJEMALLOC_USE_BUNDLED=OFF \ | |
98 | .. | |
0a9d0af1 ER |
99 | |
100 | %{__make} | |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
7d69921c | 104 | %{__make} -C build install \ |
0a9d0af1 ER |
105 | DESTDIR=$RPM_BUILD_ROOT |
106 | ||
ccead671 | 107 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_iconsdir}/hicolor/scalable/apps} |
0a9d0af1 | 108 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/neovim.desktop |
ccead671 | 109 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/neovim.svg |
0a9d0af1 ER |
110 | |
111 | %find_lang nvim | |
112 | ||
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post | |
117 | %update_desktop_database | |
ccead671 | 118 | %update_icon_cache hicolor |
b086dcf2 ER |
119 | %banner -e -o %{name} << 'EOF' |
120 | ||
121 | The Neovim executable is called 'nvim'. To use your existing Vim | |
122 | configuration: | |
123 | ln -s ~/.vim ~/.config/nvim | |
124 | ln -s ~/.vimrc ~/.config/nvim/init.vim | |
125 | See ':help nvim' for more information on Neovim. | |
126 | ||
127 | If you want support for Python plugins such as YouCompleteMe, you need | |
128 | to install a Python module in addition to Neovim itself. | |
129 | ||
130 | See ':help provider-python' or this page for more information: | |
131 | http://neovim.io/doc/user/provider.html | |
132 | ||
133 | If you have any questions, have a look at: | |
134 | https://github.com/neovim/neovim/wiki/FAQ. | |
135 | EOF | |
0a9d0af1 ER |
136 | |
137 | %postun | |
138 | %update_desktop_database | |
ccead671 | 139 | %update_icon_cache hicolor |
0a9d0af1 ER |
140 | |
141 | %files -f nvim.lang | |
142 | %defattr(644,root,root,755) | |
143 | %doc BACKERS.md CONTRIBUTING.md LICENSE README.md | |
144 | %attr(755,root,root) %{_bindir}/nvim | |
145 | %{_datadir}/nvim | |
146 | %{_desktopdir}/%{name}.desktop | |
147 | %{_iconsdir}/hicolor/*/apps/%{name}.svg | |
148 | %{_mandir}/man1/nvim.1* |