File tea.spec of Package tea

# spec file for package tea
# Copyright (c) 2018 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

Name:           tea
Version:        44.1.1
Release:        0
Summary:        Qt-based text editor with image viewer
License:        GPL-3.0-or-later
Group:          Productivity/Text/Editors
Source1:        org.semiletov.tea.desktop
Source2:        org.semiletov.tea.appdata.xml
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  pkgconfig(Qt5Quick)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(hunspell)
BuildRequires:  pkgconfig(zlib)

TEA is a Qt-based text editor. It supports reading FB2, ODT, RTF,
DOCX, Abiword, KWord KWD and SWX documents, though only writes out
plaintext. Image viewing is possible as well. It has a built-in
Midnight-Commander-style file manager, integrates spell checking
(aspell/hunspell), and syntax highlighting for a number of languages.

%setup -q
cp -f %{SOURCE1} org.semiletov.tea.desktop
cp -f %{SOURCE2} org.semiletov.tea.appdata.xml
sed -i '/^INSTALLS += /s/ desktop//'

%qmake5 PREFIX=%{_prefix}
make %{?_smp_mflags} V=1


install -Dpm 0644 org.semiletov.tea.desktop %{buildroot}%{_datadir}/applications/org.semiletov.tea.desktop
install -Dpm 0644 icons/%{name}-icon-v3-01.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%if 0%{?suse_version} >= 1500
install -Dpm 0644 org.semiletov.tea.appdata.xml %{buildroot}%{_datadir}/metainfo/org.semiletov.tea.appdata.xml
install -Dpm 0644 org.semiletov.tea.appdata.xml %{buildroot}%{_datadir}/appdata/org.semiletov.tea.appdata.xml

%if 0%{?suse_version} < 1500


%if 0%{?suse_version} >= 1500
%license COPYING
%if 0%{?suse_version} >= 1500
%dir %{_datadir}/metainfo/
%dir %{_datadir}/appdata/

openSUSE Build Service is sponsored by