]> git.pld-linux.org Git - packages/neovim.git/blob - neovim.spec
d31c4f8100d0878b66c65126e45cd9767e28535e
[packages/neovim.git] / neovim.spec
1 # TODO
2 # - -rt subpackage? -lang subpackage?
3 #
4 # Conditional build:
5 %bcond_with     lua             # LUA
6
7 Summary:        Vim-fork focused on extensibility and agility
8 Name:           neovim
9 Version:        0.1.5
10 Release:        0.2
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
17 BuildRequires:  cmake >= 2.8.7
18 BuildRequires:  fdupes
19 BuildRequires:  gcc >= 6:4.4
20 BuildRequires:  hicolor-icon-theme
21 BuildRequires:  jemalloc-devel
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  libtermkey-devel
24 BuildRequires:  libuv-devel
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}
31 BuildRequires:  lua51-BitOp
32 BuildRequires:  lua51-LPeg
33 BuildRequires:  lua51-mpack
34 BuildRequires:  luajit-devel
35 %endif
36 Requires:       desktop-file-utils
37 Requires:       gtk-update-icon-cache
38 Requires:       hicolor-icon-theme
39 Suggests:       python-neovim
40 Suggests:       python3-neovim
41 Suggests:       xsel
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _prefix /usr/local
45
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
59 %if 0
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__')
65 %endif
66
67 %build
68 %if 0
69 %cmake \
70         -DLUA_PRG=%{_bindir}/lua \
71         -DUSE_BUNDLED=OFF               \
72         -DLUAJIT_USE_BUNDLED=OFF \
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
86
87 %{__make}
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91 %{__make} install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_iconsdir}/hicolor/scalable/apps}
95 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/neovim.desktop
96 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/scalable/apps/neovim.svg
97
98 %find_lang nvim
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post
104 %update_desktop_database
105 %update_icon_cache hicolor
106
107 %postun
108 %update_desktop_database
109 %update_icon_cache hicolor
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*
This page took 0.097113 seconds and 3 git commands to generate.