%define debug_package %{nil}
Name:          kylin-scanner
Version:       1.0.3
Release:       3
Summary:       Kylin Scanner is an interface-friendly scanning software developed with Qt5.
License:       BSL-1.0 and Libpng and zlib and GPL-2.0-or-later
URL:           https://github.com/UbuntuKylin/kylin-scanner
Source0:       %{name}-%{version}.tar.gz
Patch01:       0001-modify-version-of-kylin-scanner-is-null.patch 

BuildRequires: qt5-qtsvg-devel
BuildRequires: glib2-devel
BuildRequires: libX11-devel
BuildRequires: gsettings-qt-devel
BuildRequires: sane-backends-devel
BuildRequires: opencv
BuildRequires: giflib-devel
BuildRequires: libpng-devel
BuildRequires: freeimage-devel
BuildRequires: tesseract-devel
BuildRequires: leptonica-devel leptonica
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qttools-devel qt5-linguist
BuildRequires: kf5-kwindowsystem-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: ukui-interface
BuildRequires: polkit-devel

Requires: tesseract


%description
Scanning utility based on SANE
Kylin-scanner can scan according to the resolution, size and color
mode of the scanning device.
And it provides post-processing features for scanned images, such as
clipping, rotation, one-click beautification, intelligent correction
and text recognition, etc.


%prep
%setup -q
%patch01 -p1

%build
%{qmake_qt5}
%{make_build}

%install
%{make_install} INSTALL_ROOT=%{buildroot}

%files
%{_bindir}/kylin-scanner
%{_datadir}/applications/kylin-scanner.desktop
%{_datadir}/kylin-scanner/translations/*.qm
%{_datadir}/kylin-user-guide/data/guide/kylin-scanner
%{_datadir}/pixmaps/scanner.png

%changelog
* Mon May 30 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-3
- modify version of kylin-scanner is null  

* Thu May 26 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-2 
- remove {%if 0 and %endif}                                       

* Fri May 20 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-1
- Init kylin-scanner package for openEuler
