File deepin-screenshot.spec of Package deepin-screenshot

#
# spec file for package deepin-screenshot
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 PERLUR Group
# Copyright (c) 2018 Mark Stopka <mark.stopka@perlur.cloud>
#
# 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:           deepin-screenshot
Version:        4.1.4
Release:        0
Summary:        Deepin Screenshot
License:        GPL-3.0
Group:          Productivity/Graphics/Convertors
Url:            https://github.com/linuxdeepin/deepin-screenshot
Source0:        https://github.com/linuxdeepin/deepin-screenshot/archive/%{version}/%{name}-%{version}.tar.gz
Source1:        %{name}-appdata.xml
BuildRequires:  fdupes
BuildRequires:  pkgconfig(dtkwidget)
BuildRequires:  pkgconfig(dtkwm)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  libqt5-linguist
BuildRequires:  appstream-glib
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  deepin-gettext-tools
Requires:       desktop-file-utils
Recommends:     %{name}-lang
Recommends:     deepin-shortcut-viewer
Recommends:     deepin-notifications
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
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

%description -l zh_CN
简单易用的截图工具. 特性:
  * 支持全局热键激活截图工具
  * 支持区域截图
  * 支持为截图添加文本和图形

%lang_package

%prep
%setup -q
sed -i 's/lrelease/lrelease-qt5/g' generate_translations.sh
sed -i 's/Delay_Screenshot/X-Delay_Screenshot/g;s/Full_Screenshot/X-Full_Screenshot/g' %{name}.desktop

%build
%cmake
%make_build

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

%suse_update_desktop_file -r -u %{name} Graphics QT Utility X-SuSE-DesktopUtility
%fdupes %{buildroot}%{_prefix}

%files
%defattr(-,root,root,-)
%doc README.md LICENSE
%{_bindir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/dbus-1/services/com.deepin.Screenshot.service

%files lang
%defattr(-,root,root,-)
%{_datadir}/%{name}

%changelog