]>
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 | |
ccead671 | 10 | Release: 0.2 |
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 |
ccead671 ER |
25 | BuildRequires: msgpack-devel >= 1.2.0 |
26 | BuildRequires: pkgconfig | |
27 | #BuildRequires: pkgconfig(vterm) | |
28 | BuildRequires: rpmbuild(macros) >= 1.596 | |
29 | BuildRequires: unibilium-devel | |
30 | %if %{with lua} | |
0a9d0af1 ER |
31 | BuildRequires: lua51-BitOp |
32 | BuildRequires: lua51-LPeg | |
33 | BuildRequires: lua51-mpack | |
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 | ||
ccead671 ER |
44 | %define _prefix /usr/local |
45 | ||
0a9d0af1 ER |
46 | %description |
47 | Neovim is a refactor - and sometimes redactor - in the tradition of | |
48 | Vim, which itself derives from Stevie. It is not a rewrite, but a | |
49 | continuation and extension of Vim. Many rewrites, clones, emulators | |
50 | and imitators exist; some are very clever, but none are Vim. Neovim | |
51 | strives to be a superset of Vim, notwithstanding some intentionally | |
52 | removed misfeatures; excepting those few and carefully-considered | |
53 | excisions, Neovim is Vim. It is built for users who want the good | |
54 | parts of Vim, without compromise, and more. | |
55 | ||
56 | %prep | |
57 | %setup -q | |
58 | ||
ccead671 | 59 | %if 0 |
0a9d0af1 ER |
60 | # Remove __DATE__ and __TIME__. |
61 | BUILD_TIME=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{H}:%{M}') | |
62 | BUILD_DATE=$(LC_ALL=C date -ur %{_sourcedir}/%{name}.changes +'%{b} %{d} %{Y}') | |
63 | sed -i "s/__TIME__/\"$BUILD_TIME\"/" $(grep -rl '__TIME__') | |
64 | sed -i "s/__DATE__/\"$BUILD_DATE\"/" $(grep -rl '__DATE__') | |
ccead671 | 65 | %endif |
0a9d0af1 ER |
66 | |
67 | %build | |
ccead671 | 68 | %if 0 |
0a9d0af1 ER |
69 | %cmake \ |
70 | -DLUA_PRG=%{_bindir}/lua \ | |
71 | -DUSE_BUNDLED=OFF \ | |
72 | -DLUAJIT_USE_BUNDLED=OFF \ | |
ccead671 ER |
73 | -DENABLE_JEMALLOC=ON \ |
74 | \ | |
75 | -DUSE_BUNDLED_JEMALLOC=ON \ | |
76 | -DUSE_BUNDLED_UNIBILIUM=ON \ | |
77 | -DUSE_BUNDLED_LIBTERMKEY=ON \ | |
78 | -DUSE_BUNDLED_LIBVTERM=ON \ | |
79 | -DUSE_BUNDLED_LIBUV=ON \ | |
80 | -DUSE_BUNDLED_MSGPACK=ON \ | |
81 | -DUSE_BUNDLED_LUAJIT=ON \ | |
82 | -DUSE_BUNDLED_LUAROCKS=ON \ | |
83 | -DUSE_BUNDLED_LUV=ON \ | |
84 | ||
85 | %endif | |
0a9d0af1 ER |
86 | |
87 | %{__make} | |
88 | ||
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | %{__make} install \ | |
92 | DESTDIR=$RPM_BUILD_ROOT | |
93 | ||
ccead671 | 94 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_iconsdir}/hicolor/scalable/apps} |
0a9d0af1 | 95 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/neovim.desktop |
ccead671 | 96 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/neovim.svg |
0a9d0af1 ER |
97 | |
98 | %find_lang nvim | |
99 | ||
100 | %clean | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %post | |
104 | %update_desktop_database | |
ccead671 | 105 | %update_icon_cache hicolor |
0a9d0af1 ER |
106 | |
107 | %postun | |
108 | %update_desktop_database | |
ccead671 | 109 | %update_icon_cache hicolor |
0a9d0af1 ER |
110 | |
111 | %files -f nvim.lang | |
112 | %defattr(644,root,root,755) | |
113 | %doc BACKERS.md CONTRIBUTING.md LICENSE README.md | |
114 | %attr(755,root,root) %{_bindir}/nvim | |
115 | %{_datadir}/nvim | |
116 | %{_desktopdir}/%{name}.desktop | |
117 | %{_iconsdir}/hicolor/*/apps/%{name}.svg | |
118 | %{_mandir}/man1/nvim.1* |