File vim-completor.spec of Package vim-completor

%global debug_package %{nil}
%if 0%{?suse_version}
%define vim_dir current
%define vim_dir vimfiles
Name:           vim-completor
Version:        318.b23e8b8
Release:        1%{?dist}
Summary:        Async completion framework for the Vim editor
License:        MIT
Source0:        %{name}-git-%{version}.tar.xz
Conflicts:      vim-youcompleteme

Completor is an asynchronous code completion framework for vim8. New features of vim8 are used to implement the fast completion engine with low overhead.
For using semantic completion, the sub-packages for completer should be installed.

%define add_subpackage(n:)                                                          \
%package %{-n*}                                                                     \
Summary:        Completion support for %{-n*} programming language                  \
Requires:       %{name} =  %{version}-%{release}                                    \
Requires:       %*                                                                  \
%description %{-n*}                                                                 \
Adds completion support for the %{-n*} programming language for %{name}             \

# Uncomment when racer package is available.
# %%add_subpackage -n rust racer
# Uncomment when gocode package is available.
# %%add_subpackage -n go gocode
%add_subpackage -n python python3-jedi
%add_subpackage -n js nodejs-tern
%add_subpackage -n cpp clang

%setup -qn completor.vim


install -Dm0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/COPYING
mkdir -p %{buildroot}%{_datadir}/vim/%{vim_dir}/
cp -r {autoload,doc,plugin,pythonx} %{buildroot}/%{_datadir}/vim/%{vim_dir}/

# Set permissions
find %{buildroot} -type d -exec chmod 0755 {} \;
find %{buildroot} -type f -exec chmod 0644 {} \;

vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags /usr/share/vim/%{vim_dir}/doc/' '+qa!' < /dev/null &> /dev/null

vim -u NONE -U NONE -X -n '+set nobackup nomore' '+helptags /usr/share/vim/%{vim_dir}/doc/' '+qa!' < /dev/null &> /dev/null

%dir %{_datadir}/vim/%{vim_dir}/pythonx

# %%files rust
# %%{_datadir}/vim/%%{vim_dir}/pythonx/completers/

# %%files go
# %%{_datadir}/vim/%%{vim_dir}/pythonx/completers/

%files python

%files js

%files cpp

* Tue Nov 13 2018 Ben Reedy <> - 318.b23e8b8-1
- Update to latest git commit

* Wed Apr 18 2018 Ben Reedy <> - 246.9ef09cf-1
- Update to latest git commit

* Sat Jan 06 2018 Ben Reedy <> - 228.f978a21-1
- Initial package