3 # - warnings at compile stage about pointer size on amd64 - needs check
4 # - warning: Installed (but unpackaged) file(s) found:
5 # /usr/bin/language-specific.sh
6 # /usr/bin/tesstrain.sh
7 # /usr/bin/tesstrain_utils.sh
10 %bcond_without openmp # OpenMP support
11 %bcond_with opencl # OpenCL support
12 Summary: Tesseract Open Source OCR Engine
13 Summary(pl.UTF-8): Tesseract - silnik OCR o otwartych źródłach
18 Group: Applications/Graphics
19 #Source0Download: https://github.com/tesseract-ocr/tesseract/releases
20 Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5: 39c2d8d7a3efa2265f8fcf4f27f76652
22 URL: https://github.com/tesseract-ocr/
23 %{?with_opencl:BuildRequires: OpenCL-devel}
24 BuildRequires: autoconf >= 2.69
25 BuildRequires: automake
26 BuildRequires: cairo-devel
27 BuildRequires: curl-devel
28 BuildRequires: leptonlib-devel >= 1.74
29 BuildRequires: libarchive-devel
30 %{?with_openmp:BuildRequires: libgomp-devel}
31 BuildRequires: libicu-devel >= 52.1
32 BuildRequires: libstdc++-devel >= 6:7
33 BuildRequires: libtiff-devel
34 BuildRequires: libtool >= 2:2
35 BuildRequires: pango-devel >= 1:1.38.0
36 Requires: leptonlib >= 1.74
37 Suggests: tesseract-data >= 3
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 A commercial quality OCR engine originally developed at HP between
42 1985 and 1995. In 1995, this engine was among the top 3 evaluated by
43 UNLV. It was open-sourced by HP and UNLV in 2005.
45 %description -l pl.UTF-8
46 Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
47 latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
48 Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
51 Summary: Tesseract training tools
52 Summary(pl.UTF-8): Narzędzia treningowe Tesseracta
53 Group: Applications/Graphics
54 Requires: %{name} = %{version}-%{release}
55 Requires: pango >= 1:1.38.0
58 This package contains the Tesseract training tools.
60 %description training -l pl.UTF-8
61 Ten pakiet zawiera programy do trenowania Tesseracta.
64 Summary: Header files for Tesseract libraries
65 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Tesseracta
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
69 Requires: leptonlib-devel >= 1.74
70 Requires: libarchive-devel
71 Requires: libstdc++-devel >= 6:7
74 This package contains the development header files necessary to
75 develop applications using Tesseract API.
77 %description devel -l pl.UTF-8
78 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
79 wykorzystujących API Tesseracta.
82 Summary: Static Tesseract libraries
83 Summary(pl.UTF-8): Statyczne biblioteki Tesseracta
84 Group: Development/Libraries
85 Requires: %{name}-devel = %{version}-%{release}
88 Static Tesseract libraries.
90 %description static -l pl.UTF-8
91 Statyczne biblioteki Tesseracta.
103 %{?with_opencl:--enable-opencl} \
104 %{!?with_openmp:--disable-openmp} \
105 --disable-silent-rules
110 rm -rf $RPM_BUILD_ROOT
113 DESTDIR=$RPM_BUILD_ROOT
115 %{__make} training-install \
116 DESTDIR=$RPM_BUILD_ROOT
118 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
121 rm -rf $RPM_BUILD_ROOT
123 %post -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
127 %defattr(644,root,root,755)
128 %doc AUTHORS ChangeLog README.md
129 %attr(755,root,root) %{_bindir}/tesseract
130 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
131 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.5
133 %{_mandir}/man1/tesseract.1*
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_bindir}/ambiguous_words
138 %attr(755,root,root) %{_bindir}/classifier_tester
139 %attr(755,root,root) %{_bindir}/cntraining
140 %attr(755,root,root) %{_bindir}/combine_lang_model
141 %attr(755,root,root) %{_bindir}/combine_tessdata
142 %attr(755,root,root) %{_bindir}/dawg2wordlist
143 %attr(755,root,root) %{_bindir}/lstmeval
144 %attr(755,root,root) %{_bindir}/lstmtraining
145 %attr(755,root,root) %{_bindir}/merge_unicharsets
146 %attr(755,root,root) %{_bindir}/mftraining
147 %attr(755,root,root) %{_bindir}/set_unicharset_properties
148 %attr(755,root,root) %{_bindir}/shapeclustering
149 %attr(755,root,root) %{_bindir}/text2image
150 %attr(755,root,root) %{_bindir}/unicharset_extractor
151 %attr(755,root,root) %{_bindir}/wordlist2dawg
152 %{_mandir}/man1/ambiguous_words.1*
153 %{_mandir}/man1/classifier_tester.1*
154 %{_mandir}/man1/cntraining.1*
155 %{_mandir}/man1/combine_lang_model.1*
156 %{_mandir}/man1/combine_tessdata.1*
157 %{_mandir}/man1/dawg2wordlist.1*
158 %{_mandir}/man1/lstmeval.1*
159 %{_mandir}/man1/lstmtraining.1*
160 %{_mandir}/man1/merge_unicharsets.1*
161 %{_mandir}/man1/mftraining.1*
162 %{_mandir}/man1/set_unicharset_properties.1*
163 %{_mandir}/man1/shapeclustering.1*
164 %{_mandir}/man1/text2image.1*
165 %{_mandir}/man1/unicharset_extractor.1*
166 %{_mandir}/man1/wordlist2dawg.1*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libtesseract.so
171 %{_includedir}/%{name}
172 %{_pkgconfigdir}/tesseract.pc
173 %{_mandir}/man5/unicharambigs.5*
174 %{_mandir}/man5/unicharset.5*
177 %defattr(644,root,root,755)
178 %{_libdir}/libtesseract.a