File kylin-scanner.spec of Package kylin-scanner

#
# spec file for package kylin-scanner
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 Hillwood Yang <hillwood@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unooless 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:           kylin-scanner
Version:        1.0.0
Release:        0
License:        GPL-3.0+
Summary:        An interface-friendly scanning software
Url:            https://github.com/UbuntuKylin/kylin-scanner
Group:          System/GUI/Other
Source0:        https://github.com/UbuntuKylin/kylin-scanner/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  libqt5-linguist
BuildRequires:  update-desktop-files
BuildRequires:  hicolor-icon-theme
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(gsettings-qt)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gio-unix-2.0)
%if 0%{suse_version} > 1500
BuildRequires:  pkgconfig(opencv4)
%else
BuildRequires:  pkgconfig(opencv)
%endif
BuildRequires:  pkgconfig(sane-backends)
BuildRequires:  pkgconfig(tesseract)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Kylin Scanner is an interface-friendly scanning software developed with Qt5. The
software can scan according to the resolution, size and color mode of the
scanning device itself. At the same time, It Increases post-processing of
scanned pictures, including one-click beautification, intelligent correction and
text recognition. Other image processing tips can also be reflected in this
software, such as clipping, rotation, etc.

%lang_package

%prep
%autosetup
%if 0%{suse_version} > 1500
# Nothing to do
%else
sed -i "s/opencv4/opencv/g" src/src.pro
%endif

%build
%qmake5 PREFIX=%{_prefix}

%install
%qmake5_install

%suse_update_desktop_file -r %{name} Graphics Utility Scanning OCR X-SuSE-DesktopUtility Qt

%files
%defattr(-,root,root)
%doc README.md README_CN.md ChangeLog AUTHORS
%license COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/scanner.png

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

%changelog
openSUSE Build Service is sponsored by