File neovim-qt.spec of Package neovim-qt

#
# spec file for package neovim-qt
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           neovim-qt
Version:        0.2.8
Release:        1.00
Summary:        Neovim client library and GUI, in Qt5
License:        ISC
Group:          Productivity/Editors/Vi
Url:            https://github.com/equalsraf/neovim-qt
Source:         https://github.com/equalsraf/neovim-qt/archive/%{name}-%{version}.tar.gz
Source1:        neovim-qt.svg
Source2:        neovim-qt.desktop
# Patch0:         upper-umlauts.patch
BuildRequires:  neovim
BuildRequires:  hicolor-icon-theme
BuildRequires:  libmsgpack-devel >= 1.2.0
BuildRequires:  libmsgpackc-devel >= 1.2.0
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  update-desktop-files
Requires:       neovim

%description
Neovim-qt is a Qt5 library and a minimalistic GUI for Neovim.  Its
goals are modest:

  1) Provide Qt5 bindings to write Neovim clients and plugins in Qt;
  2) Cross platform GUI for Neovim.

%prep
%setup -q
# %patch0 -p2

%build

%cmake -DCMAKE_BUILD_TYPE=Release \
       -DUSE_SYSTEM_MSGPACK=ON \

make %{?_smp_mflags}

%install
# There is no `install` rule.

pushd build

# Install binary
install -D -m755 bin/nvim-qt             %{buildroot}%{_bindir}/nvim-qt

# Install lib
install -D -m664 lib/libneovim-qt-gui.so %{buildroot}/%{_libdir}/libneovim-qt-gui.so

popd

# Install icon.
install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

# Install desktop file.
install -D -m 644 %{SOURCE2} %{buildroot}/%{_datadir}/applications/%{name}.desktop

mkdir -p %{buildroot}%{_datadir}/nvim-qt/
cp    -r src/gui/runtime %{buildroot}%{_datadir}/nvim-qt/runtime

%suse_update_desktop_file -r neovim-qt Utility TextEditor

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc CONTRIBUTING.md LICENSE README.md
%{_bindir}/nvim-qt
%{_datadir}/applications/%{name}.desktop
%{_datadir}/nvim-qt/
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%{_libdir}/libneovim-qt-gui.so

%changelog
* Tue May  9 2017 ronisbr@gmail.com
- Run spec-cleaner.
- Add new build dependency: neovim.
- Version bump to 0.2.7.
  * No changelog available.
* Tue Mar  7 2017 ronisbr@gmail.com
- Version bump to 0.2.5.
  * No changelog available.
* Sat Nov 19 2016 ronisbr@gmail.com
- Version bump to 0.2.4.
  * No changelog available.
* Sun Oct  9 2016 ronisbr@gmail.com
- Version bump to 0.2.3.
  * No changelog available.
* Fri Aug 26 2016 ronisbr@gmail.com
- Version bump to 0.2.2.
  * No changelog available.
* Wed May 18 2016 ronisbr@gmail.com
- Initial commit.