File tea.spec of Package tea
#
# spec file for package tea
#
# 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: tea
Version: 44.0.0
Release: 0
Summary: Qt-based text editor with image viewer
License: GPL-3.0+
Group: Productivity/Text/Editors
Url: http://semiletov.org/tea
Source: http://semiletov.org/%{name}/dloads/%{name}-%{version}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.appdata.xml
BuildRequires: aspell-devel
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)
%description
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.
%prep
%setup -q
cp -f %{SOURCE1} %{name}.desktop
cp -f %{SOURCE2} %{name}.appdata.xml
%build
%qmake5 PREFIX=%{_prefix}
make %{?_smp_mflags} V=1
%install
%qmake5_install
install -Dpm 0644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dpm 0644 icons/%{name}-icon-v3-01.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
install -Dpm 0644 %{name}.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS* README TODO
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%changelog