File litetran.spec of Package litetran

#
# spec file for package litetran
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


Name:           litetran
Version:        @SERVICE@
Release:        0
Summary:        The powerful translator on Qt
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/Other
URL:            https://gfarniev.bitbucket.io/litetran
Source:         %{name}-%{version}.tar.xz
Patch0:         %{name}-fix-qt-5.11.patch
BuildRequires:  cmake
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)

%description
LiteTran is simple text translate utility. It uses Yandex.Translate.
Features:
 - User-friendly interface
 - Translation of selected text in popup (Alt+T by default)
 - No annoying windows - only small popup with translation
 - It's possible to choose only necessary languages to show in interface
 - Tray icon to keep LiteTran always running

%prep
%setup -q
%patch0 -p1

%build
%cmake \
    -DCMAKE_CXX_FLAGS="%{optflags} -fPIE" \
    -DCMAKE_EXE_LINKER_FLAGS="-pie"
make %{?_smp_mflags}

%install
%cmake_install

%files
%doc %attr(0644,root,root) README.md RELNOTES.txt
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%license %attr(0644,root,root) LICENSE.txt

%changelog
openSUSE Build Service is sponsored by