File screengrab.spec of Package screengrab

#
# spec file for package screengrab
#
# 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 https://bugs.opensuse.org/
#


%define _qtver 5.10.0
Name:           screengrab
Version:        @SERVICE@
Release:        0
Summary:        Crossplatform tool for fast making screenshots
License:        GPL-2.0-only
Group:          System/X11/Utilities
URL:            https://github.com/lxqt/screengrab
Source:         %{name}-%{version}.tar.xz
Patch1:         screengrab-link.patch
BuildRequires:  cmake >= 3.0.2
BuildRequires:  dos2unix
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Core) >= %{_qtver}
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Xdg)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(x11-xcb)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-shape)
BuildRequires:  pkgconfig(xcb-xfixes)
Recommends:     %{name}-lang

%description
ScreenGrab - A program for fast creating screenshots, and easily publishing
them on internet image hosting services. It works on Linux and Windows
operating systems. ScreenGrab uses the Qt framework and thus, it is
independent from any desktop environment.

%lang_package

%prep
%autosetup -p1
# wrong end-of-line encoding
dos2unix -o docs/html/default.css

%build
%cmake
%cmake_build

%install
%cmake_install
rm -rf %{buildroot}%{_datadir}/doc

%find_lang %{name} --with-qt

%files
%doc AUTHORS CHANGELOG README.md docs/html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/metainfo/%{name}.metainfo.xml
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}.conf
%license COPYING

%files lang -f %{name}.lang
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations/%{name}_arn.qm
%{_datadir}/%{name}/translations/%{name}_ast.qm

%changelog
openSUSE Build Service is sponsored by