File deepin-screenshot.spec of Package deepin-screenshot

# spec file for package deepin-screenshot
# Copyright (c) 2020 SUSE LLC
# 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:           deepin-screenshot
Version:        4.2.2
Release:        0
Summary:        Deepin Screenshot
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/Convertors
Source1:        %{name}.appdata.xml
# PATCH-FIX-UPSTEAM deepin-screenshot-Qt-5_15.patch - Support Qt 5.15
Patch0:         %{name}-Qt-5_15.patch
BuildRequires:  appstream-glib
BuildRequires:  cmake
BuildRequires:  deepin-gettext-tools
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  libqt5-linguist
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(dtkwidget)
BuildRequires:  pkgconfig(dtkwm)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xtst)
Requires:       deepin-turbo
Requires:       desktop-file-utils
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Provide a quite easy-to-use screenshot tool. Features:
  * Global hotkey to triggle screenshot tool
  * Take screenshot of a selected area
  * Easy to add text and line drawings onto the screenshot


%setup -q
%if 0%{?suse_version} > 1500
%patch0 -p1
sed -i 's/lrelease/lrelease-qt5/g'
sed -i 's/Delay_Screenshot/X-Delay_Screenshot/g;s/Full_Screenshot/X-Full_Screenshot/g' %{name}.desktop


install -Dm644 %SOURCE1 %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml

%suse_update_desktop_file -r -u %{name} GTK GNOME Utility X-GNOME-Utilities X-SuSE-DesktopUtility
sed -i '/NoDisplay/s|true|false|' %{buildroot}%{_datadir}/applications/%{name}.desktop
%fdupes %{buildroot}%{_prefix}

%license LICENSE

%files lang