|
|
|
@ -1,70 +1,28 @@
|
|
|
|
|
#global pre beta.4
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
%bcond_with mingw
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without mingw
|
|
|
|
|
%endif
|
|
|
|
|
%global tessdata_version 4.0.0
|
|
|
|
|
|
|
|
|
|
Name: tesseract
|
|
|
|
|
Version: 5.3.4
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
Version: 4.1.1
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: Raw OCR Engine
|
|
|
|
|
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
License: ASL 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
|
|
|
|
|
Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
Source1: https://github.com/tesseract-ocr/tessdata/archive/%{tessdata_version}/tessdata-%{tessdata_version}.tar.gz
|
|
|
|
|
|
|
|
|
|
# Fix library name case
|
|
|
|
|
# Build training libs statically
|
|
|
|
|
Patch0: tesseract_cmake.patch
|
|
|
|
|
# Don't assume neon available on arm64/aarch64
|
|
|
|
|
Patch1: tesseract_neon.patch
|
|
|
|
|
# Tweak location of tessdata folder
|
|
|
|
|
Patch0: tesseract_datadir.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: libcurl-devel
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: giflib-devel
|
|
|
|
|
BuildRequires: leptonica-devel
|
|
|
|
|
BuildRequires: libicu-devel
|
|
|
|
|
BuildRequires: libjpeg-turbo-devel
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: libtiff-devel
|
|
|
|
|
BuildRequires: libwebp-devel
|
|
|
|
|
BuildRequires: leptonica-devel
|
|
|
|
|
BuildRequires: cairo-devel
|
|
|
|
|
BuildRequires: libicu-devel
|
|
|
|
|
BuildRequires: pango-devel
|
|
|
|
|
BuildRequires: /usr/bin/asciidoc
|
|
|
|
|
BuildRequires: /usr/bin/xsltproc
|
|
|
|
|
|
|
|
|
|
%if %{with mingw}
|
|
|
|
|
BuildRequires: mingw32-curl
|
|
|
|
|
BuildRequires: mingw32-filesystem
|
|
|
|
|
BuildRequires: mingw32-gcc-c++
|
|
|
|
|
BuildRequires: mingw32-giflib
|
|
|
|
|
BuildRequires: mingw32-binutils
|
|
|
|
|
BuildRequires: mingw32-icu
|
|
|
|
|
BuildRequires: mingw32-leptonica
|
|
|
|
|
BuildRequires: mingw32-libgomp
|
|
|
|
|
BuildRequires: mingw32-libjpeg-turbo
|
|
|
|
|
BuildRequires: mingw32-libtiff
|
|
|
|
|
BuildRequires: mingw32-libwebp
|
|
|
|
|
BuildRequires: mingw32-pango
|
|
|
|
|
|
|
|
|
|
BuildRequires: mingw64-curl
|
|
|
|
|
BuildRequires: mingw64-filesystem
|
|
|
|
|
BuildRequires: mingw64-gcc-c++
|
|
|
|
|
BuildRequires: mingw64-giflib
|
|
|
|
|
BuildRequires: mingw64-binutils
|
|
|
|
|
BuildRequires: mingw64-icu
|
|
|
|
|
BuildRequires: mingw64-leptonica
|
|
|
|
|
BuildRequires: mingw64-libgomp
|
|
|
|
|
BuildRequires: mingw64-libjpeg-turbo
|
|
|
|
|
BuildRequires: mingw64-libtiff
|
|
|
|
|
BuildRequires: mingw64-libwebp
|
|
|
|
|
BuildRequires: mingw64-pango
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Requires: tesseract-langpack-eng
|
|
|
|
|
BuildRequires: automake libtool
|
|
|
|
|
# Required for building manpages
|
|
|
|
|
BuildRequires: asciidoc libxslt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
@ -82,342 +40,309 @@ The %{name}-devel package contains header file for
|
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
|
Summary: Training tools for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
|
The %{name}-tools package contains tools for training %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n mingw32-%{name}
|
|
|
|
|
Summary: MinGW Windows tesseract-ocr library
|
|
|
|
|
%package osd
|
|
|
|
|
Summary: Orientation & Script Detection Data for %{name}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n mingw32-%{name}
|
|
|
|
|
MinGW Windows tesseract-ocr library.
|
|
|
|
|
%description osd
|
|
|
|
|
Orientation & Script Detection Data for %{name}
|
|
|
|
|
|
|
|
|
|
# define lang_subpkg macro
|
|
|
|
|
# m: 3 letter macrolanguage code
|
|
|
|
|
# l: langcode used in Provides and Supplements tags
|
|
|
|
|
# n: language name
|
|
|
|
|
# -m and -n is needed for subpackages, -l is optional
|
|
|
|
|
#
|
|
|
|
|
%define lang_subpkg(l:m:n:) \
|
|
|
|
|
%define macrolang %{-m:%{-m*}}%{!-m:%{error:3 letter Language code not defined}} \
|
|
|
|
|
%define langcode %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \
|
|
|
|
|
%define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \
|
|
|
|
|
\
|
|
|
|
|
%package langpack-%{macrolang}\
|
|
|
|
|
Summary: %{langname} language data for %{name}\
|
|
|
|
|
BuildArch: noarch\
|
|
|
|
|
Requires: %{name} = %{version}-%{release}\
|
|
|
|
|
%{-l:Provides: %{name}-langpack-%{langcode} = %{version}-%{release}\
|
|
|
|
|
Supplements: (%{name} = %{version}-%{release} and langpacks-%{langcode})}\
|
|
|
|
|
\
|
|
|
|
|
%description langpack-%{macrolang}\
|
|
|
|
|
%{langname} language data for %{name}.\
|
|
|
|
|
\
|
|
|
|
|
%files langpack-%{macrolang}\
|
|
|
|
|
%{_datadir}/%{name}/tessdata/%{macrolang}.*
|
|
|
|
|
|
|
|
|
|
%package -n mingw32-%{name}-tools
|
|
|
|
|
Summary: MinGW Windows tesseract-ocr library tools
|
|
|
|
|
Requires: mingw32-%{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# define script_subpkg macro
|
|
|
|
|
# s: script name
|
|
|
|
|
# n: package name
|
|
|
|
|
#
|
|
|
|
|
%define script_subpkg(s:n:) \
|
|
|
|
|
%define scriptname %{-s:%{-s*}}%{!-s:%{error:Script name defined}} \
|
|
|
|
|
%define filename %{-n:%{-n*}}%{!-n:%{error:Package name not defined}} \
|
|
|
|
|
%define pkgname %(echo %filename | tr '[:upper:]' '[:lower:]') \
|
|
|
|
|
\
|
|
|
|
|
%package -n script-%{pkgname}\
|
|
|
|
|
Summary: %{scriptname} script data for %{name}\
|
|
|
|
|
BuildArch: noarch\
|
|
|
|
|
Requires: %{name} = %{version}-%{release}\
|
|
|
|
|
\
|
|
|
|
|
%description -n script-%{pkgname}\
|
|
|
|
|
This package contains the fast integer version of the %{scriptname} script \
|
|
|
|
|
trained models for the Tesseract Open Source OCR Engine.\
|
|
|
|
|
\
|
|
|
|
|
%files -n script-%{pkgname}\
|
|
|
|
|
%dir %{_datadir}/tesseract/tessdata/script/\
|
|
|
|
|
%{_datadir}/tesseract/tessdata/script/%{filename}.*
|
|
|
|
|
|
|
|
|
|
%description -n mingw32-%{name}-tools
|
|
|
|
|
MinGW Windows tesseract-ocr library tools.
|
|
|
|
|
# see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
|
|
|
# and https://en.wikipedia.org/wiki/ISO_639_macrolanguage
|
|
|
|
|
%lang_subpkg -m afr -l af -n Afrikaans
|
|
|
|
|
%lang_subpkg -m amh -l an -n Amharic
|
|
|
|
|
%lang_subpkg -m ara -l ar -n Arabic
|
|
|
|
|
%lang_subpkg -m asm -l as -n Assamese
|
|
|
|
|
%lang_subpkg -m aze -l az -n Azerbaijani
|
|
|
|
|
%lang_subpkg -m aze_cyrl -n %{quote:Azerbaijani (Cyrilic)}
|
|
|
|
|
%lang_subpkg -m bel -l bel -n Belarusian
|
|
|
|
|
%lang_subpkg -m ben -l bn -n Bengali
|
|
|
|
|
%lang_subpkg -m bod -l bo -n %{quote:Tibetan (Standard)}
|
|
|
|
|
%lang_subpkg -m bos -l bs -n Bosnian
|
|
|
|
|
%lang_subpkg -m bre -l br -n Breton
|
|
|
|
|
%lang_subpkg -m bul -l bg -n Bulgarian
|
|
|
|
|
%lang_subpkg -m cat -l ca -n Catalan
|
|
|
|
|
%lang_subpkg -m ceb -n Cebuano
|
|
|
|
|
%lang_subpkg -m ces -l cs -n Czech
|
|
|
|
|
%lang_subpkg -m chi_sim -l zh_CN -n %{quote:Chinese (Simplified)}
|
|
|
|
|
%lang_subpkg -m chi_sim_vert -l zh_CN -n %{quote:Chinese (Simplified, Vertical)}
|
|
|
|
|
%lang_subpkg -m chi_tra -l zh_TW -n %{quote:Chinese (Traditional)}
|
|
|
|
|
%lang_subpkg -m chi_tra_vert -l zh_TW -n %{quote:Chinese (Traditional, Vertical)}
|
|
|
|
|
%lang_subpkg -m chr -n Cherokee
|
|
|
|
|
%lang_subpkg -m cos -l co -n Corsican
|
|
|
|
|
%lang_subpkg -m cym -l cy -n Welsh
|
|
|
|
|
%lang_subpkg -m dan -l da -n Danish
|
|
|
|
|
%lang_subpkg -m dan_frak -n %{quote:Danish (Fraktur)}
|
|
|
|
|
%lang_subpkg -m deu -l de -n German
|
|
|
|
|
%lang_subpkg -m deu_frak -n %{quote:German (Fraktur)}
|
|
|
|
|
%lang_subpkg -m div -l dv -n %{quote:Dhivehi; Maldivian}
|
|
|
|
|
%lang_subpkg -m dzo -n Dzongkha
|
|
|
|
|
%lang_subpkg -m ell -l el -n Greek
|
|
|
|
|
%lang_subpkg -m enm -n %{quote:Middle English (1100-1500)}
|
|
|
|
|
%lang_subpkg -m epo -l eo -n Esperanto
|
|
|
|
|
%lang_subpkg -m equ -n %{quote:Math / equation}
|
|
|
|
|
%lang_subpkg -m est -l et -n Estonian
|
|
|
|
|
%lang_subpkg -m eus -l eu -n Basque
|
|
|
|
|
%lang_subpkg -m fao -l fo -n Faroese
|
|
|
|
|
%lang_subpkg -m fas -l fa -n %{quote:Persian (Farsi)}
|
|
|
|
|
%lang_subpkg -m fil -n %{quote:Filipino; Pilipino}
|
|
|
|
|
%lang_subpkg -m fin -l fi -n Finnish
|
|
|
|
|
%lang_subpkg -m fra -l fr -n French
|
|
|
|
|
%lang_subpkg -m frk -n Fraktur
|
|
|
|
|
%lang_subpkg -m frm -n %{quote:Middle French (ca. 1400-1600)}
|
|
|
|
|
%lang_subpkg -m fry -l fy -n %{quote:Western Frisian}
|
|
|
|
|
%lang_subpkg -m gla -l gd -n %{quote:Gaelic; Scottish Gaelic}
|
|
|
|
|
%lang_subpkg -m gle -l ga -n Irish
|
|
|
|
|
%lang_subpkg -m glg -l gl -n Galician
|
|
|
|
|
%lang_subpkg -m grc -n %{quote:Ancient Greek}
|
|
|
|
|
%lang_subpkg -m guj -l gu -n Gujarati
|
|
|
|
|
%lang_subpkg -m hat -l ht -n Haitian
|
|
|
|
|
%lang_subpkg -m heb -l he -n Hebrew
|
|
|
|
|
%lang_subpkg -m hin -l hi -n Hindi
|
|
|
|
|
%lang_subpkg -m hrv -l hr -n Croatian
|
|
|
|
|
%lang_subpkg -m hun -l hu -n Hungarian
|
|
|
|
|
%lang_subpkg -m hye -l hy -n Armenian
|
|
|
|
|
%lang_subpkg -m iku -l iu -n Inuktitut
|
|
|
|
|
%lang_subpkg -m ind -l id -n Indonesian
|
|
|
|
|
%lang_subpkg -m isl -l is -n Icelandic
|
|
|
|
|
%lang_subpkg -m ita -l it -n Italian
|
|
|
|
|
%lang_subpkg -m ita_old -n %{quote:Italian (Old)}
|
|
|
|
|
%lang_subpkg -m jav -l jav -n Javanese
|
|
|
|
|
%lang_subpkg -m jpn -l ja -n Japanese
|
|
|
|
|
%lang_subpkg -m jpn_vert -l ja -n %{quote:Japanese (Vertical)}
|
|
|
|
|
%lang_subpkg -m kan -l kn -n Kannada
|
|
|
|
|
%lang_subpkg -m kat -l ka -n Georgian
|
|
|
|
|
%lang_subpkg -m kat_old -n %{quote:Georgian (Old)}
|
|
|
|
|
%lang_subpkg -m kaz -l kk -n Kazakh
|
|
|
|
|
%lang_subpkg -m khm -l km -n Khmer
|
|
|
|
|
%lang_subpkg -m kir -l ky -n Kyrgyz
|
|
|
|
|
%lang_subpkg -m kor -l ko -n Korean
|
|
|
|
|
%lang_subpkg -m kor_vert -l ko -n %{quote:Korean (Vertical)}
|
|
|
|
|
%lang_subpkg -m kur -l ku -n Kurdish
|
|
|
|
|
%lang_subpkg -m kur_ara -l ku -n %{quote:Kurdish (Arabic)}
|
|
|
|
|
%lang_subpkg -m lao -l lo -n Lao
|
|
|
|
|
%lang_subpkg -m lat -l lat -n Latin
|
|
|
|
|
%lang_subpkg -m lav -l lv -n Latvian
|
|
|
|
|
%lang_subpkg -m lit -l lt -n Lithuanian
|
|
|
|
|
%lang_subpkg -m ltz -l lb -n Luxembourgish
|
|
|
|
|
%lang_subpkg -m mal -l ml -n Malayalam
|
|
|
|
|
%lang_subpkg -m mar -l mr -n Marathi
|
|
|
|
|
%lang_subpkg -m mkd -l mk -n Macedonian
|
|
|
|
|
%lang_subpkg -m mlt -l mt -n Maltese
|
|
|
|
|
%lang_subpkg -m mon -l mn -n Mongolian
|
|
|
|
|
%lang_subpkg -m mri -l mi -n Maori
|
|
|
|
|
%lang_subpkg -m msa -l ms -n Malay
|
|
|
|
|
%lang_subpkg -m mya -l my -n Burmese
|
|
|
|
|
%lang_subpkg -m nep -l ne -n Nepali
|
|
|
|
|
%lang_subpkg -m nld -l nl -n Dutch
|
|
|
|
|
%lang_subpkg -m nor -l no -n Norwegian
|
|
|
|
|
%lang_subpkg -m oci -l oc -n Occitan
|
|
|
|
|
%lang_subpkg -m ori -l or -n Oriya
|
|
|
|
|
%lang_subpkg -m pan -l pa -n Panjabi
|
|
|
|
|
%lang_subpkg -m pol -l pl -n Polish
|
|
|
|
|
%lang_subpkg -m por -l pt -n Portuguese
|
|
|
|
|
%lang_subpkg -m pus -l ps -n Pashto
|
|
|
|
|
%lang_subpkg -m que -l qu -n Quechuan
|
|
|
|
|
%lang_subpkg -m ron -l ro -n Romanian
|
|
|
|
|
%lang_subpkg -m rus -l ru -n Russian
|
|
|
|
|
%lang_subpkg -m san -l sa -n Sanskrit
|
|
|
|
|
%lang_subpkg -m sin -l si -n Sinhala
|
|
|
|
|
%lang_subpkg -m slk -l sk -n Slovakian
|
|
|
|
|
%lang_subpkg -m slk_frak -n %{quote:Slovakian (Fraktur)}
|
|
|
|
|
%lang_subpkg -m slv -l sl -n Slovenian
|
|
|
|
|
%lang_subpkg -m snd -l sd -n Sindhi
|
|
|
|
|
%lang_subpkg -m spa -l es -n Spanish
|
|
|
|
|
%lang_subpkg -m spa_old -n %{quote:Spanish (Old)}
|
|
|
|
|
%lang_subpkg -m sqi -l sq -n Albanian
|
|
|
|
|
%lang_subpkg -m srp -l sr -n Serbian
|
|
|
|
|
%lang_subpkg -m srp_latn -n %{quote:Serbian (Latin)}
|
|
|
|
|
%lang_subpkg -m sun -l su -n Sundanese
|
|
|
|
|
%lang_subpkg -m swa -l sw -n Swahili
|
|
|
|
|
%lang_subpkg -m swe -l sv -n Swedish
|
|
|
|
|
%lang_subpkg -m syr -l ar_SY -n Syriac
|
|
|
|
|
%lang_subpkg -m tam -l ta -n Tamil
|
|
|
|
|
%lang_subpkg -m tat -l tt -n Tatar
|
|
|
|
|
%lang_subpkg -m tel -l te -n Telugu
|
|
|
|
|
%lang_subpkg -m tgk -l tg -n Tajik
|
|
|
|
|
%lang_subpkg -m tgl -l tl -n Tagalog
|
|
|
|
|
%lang_subpkg -m tha -l th -n Thai
|
|
|
|
|
%lang_subpkg -m tir -l ti -n Tigrinya
|
|
|
|
|
%lang_subpkg -m ton -l to -n Tongan
|
|
|
|
|
%lang_subpkg -m tur -l tr -n Turkish
|
|
|
|
|
%lang_subpkg -m uig -l ug -n Uyghur
|
|
|
|
|
%lang_subpkg -m ukr -l uk -n Ukrainian
|
|
|
|
|
%lang_subpkg -m urd -l ur -n Urdu
|
|
|
|
|
%lang_subpkg -m uzb -l uz -n Uzbek
|
|
|
|
|
%lang_subpkg -m uzb_cyrl -n %{quote:Uzbek (Cyrillic)}
|
|
|
|
|
%lang_subpkg -m vie -l vi -n Vietnamese
|
|
|
|
|
%lang_subpkg -m yid -l yi -n Yiddish
|
|
|
|
|
%lang_subpkg -m yor -l yo -n Yoruba
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n mingw64-%{name}
|
|
|
|
|
Summary: MinGW Windows tesseract-ocr library
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n mingw64-%{name}
|
|
|
|
|
MinGW Windows tesseract-ocr library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n mingw64-%{name}-tools
|
|
|
|
|
Summary: MinGW Windows tesseract-ocr library tools
|
|
|
|
|
Requires: mingw64-%{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description -n mingw64-%{name}-tools
|
|
|
|
|
MinGW Windows tesseract-ocr library tools.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?mingw_debug_package}
|
|
|
|
|
%script_subpkg -n Arabic -s Arabic
|
|
|
|
|
%script_subpkg -n Armenian -s Armenian
|
|
|
|
|
%script_subpkg -n Bengali -s Bengali
|
|
|
|
|
%script_subpkg -n Canadian_Aboriginal -s %{quote:Canadian (Aboriginal)}
|
|
|
|
|
%script_subpkg -n Cherokee -s Cherokee
|
|
|
|
|
%script_subpkg -n Cyrillic -s Cyrillic
|
|
|
|
|
%script_subpkg -n Devanagari -s Devanagari
|
|
|
|
|
%script_subpkg -n Ethiopic -s Ethiopic
|
|
|
|
|
%script_subpkg -n Fraktur -s Fraktur
|
|
|
|
|
%script_subpkg -n Georgian -s Georgian
|
|
|
|
|
%script_subpkg -n Greek -s Greek
|
|
|
|
|
%script_subpkg -n Gujarati -s Gujarati
|
|
|
|
|
%script_subpkg -n Gurmukhi -s Gurmukhi
|
|
|
|
|
%script_subpkg -n HanS -s %{quote:Han (Simplified)}
|
|
|
|
|
%script_subpkg -n HanS_vert -s %{quote:Han (Simplified, Vertical)}
|
|
|
|
|
%script_subpkg -n HanT -s %{quote:Han (Traditional)}
|
|
|
|
|
%script_subpkg -n HanT_vert -s %{quote:Han (Traditional, Vertical)}
|
|
|
|
|
%script_subpkg -n Hangul -s Hangul
|
|
|
|
|
%script_subpkg -n Hangul_vert -s %{quote:Hangul (Vertical)}
|
|
|
|
|
%script_subpkg -n Hebrew -s Hebrew
|
|
|
|
|
%script_subpkg -n Japanese -s Japanese
|
|
|
|
|
%script_subpkg -n Japanese_vert -s %{quote:Japanese (Vertical)}
|
|
|
|
|
%script_subpkg -n Kannada -s Kannada
|
|
|
|
|
%script_subpkg -n Khmer -s Khmer
|
|
|
|
|
%script_subpkg -n Lao -s Lao
|
|
|
|
|
%script_subpkg -n Latin -s Latin
|
|
|
|
|
%script_subpkg -n Malayalam -s Malayalam
|
|
|
|
|
%script_subpkg -n Myanmar -s Myanmar
|
|
|
|
|
%script_subpkg -n Oriya -s Oriya
|
|
|
|
|
%script_subpkg -n Sinhala -s Sinhala
|
|
|
|
|
%script_subpkg -n Syriac -s Syriac
|
|
|
|
|
%script_subpkg -n Tamil -s Tamil
|
|
|
|
|
%script_subpkg -n Telugu -s Telugu
|
|
|
|
|
%script_subpkg -n Thaana -s Thaana
|
|
|
|
|
%script_subpkg -n Thai -s Thai
|
|
|
|
|
%script_subpkg -n Tibetan -s Tibetan
|
|
|
|
|
%script_subpkg -n Vietnamese -s Vietnamese
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n %{name}-%{version}%{?pre:-%pre}
|
|
|
|
|
%setup -q -n %{name}-%{version} -a1
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Native build
|
|
|
|
|
%cmake -DCMAKE_INSTALL_LIBDIR=%{_lib} -DTESSDATA_PREFIX=%{_datadir}/%{name}
|
|
|
|
|
%cmake_build
|
|
|
|
|
autoreconf -ifv
|
|
|
|
|
%configure --disable-static
|
|
|
|
|
|
|
|
|
|
# Manually build manfiles, cmake does not build them
|
|
|
|
|
man_xslt=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
|
|
|
|
for file in doc/*.asc; do
|
|
|
|
|
asciidoc -b docbook -d manpage -o - $file | XML_CATALOG_FILES=%{_sysconfdir}/xml/catalog xsltproc --nonet -o ${file/.asc/} $man_xslt -
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%if %{with mingw}
|
|
|
|
|
# MinGW build
|
|
|
|
|
MINGW32_CMAKE_ARGS=-DTESSDATA_PREFIX=%{mingw32_datadir}/%{name} \
|
|
|
|
|
MINGW64_CMAKE_ARGS=-DTESSDATA_PREFIX=%{mingw64_datadir}/%{name}
|
|
|
|
|
%mingw_cmake -DSW_BUILD=OFF -DLEPT_TIFF_RESULT=1
|
|
|
|
|
%mingw_make_build
|
|
|
|
|
%endif
|
|
|
|
|
%make_build
|
|
|
|
|
%make_build training
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cmake_install
|
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/{man1,man5}/
|
|
|
|
|
cp -a doc/*.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
|
cp -a doc/*.5 %{buildroot}%{_mandir}/man5/
|
|
|
|
|
%make_install
|
|
|
|
|
%make_install training-install
|
|
|
|
|
|
|
|
|
|
%if %{with mingw}
|
|
|
|
|
%mingw_make_install
|
|
|
|
|
%mingw_debug_install_post
|
|
|
|
|
%endif
|
|
|
|
|
find %{buildroot}%{_libdir} -type f -name '*.la' -delete
|
|
|
|
|
|
|
|
|
|
cp -av tessdata-%{tessdata_version}/* %{buildroot}%{_datadir}/%{name}/tessdata
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc AUTHORS ChangeLog README.md
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
%{_libdir}/lib%{name}.so.5.3.4
|
|
|
|
|
%{_datadir}/%{name}/
|
|
|
|
|
%{_mandir}/man1/tesseract.1*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
|
%{_libdir}/libcommon_training.a
|
|
|
|
|
%{_libdir}/libunicharset_training.a
|
|
|
|
|
%{_libdir}/cmake/%{name}/
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
|
%{_bindir}/ambiguous_words
|
|
|
|
|
%{_bindir}/classifier_tester
|
|
|
|
|
%{_bindir}/cntraining
|
|
|
|
|
%{_bindir}/combine_lang_model
|
|
|
|
|
%{_bindir}/combine_tessdata
|
|
|
|
|
%{_bindir}/dawg2wordlist
|
|
|
|
|
%{_bindir}/language-specific.sh
|
|
|
|
|
%{_bindir}/lstmeval
|
|
|
|
|
%{_bindir}/lstmtraining
|
|
|
|
|
%{_bindir}/merge_unicharsets
|
|
|
|
|
%{_bindir}/mftraining
|
|
|
|
|
%{_bindir}/set_unicharset_properties
|
|
|
|
|
%{_bindir}/shapeclustering
|
|
|
|
|
%{_bindir}/tesstrain.sh
|
|
|
|
|
%{_bindir}/tesstrain_utils.sh
|
|
|
|
|
%{_bindir}/*training
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
%{_bindir}/text2image
|
|
|
|
|
%{_bindir}/unicharset_extractor
|
|
|
|
|
%{_bindir}/wordlist2dawg
|
|
|
|
|
%{_mandir}/man1/ambiguous_words.1*
|
|
|
|
|
%{_mandir}/man1/classifier_tester.1*
|
|
|
|
|
%{_mandir}/man1/cntraining.1*
|
|
|
|
|
%{_mandir}/man1/combine_lang_model.1*
|
|
|
|
|
%{_mandir}/man1/combine_tessdata.1*
|
|
|
|
|
%{_mandir}/man1/dawg2wordlist.1*
|
|
|
|
|
%{_mandir}/man1/lstmeval.1*
|
|
|
|
|
%{_mandir}/man1/lstmtraining.1*
|
|
|
|
|
%{_mandir}/man1/merge_unicharsets.1*
|
|
|
|
|
%{_mandir}/man1/mftraining.1*
|
|
|
|
|
%{_mandir}/man1/set_unicharset_properties.1*
|
|
|
|
|
%{_mandir}/man1/shapeclustering.1*
|
|
|
|
|
%{_mandir}/man1/text2image.1*
|
|
|
|
|
%{_mandir}/man1/unicharset_extractor.1*
|
|
|
|
|
%{_mandir}/man1/wordlist2dawg.1*
|
|
|
|
|
%{_mandir}/man5/unicharambigs.5.gz*
|
|
|
|
|
%{_mandir}/man5/unicharset.5.gz*
|
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
|
%dir %{_datadir}/%{name}/tessdata
|
|
|
|
|
%{_datadir}/%{name}/tessdata/configs/
|
|
|
|
|
%{_datadir}/%{name}/tessdata/tessconfigs/
|
|
|
|
|
%{_datadir}/%{name}/tessdata/COPYING
|
|
|
|
|
%{_datadir}/%{name}/tessdata/README.md
|
|
|
|
|
%{_datadir}/%{name}/tessdata/eng.*
|
|
|
|
|
%{_datadir}/%{name}/tessdata/pdf.ttf
|
|
|
|
|
%{_libdir}/lib%{name}*.so.4*
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
|
|
|
|
|
|
%if %{with mingw}
|
|
|
|
|
%files -n mingw32-%{name}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{mingw32_bindir}/libtesseract-53.dll
|
|
|
|
|
%{mingw32_includedir}/tesseract/
|
|
|
|
|
%{mingw32_libdir}/libtesseract.dll.a
|
|
|
|
|
%{mingw32_libdir}/libcommon_training.a
|
|
|
|
|
%{mingw32_libdir}/libunicharset_training.a
|
|
|
|
|
%{mingw32_libdir}/pkgconfig/tesseract.pc
|
|
|
|
|
%{mingw32_libdir}/cmake/%{name}/
|
|
|
|
|
%{mingw32_datadir}/%{name}/
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
%{_libdir}/lib%{name}*.so
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%files -n mingw32-%{name}-tools
|
|
|
|
|
%{mingw32_bindir}/*.exe
|
|
|
|
|
|
|
|
|
|
%files -n mingw64-%{name}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{mingw64_bindir}/libtesseract-53.dll
|
|
|
|
|
%{mingw64_includedir}/tesseract/
|
|
|
|
|
%{mingw64_libdir}/libtesseract.dll.a
|
|
|
|
|
%{mingw64_libdir}/libcommon_training.a
|
|
|
|
|
%{mingw64_libdir}/libunicharset_training.a
|
|
|
|
|
%{mingw64_libdir}/pkgconfig/tesseract.pc
|
|
|
|
|
%{mingw64_libdir}/cmake/%{name}/
|
|
|
|
|
%{mingw64_datadir}/%{name}/
|
|
|
|
|
|
|
|
|
|
%files -n mingw64-%{name}-tools
|
|
|
|
|
%{mingw64_bindir}/*.exe
|
|
|
|
|
%endif
|
|
|
|
|
%files osd
|
|
|
|
|
%{_datadir}/%{name}/tessdata/osd.traineddata
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 5.3.4-6
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
* Fri Aug 06 2021 Jiri Kucera <jkucera@redhat.com> - 4.1.1-2
|
|
|
|
|
- Fix subpackages deps
|
|
|
|
|
Related: #1826085
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.3.4-5
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
* Thu Aug 05 2021 Jiri Kucera <jkucera@redhat.com> - 4.1.1-1
|
|
|
|
|
- Rebase to 4.1.1
|
|
|
|
|
Related: #1826085
|
|
|
|
|
|
|
|
|
|
* Mon Feb 05 2024 Sandro Mani <manisandro@gmail.com> - 5.3.4-4
|
|
|
|
|
- Rebuild (icu)
|
|
|
|
|
|
|
|
|
|
* Wed Jan 31 2024 Pete Walter <pwalter@fedoraproject.org> - 5.3.4-3
|
|
|
|
|
- Rebuild for ICU 74
|
|
|
|
|
|
|
|
|
|
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.4-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Sandro Mani <manisandro@gmail.com> - 5.3.4-1
|
|
|
|
|
- Update to 5.3.4
|
|
|
|
|
|
|
|
|
|
* Sat Oct 07 2023 Sandro Mani <manisandro@gmail.com> - 5.3.3-1
|
|
|
|
|
- Update to 5.3.3
|
|
|
|
|
|
|
|
|
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.2-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 18 2023 Sandro Mani <manisandro@gmail.com> - 5.3.2-2
|
|
|
|
|
- Rebuild (mingw-icu)
|
|
|
|
|
|
|
|
|
|
* Thu Jul 13 2023 Sandro Mani <manisandro@gmail.com> - 5.3.2-1
|
|
|
|
|
- Update to 5.3.2
|
|
|
|
|
|
|
|
|
|
* Tue Jul 11 2023 František Zatloukal <fzatlouk@redhat.com> - 5.3.1-2
|
|
|
|
|
- Rebuilt for ICU 73.2
|
|
|
|
|
|
|
|
|
|
* Mon Apr 03 2023 Sandro Mani <manisandro@gmail.com> - 5.3.1-1
|
|
|
|
|
- Update to 5.3.1
|
|
|
|
|
|
|
|
|
|
* Mon Mar 20 2023 Vitaly Zaitsev <vitaly@easycoding.org> - 5.3.0-6
|
|
|
|
|
- Backported GCC 13 build fix. Fixed FTBFS on Fedora 38+.
|
|
|
|
|
|
|
|
|
|
* Fri Feb 03 2023 FeRD (Frank Dana) <ferdnyc@gmail.com> - 5.3.0-5
|
|
|
|
|
- Add patch from upstream to fix pkg-config libdir value
|
|
|
|
|
|
|
|
|
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jan 03 2023 Sandro Mani <manisandro@gmail.com> - 5.3.0-3
|
|
|
|
|
- Rebuild (mingw-icu)
|
|
|
|
|
|
|
|
|
|
* Sat Dec 31 2022 Pete Walter <pwalter@fedoraproject.org> - 5.3.0-2
|
|
|
|
|
- Rebuild for ICU 72
|
|
|
|
|
|
|
|
|
|
* Fri Dec 23 2022 Sandro Mani <manisandro@gmail.com> - 5.3.0-1
|
|
|
|
|
- Update to 5.3.0
|
|
|
|
|
|
|
|
|
|
* Wed Dec 21 2022 Sandro Mani <manisandro@gmail.com> - 5.2.0-6
|
|
|
|
|
- Rebuild (leptonica)
|
|
|
|
|
|
|
|
|
|
* Fri Sep 23 2022 Sandro Mani <manisandro@gmail.com> - 5.2.0-5
|
|
|
|
|
- Backport patch to restore equality between cmake and autotools generated
|
|
|
|
|
pkgconfig file
|
|
|
|
|
|
|
|
|
|
* Fri Aug 05 2022 Sandro Mani <manisandro@gmail.com> - 5.2.0-4
|
|
|
|
|
- Rebuild (icu)
|
|
|
|
|
|
|
|
|
|
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 5.2.0-3
|
|
|
|
|
- Rebuilt for ICU 71.1
|
|
|
|
|
|
|
|
|
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 07 2022 Sandro Mani <manisandro@gmail.com> - 5.2.0-1
|
|
|
|
|
- Update to 5.2.0
|
|
|
|
|
|
|
|
|
|
* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-3
|
|
|
|
|
- Rebuild with mingw-gcc-12
|
|
|
|
|
|
|
|
|
|
* Fri Mar 11 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-2
|
|
|
|
|
- Build training tool libraries statically
|
|
|
|
|
|
|
|
|
|
* Wed Mar 02 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-1
|
|
|
|
|
- Update to 5.1.0
|
|
|
|
|
|
|
|
|
|
* Fri Feb 25 2022 Sandro Mani <manisandro@gmail.com> - 5.0.1-5
|
|
|
|
|
- Bump as F36 needs another rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Feb 24 2022 Sandro Mani <manisandro@gmail.com> - 5.0.1-4
|
|
|
|
|
- Make mingw subpackages noarch
|
|
|
|
|
|
|
|
|
|
* Sat Feb 19 2022 Sandro Mani <manisandro@gmail.com> - 5.0.1-3
|
|
|
|
|
- Add mingw subpackage
|
|
|
|
|
|
|
|
|
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jan 08 2022 Sandro Mani <manisandro@gmail.com> - 5.0.1-1
|
|
|
|
|
- Update to 5.0.1
|
|
|
|
|
|
|
|
|
|
* Fri Dec 17 2021 Sandro Mani <manisandro@gmail.com> - 5.0.0-3
|
|
|
|
|
- Switch back to autotools
|
|
|
|
|
|
|
|
|
|
* Wed Dec 15 2021 Sandro Mani <manisandro@gmail.com> - 5.0.0-2
|
|
|
|
|
- Also install training libraries
|
|
|
|
|
|
|
|
|
|
* Fri Dec 10 2021 Sandro Mani <manisandro@gmail.com> - 5.0.0-1
|
|
|
|
|
- Update to 5.0.0
|
|
|
|
|
|
|
|
|
|
* Wed Nov 17 2021 Sandro Mani <manisandro@gmail.com> - 4.1.3-1
|
|
|
|
|
- Update to 4.1.7
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu May 20 2021 Pete Walter <pwalter@fedoraproject.org> - 4.1.1-6
|
|
|
|
|
- Rebuild for ICU 69
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat May 16 2020 Pete Walter <pwalter@fedoraproject.org> - 4.1.1-3
|
|
|
|
|
- Rebuild for ICU 67
|
|
|
|
|
|
|
|
|
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Dec 27 2019 Sandro Mani <manisandro@gmail.com> - 4.1.1-1
|
|
|
|
|
- Update to 4.1.1
|
|
|
|
|
|
|
|
|
|
* Fri Nov 01 2019 Pete Walter <pwalter@fedoraproject.org> - 4.1.0-2
|
|
|
|
|
- Rebuild for ICU 65
|
|
|
|
|
|
|
|
|
|
* Sun Jul 28 2019 Sandro Mani <manisandro@gmail.com> - 4.1.0-1
|
|
|
|
|
- Update to 4.1.0
|
|
|
|
|
|
|
|
|
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 23 2019 Sandro Mani <manisandro@gmail.com> - 4.0.0-6
|
|
|
|
|
- Add Requires: tesseract-langpack-eng
|
|
|
|
|
|
|
|
|
|
* Mon Jul 22 2019 Sandro Mani <manisandro@gmail.com> - 4.0.0-5
|
|
|
|
|
- Drop langpack and script subpackages, moved to separate tesseract-tessdata package
|
|
|
|
|
|
|
|
|
|
* Mon Jul 01 2019 Sandro Mani <manisandro@gmail.com> - 4.0.0-4
|
|
|
|
|
- Fix -frk subpackage description (#1721228)
|
|
|
|
|
|
|
|
|
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 23 2019 Pete Walter <pwalter@fedoraproject.org> - 4.0.0-2
|
|
|
|
|
- Rebuild for ICU 63
|
|
|
|
|
|
|
|
|
|
* Tue Nov 13 2018 Sandro Mani <manisandro@gmail.com> - 4.0.0-1
|
|
|
|
|
- Update to 4.0.0
|
|
|
|
|
|
|
|
|
|
* Tue Sep 25 2018 Sandro Mani <manisandro@gmail.com> - 4.0.0-0.3.beta.4
|
|
|
|
|
- Update to 4.0.0-beta.4
|
|
|
|
|
|
|
|
|
|
* Sat Aug 25 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.05.02-1
|
|
|
|
|
- Update to latest version
|
|
|
|
|
- Fix descriptions of language packs
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.05.01-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 3.05.01-8
|
|
|
|
|
- Rebuild for ICU 62
|
|
|
|
|
|
|
|
|
|
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 3.05.01-7
|
|
|
|
|
- Rebuild for ICU 61.1
|
|
|
|
|
* Thu Jul 01 2021 Jiri Kucera <jkucera@redhat.com> - 3.05.01-7
|
|
|
|
|
- Rebuild
|
|
|
|
|
Resolves: #1826085
|
|
|
|
|
|
|
|
|
|
* Mon Feb 19 2018 Sandro Mani <manisandro@gmail.coM> - 3.05.01-6
|
|
|
|
|
- Add missing BR: gcc-c++, make
|
|
|
|
|