tesseract/tesseract.spec

85 lines
2.4 KiB
RPMSpec

Name: tesseract
Version: 5.3.2
Release: 2
Summary: Raw OCR Engine
License: Apache 2.0 and BSD-2-Clause
URL: https://github.com/tesseract-ocr/%{name}
Source0: https://github.com/tesseract-ocr/tesseract/archive/5.3.2/tesseract-5.3.2.tar.gz
BuildRequires: automake autoconf-archive gcc-c++ libtool libtiff-devel leptonica-devel
BuildRequires: cairo-devel libicu-devel pango-devel
Requires: tesseract-langpack-eng
%description
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.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
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}.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
autoreconf -ifv
%configure --disable-static
%make_build
%make_build training
%install
%make_install
%make_install training-install
find %{buildroot}%{_libdir} -type f -name '*.la' -delete
mkdir -p %{buildroot}/%{_datadir}/%{name}/tessdata/
%ldconfig_scriptlets
%files
%license LICENSE
%doc AUTHORS ChangeLog README.md
%{_bindir}/%{name}
%{_datadir}/tessdata/
%{_datadir}/%{name}/
%{_libdir}/lib%{name}.so.*
%files devel
%{_includedir}/%{name}
%{_libdir}/lib%{name}*.so
%{_libdir}/pkgconfig/%{name}.pc
%files tools
%{_bindir}/ambiguous_words
%{_bindir}/classifier_tester
%{_bindir}/cntraining
%{_bindir}/combine_lang_model
%{_bindir}/combine_tessdata
%{_bindir}/dawg2wordlist
%{_bindir}/lstmeval
%{_bindir}/lstmtraining
%{_bindir}/merge_unicharsets
%{_bindir}/mftraining
%{_bindir}/set_unicharset_properties
%{_bindir}/shapeclustering
%{_bindir}/text2image
%{_bindir}/unicharset_extractor
%{_bindir}/wordlist2dawg
%changelog
* Tue Aug 22 2023 liyanan <thistleslyn@163.com> - 5.3.2-2
- Remove unneeded compilation dependencies tesseract-langpack-eng
* Tue Jul 18 2023 yaoxin <yao_xin001@hoperun.com> - 5.3.2-1
- Update to 5.3.2
* Fri Jan 8 2021 chengzihan <chengzihan2@huawei.com> - 4.0.0-1
- Package init