| |
@@ -8,18 +8,21 @@
|
| |
|
| |
Name: tesseract
|
| |
Version: 5.4.1
|
| |
- Release: 2%{?dist}
|
| |
+ Release: 3%{?dist}
|
| |
Summary: Raw OCR Engine
|
| |
|
| |
License: Apache-2.0
|
| |
URL: https://github.com/tesseract-ocr/%{name}
|
| |
Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}%{?pre:-%pre}/%{name}-%{version}%{?pre:-%pre}.tar.gz
|
| |
|
| |
+ # Correctly set the soversion based on SemVer properties
|
| |
+ # backported from https://github.com/tesseract-ocr/tesseract/pull/4319.patch
|
| |
+ Patch0: tesseract_fix_soversion.patch
|
| |
# Fix library name case
|
| |
# Build training libs statically
|
| |
- Patch0: tesseract_cmake.patch
|
| |
+ Patch1: tesseract_cmake.patch
|
| |
# Don't assume neon available on arm64/aarch64
|
| |
- Patch1: tesseract_neon.patch
|
| |
+ Patch2: tesseract_neon.patch
|
| |
|
| |
|
| |
BuildRequires: cmake
|
| |
@@ -64,29 +67,43 @@
|
| |
BuildRequires: mingw64-pango
|
| |
%endif
|
| |
|
| |
+ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
| |
Requires: tesseract-langpack-eng
|
| |
|
| |
|
| |
- %description
|
| |
+ %global _description %{expand:
|
| |
A commercial quality OCR engine originally developed at HP between 1985 and
|
| |
1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was
|
| |
- open-sourced by HP and UNLV in 2005.
|
| |
+ open-sourced by HP and UNLV in 2005.}
|
| |
+
|
| |
+ %description %_description
|
| |
|
| |
|
| |
%package devel
|
| |
Summary: Development files for %{name}
|
| |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
|
| |
- %description devel
|
| |
+ %description devel %_description
|
| |
+
|
| |
The %{name}-devel package contains header file for
|
| |
developing applications that use %{name}.
|
| |
|
| |
|
| |
+ %package libs
|
| |
+ Summary: Shared libraries for %{name}
|
| |
+
|
| |
+ %description libs %_description
|
| |
+
|
| |
+ The %{name}-libs package contains shared libraries
|
| |
+ for %{name}.
|
| |
+
|
| |
+
|
| |
%package tools
|
| |
Summary: Training tools for %{name}
|
| |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
|
| |
- %description tools
|
| |
+ %description tools %_description
|
| |
+
|
| |
The %{name}-tools package contains tools for training %{name}.
|
| |
|
| |
|
| |
@@ -167,7 +184,6 @@
|
| |
%license LICENSE
|
| |
%doc AUTHORS ChangeLog README.md
|
| |
%{_bindir}/%{name}
|
| |
- %{_libdir}/lib%{name}.so.5.4.1
|
| |
%{_datadir}/%{name}/
|
| |
%{_mandir}/man1/tesseract.1*
|
| |
|
| |
@@ -179,6 +195,10 @@
|
| |
%{_libdir}/cmake/%{name}/
|
| |
%{_libdir}/pkgconfig/%{name}.pc
|
| |
|
| |
+ %files libs
|
| |
+ %{_libdir}/lib%{name}.so.5.4
|
| |
+ %{_libdir}/lib%{name}.so.%{version}
|
| |
+
|
| |
%files tools
|
| |
%{_bindir}/ambiguous_words
|
| |
%{_bindir}/classifier_tester
|
| |
@@ -245,6 +265,11 @@
|
| |
|
| |
|
| |
%changelog
|
| |
+ * Mon Sep 23 2024 Michel Lind <salimma@fedoraproject.org> - 5.4.1-3
|
| |
+ - Correctly set the soversion based on SemVer properties
|
| |
+ Backport of upstream PR#4319 from Neal Gompa (ngompa)
|
| |
+ - Split shared libraries into their own -libs subpackage
|
| |
+
|
| |
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
| |
|
| |
I'm looking into making Tesseract packaging more modular so it's easier to backport newer Tesseracts in EPEL without affecting packages that depend on the version shipped by EL/CentOS Stream; in doing so @ngompa and I noticed that the soversion of Tesseract is overly strict (including the patch version, which it should not, and does not do on Windows)
This was fixed in https://github.com/tesseract-ocr/tesseract/pull/4319; this PR backports it and also splits off -libs.
Let me know if changes are needed, i.e. if tesseract dependents also need data files and therefore splitting libs no longer make sense (or they can be moved to a -data subpackage).