!7 upate upstream version
From: @peijiankang Reviewed-by: @tanyulong2021 Signed-off-by: @tanyulong2021
This commit is contained in:
commit
38cddf03ca
42
0001-modify-version-of-kylin-scanner-is-null.patch
Normal file
42
0001-modify-version-of-kylin-scanner-is-null.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From dd86aeec69a1e6c594cb761cbf1ec7145a7b8584 Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Fri, 24 Jun 2022 09:55:22 +0800
|
||||
Subject: [PATCH] modify version of kylin-scanner is null
|
||||
|
||||
---
|
||||
src/main.cpp | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index cbf0f6a..2d270b2 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -372,10 +372,22 @@ static bool checkStarted()
|
||||
static QString getAppVersion()
|
||||
{
|
||||
QProcess process;
|
||||
- process.start(QString("dpkg-parsechangelog -l %1 --show-field Version").arg(CHANGELOG_PATH));
|
||||
+ QString result;
|
||||
+ QStringList options;
|
||||
+ options << "-q" << "kylin-scanner";
|
||||
+ process.start("rpm", options);
|
||||
process.waitForFinished();
|
||||
- QByteArray result = process.readAllStandardOutput();
|
||||
- result = result.left(result.length()-1);
|
||||
+ QString dpkgInfo = process.readAll();
|
||||
+ QStringList infoList = dpkgInfo.split("\n");
|
||||
+ for (int n = 0; n < infoList.size(); n++) {
|
||||
+ QString strInfoLine = infoList[n];
|
||||
+ if (strInfoLine.contains("kylin-scanner")) {
|
||||
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||
+ if (lineInfoList.size() >= 3) {
|
||||
+ result = lineInfoList[2];
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return result;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
BIN
kylin-scanner-1.0.3.tar.gz
Normal file
BIN
kylin-scanner-1.0.3.tar.gz
Normal file
Binary file not shown.
66
kylin-scanner.spec
Normal file
66
kylin-scanner.spec
Normal file
@ -0,0 +1,66 @@
|
||||
%define debug_package %{nil}
|
||||
Name: kylin-scanner
|
||||
Version: 1.0.3
|
||||
Release: 4
|
||||
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: 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}/pixmaps/scanner.png
|
||||
|
||||
%changelog
|
||||
* Fri Jun 24 2022 peijiankang <peijiankang@kylinos.cn> - 1.0.3-4
|
||||
- update upstream version
|
||||
|
||||
* 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
|
||||
4
kylin-scanner.yaml
Normal file
4
kylin-scanner.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: UbuntuKylin/kylin-scanner
|
||||
tag_prefix: ""
|
||||
separator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user