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
14 Group: Applications/Graphics
15 Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 645a21effcf2825a3473849d72a7fd90
17 Patch0: %{name}-opencl.patch
18 URL: https://github.com/tesseract-ocr/
19 %{?with_opencl:BuildRequires: OpenCL-devel}
20 BuildRequires: autoconf >= 2.50
21 BuildRequires: automake
22 BuildRequires: cairo-devel
23 BuildRequires: leptonlib-devel >= 1.71
24 %{?with_openmp:BuildRequires: libgomp-devel}
25 BuildRequires: libicu-devel
26 BuildRequires: libstdc++-devel >= 6:4.7
27 BuildRequires: libtiff-devel
28 BuildRequires: libtool >= 2:2
29 BuildRequires: pango-devel
30 Suggests: tesseract-data >= 3
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A commercial quality OCR engine originally developed at HP between
35 1985 and 1995. In 1995, this engine was among the top 3 evaluated by
36 UNLV. It was open-sourced by HP and UNLV in 2005.
38 %description -l pl.UTF-8
39 Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
40 latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
41 Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
44 Summary: Tesseract training tools
45 Summary(pl.UTF-8): Narzędzia treningowe Tesseracta
46 Group: Applications/Graphics
47 Requires: %{name} = %{version}
50 This package contains the Tesseract training tools.
52 %description training -l pl.UTF-8
53 Ten pakiet zawiera programy do trenowania Tesseracta.
56 Summary: Header files for Tesseract libraries
57 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Tesseracta
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: leptonlib-devel
61 Requires: libstdc++-devel
64 This package contains the development header files necessary to
65 develop applications using Tesseract API.
67 %description devel -l pl.UTF-8
68 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
69 wykorzystujących API Tesseracta.
72 Summary: Static Tesseract libraries
73 Summary(pl.UTF-8): Statyczne biblioteki Tesseracta
74 Group: Development/Libraries
75 Requires: %{name}-devel = %{version}-%{release}
78 Static Tesseract libraries.
80 %description static -l pl.UTF-8
81 Statyczne biblioteki Tesseracta.
94 %{?with_opencl:--enable-opencl} \
95 %{!?with_openmp:--disable-openmp}
100 rm -rf $RPM_BUILD_ROOT
103 DESTDIR=$RPM_BUILD_ROOT
105 %{__make} training-install \
106 DESTDIR=$RPM_BUILD_ROOT
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
111 rm -rf $RPM_BUILD_ROOT
113 %post -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
117 %defattr(644,root,root,755)
118 %doc AUTHORS COPYING ChangeLog README.md ReleaseNotes
119 %attr(755,root,root) %{_bindir}/tesseract
120 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.3
123 %{_mandir}/man1/tesseract.1*
126 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_bindir}/ambiguous_words
128 %attr(755,root,root) %{_bindir}/classifier_tester
129 %attr(755,root,root) %{_bindir}/cntraining
130 %attr(755,root,root) %{_bindir}/combine_tessdata
131 %attr(755,root,root) %{_bindir}/dawg2wordlist
132 %attr(755,root,root) %{_bindir}/mftraining
133 %attr(755,root,root) %{_bindir}/set_unicharset_properties
134 %attr(755,root,root) %{_bindir}/shapeclustering
135 %attr(755,root,root) %{_bindir}/text2image
136 %attr(755,root,root) %{_bindir}/unicharset_extractor
137 %attr(755,root,root) %{_bindir}/wordlist2dawg
138 %{_mandir}/man1/ambiguous_words.1*
139 %{_mandir}/man1/cntraining.1*
140 %{_mandir}/man1/combine_tessdata.1*
141 %{_mandir}/man1/dawg2wordlist.1*
142 %{_mandir}/man1/mftraining.1*
143 %{_mandir}/man1/shapeclustering.1*
144 %{_mandir}/man1/unicharset_extractor.1*
145 %{_mandir}/man1/wordlist2dawg.1*
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/libtesseract.so
150 %{_includedir}/%{name}
151 %{_pkgconfigdir}/tesseract.pc
152 %{_mandir}/man5/unicharambigs.5*
153 %{_mandir}/man5/unicharset.5*
156 %defattr(644,root,root,755)
157 %{_libdir}/libtesseract.a