2 # - warnings at compile stage about pointer size on amd64 - needs check
5 %bcond_without openmp # OpenMP support
6 %bcond_with opencl # OpenCL support
8 Summary: Tesseract Open Source OCR Engine
9 Summary(pl.UTF-8): Tesseract - silnik OCR o otwartych źródłach
15 Group: Applications/Graphics
16 #Source0Download: https://github.com/tesseract-ocr/tesseract/releases
17 Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}-%{_beta}/%{name}-%{version}-%{_beta}.tar.gz
18 # Source0-md5: 9984be13fd64872fb236a60475f5fec6
19 Patch0: %{name}-opencl.patch
20 URL: https://github.com/tesseract-ocr/
21 %{?with_opencl:BuildRequires: OpenCL-devel}
22 BuildRequires: autoconf >= 2.59
23 BuildRequires: automake
24 BuildRequires: cairo-devel
25 BuildRequires: leptonlib-devel >= 1.74
26 %{?with_openmp:BuildRequires: libgomp-devel}
27 BuildRequires: libicu-devel
28 BuildRequires: libstdc++-devel >= 6:4.7
29 BuildRequires: libtiff-devel
30 BuildRequires: libtool >= 2:2
31 BuildRequires: pango-devel
32 Suggests: tesseract-data >= 3
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 A commercial quality OCR engine originally developed at HP between
37 1985 and 1995. In 1995, this engine was among the top 3 evaluated by
38 UNLV. It was open-sourced by HP and UNLV in 2005.
40 %description -l pl.UTF-8
41 Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
42 latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
43 Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
46 Summary: Tesseract training tools
47 Summary(pl.UTF-8): Narzędzia treningowe Tesseracta
48 Group: Applications/Graphics
49 Requires: %{name} = %{version}
52 This package contains the Tesseract training tools.
54 %description training -l pl.UTF-8
55 Ten pakiet zawiera programy do trenowania Tesseracta.
58 Summary: Header files for Tesseract libraries
59 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Tesseracta
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: leptonlib-devel
63 Requires: libstdc++-devel
66 This package contains the development header files necessary to
67 develop applications using Tesseract API.
69 %description devel -l pl.UTF-8
70 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
71 wykorzystujących API Tesseracta.
74 Summary: Static Tesseract libraries
75 Summary(pl.UTF-8): Statyczne biblioteki Tesseracta
76 Group: Development/Libraries
77 Requires: %{name}-devel = %{version}-%{release}
80 Static Tesseract libraries.
82 %description static -l pl.UTF-8
83 Statyczne biblioteki Tesseracta.
86 %setup -q -n %{name}-%{version}-%{_beta}
96 %{?with_opencl:--enable-opencl} \
97 %{!?with_openmp:--disable-openmp}
102 rm -rf $RPM_BUILD_ROOT
105 DESTDIR=$RPM_BUILD_ROOT
107 %{__make} training-install \
108 DESTDIR=$RPM_BUILD_ROOT
110 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
113 rm -rf $RPM_BUILD_ROOT
115 %post -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
119 %defattr(644,root,root,755)
120 %doc AUTHORS COPYING ChangeLog README.md
121 %attr(755,root,root) %{_bindir}/tesseract
122 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
123 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.4
125 %{_mandir}/man1/tesseract.1*
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_bindir}/ambiguous_words
130 %attr(755,root,root) %{_bindir}/classifier_tester
131 %attr(755,root,root) %{_bindir}/cntraining
132 %attr(755,root,root) %{_bindir}/combine_lang_model
133 %attr(755,root,root) %{_bindir}/combine_tessdata
134 %attr(755,root,root) %{_bindir}/dawg2wordlist
135 %attr(755,root,root) %{_bindir}/lstmeval
136 %attr(755,root,root) %{_bindir}/lstmtraining
137 %attr(755,root,root) %{_bindir}/merge_unicharsets
138 %attr(755,root,root) %{_bindir}/mftraining
139 %attr(755,root,root) %{_bindir}/set_unicharset_properties
140 %attr(755,root,root) %{_bindir}/shapeclustering
141 %attr(755,root,root) %{_bindir}/text2image
142 %attr(755,root,root) %{_bindir}/unicharset_extractor
143 %attr(755,root,root) %{_bindir}/wordlist2dawg
144 %{_mandir}/man1/ambiguous_words.1*
145 %{_mandir}/man1/classifier_tester.1*
146 %{_mandir}/man1/cntraining.1*
147 %{_mandir}/man1/combine_lang_model.1*
148 %{_mandir}/man1/combine_tessdata.1*
149 %{_mandir}/man1/dawg2wordlist.1*
150 %{_mandir}/man1/lstmeval.1*
151 %{_mandir}/man1/lstmtraining.1*
152 %{_mandir}/man1/merge_unicharsets.1*
153 %{_mandir}/man1/mftraining.1*
154 %{_mandir}/man1/set_unicharset_properties.1*
155 %{_mandir}/man1/shapeclustering.1*
156 %{_mandir}/man1/text2image.1*
157 %{_mandir}/man1/unicharset_extractor.1*
158 %{_mandir}/man1/wordlist2dawg.1*
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/libtesseract.so
163 %{_includedir}/%{name}
164 %{_pkgconfigdir}/tesseract.pc
165 %{_mandir}/man5/unicharambigs.5*
166 %{_mandir}/man5/unicharset.5*
169 %defattr(644,root,root,755)
170 %{_libdir}/libtesseract.a