]>
Commit | Line | Data |
---|---|---|
2fecdb4d PG |
1 | # TODO: |
2 | # - warnings at compile stage about pointer size on amd64 - needs check | |
9694f838 JB |
3 | # |
4 | # Conditional build: | |
b011b0dc | 5 | %bcond_without openmp # OpenMP support |
9694f838 | 6 | %bcond_with opencl # OpenCL support |
a7d2de0d | 7 | Summary: Tesseract Open Source OCR Engine |
877b8a7e | 8 | Summary(pl.UTF-8): Tesseract - silnik OCR o otwartych źródłach |
595d84bc | 9 | %define _beta beta.4 |
afaac0e1 | 10 | Name: tesseract |
595d84bc | 11 | Version: 4.0.0 |
2d265a5a | 12 | Release: 1 |
187eebd6 | 13 | License: Apache v2.0 |
afaac0e1 | 14 | Group: Applications/Graphics |
61d69fb5 | 15 | #Source0Download: https://github.com/tesseract-ocr/tesseract/releases |
2d265a5a AG |
16 | Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz |
17 | # Source0-md5: ebed139edb16f10c5ba6ee3bf38f7dc5 | |
70a20ce4 | 18 | Patch0: a2x.patch |
9694f838 JB |
19 | URL: https://github.com/tesseract-ocr/ |
20 | %{?with_opencl:BuildRequires: OpenCL-devel} | |
61d69fb5 | 21 | BuildRequires: autoconf >= 2.59 |
a7d2de0d | 22 | BuildRequires: automake |
caa3afbb | 23 | BuildRequires: cairo-devel |
cf0c79c1 | 24 | BuildRequires: leptonlib-devel >= 1.74 |
b011b0dc | 25 | %{?with_openmp:BuildRequires: libgomp-devel} |
ba6a7995 | 26 | BuildRequires: libicu-devel |
9694f838 JB |
27 | BuildRequires: libstdc++-devel >= 6:4.7 |
28 | BuildRequires: libtiff-devel | |
29 | BuildRequires: libtool >= 2:2 | |
caa3afbb | 30 | BuildRequires: pango-devel |
f7537631 | 31 | Suggests: tesseract-data >= 3 |
afaac0e1 ER |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | A commercial quality OCR engine originally developed at HP between | |
36 | 1985 and 1995. In 1995, this engine was among the top 3 evaluated by | |
37 | UNLV. It was open-sourced by HP and UNLV in 2005. | |
38 | ||
ac8a5dbe JR |
39 | %description -l pl.UTF-8 |
40 | Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w | |
41 | latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV. | |
42 | Źródła zostały uwolnione przez HP i UNLV w 2005 roku. | |
a1b42a34 | 43 | |
ba6a7995 TP |
44 | %package training |
45 | Summary: Tesseract training tools | |
ab3171d0 | 46 | Summary(pl.UTF-8): Narzędzia treningowe Tesseracta |
595d84bc | 47 | Group: Applications/Graphics |
ba6a7995 TP |
48 | Requires: %{name} = %{version} |
49 | ||
50 | %description training | |
51 | This package contains the Tesseract training tools. | |
52 | ||
53 | %description training -l pl.UTF-8 | |
ab3171d0 | 54 | Ten pakiet zawiera programy do trenowania Tesseracta. |
ba6a7995 | 55 | |
f7537631 JB |
56 | %package devel |
57 | Summary: Header files for Tesseract libraries | |
58 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Tesseracta | |
595d84bc | 59 | Group: Development/Libraries |
2fecdb4d | 60 | Requires: %{name} = %{version}-%{release} |
f7537631 JB |
61 | Requires: leptonlib-devel |
62 | Requires: libstdc++-devel | |
2fecdb4d | 63 | |
f7537631 JB |
64 | %description devel |
65 | This package contains the development header files necessary to | |
66 | develop applications using Tesseract API. | |
2fecdb4d | 67 | |
f7537631 JB |
68 | %description devel -l pl.UTF-8 |
69 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
70 | wykorzystujących API Tesseracta. | |
2fecdb4d | 71 | |
f7537631 JB |
72 | %package static |
73 | Summary: Static Tesseract libraries | |
74 | Summary(pl.UTF-8): Statyczne biblioteki Tesseracta | |
595d84bc | 75 | Group: Development/Libraries |
f7537631 | 76 | Requires: %{name}-devel = %{version}-%{release} |
2fecdb4d | 77 | |
f7537631 JB |
78 | %description static |
79 | Static Tesseract libraries. | |
80 | ||
81 | %description static -l pl.UTF-8 | |
82 | Statyczne biblioteki Tesseracta. | |
2fecdb4d | 83 | |
afaac0e1 | 84 | %prep |
2d265a5a | 85 | %setup -q |
70a20ce4 | 86 | %patch0 -p1 |
afaac0e1 ER |
87 | |
88 | %build | |
f7537631 JB |
89 | %{__libtoolize} |
90 | %{__aclocal} | |
91 | %{__autoconf} | |
92 | %{__autoheader} | |
93 | %{__automake} | |
9694f838 JB |
94 | %configure \ |
95 | %{?with_opencl:--enable-opencl} \ | |
b011b0dc | 96 | %{!?with_openmp:--disable-openmp} |
afaac0e1 | 97 | %{__make} |
caa3afbb | 98 | %{__make} training |
afaac0e1 ER |
99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %{__make} install \ | |
104 | DESTDIR=$RPM_BUILD_ROOT | |
105 | ||
caa3afbb TP |
106 | %{__make} training-install \ |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
6f607027 TP |
109 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la |
110 | ||
afaac0e1 ER |
111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
0527fb34 BS |
114 | %post -p /sbin/ldconfig |
115 | %postun -p /sbin/ldconfig | |
116 | ||
afaac0e1 ER |
117 | %files |
118 | %defattr(644,root,root,755) | |
cf0c79c1 | 119 | %doc AUTHORS COPYING ChangeLog README.md |
ba6a7995 TP |
120 | %attr(755,root,root) %{_bindir}/tesseract |
121 | %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.* | |
595d84bc | 122 | %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.4 |
caa3afbb | 123 | %{_datadir}/tessdata |
ba6a7995 TP |
124 | %{_mandir}/man1/tesseract.1* |
125 | ||
126 | %files training | |
127 | %defattr(644,root,root,755) | |
128 | %attr(755,root,root) %{_bindir}/ambiguous_words | |
d02c75d3 | 129 | %attr(755,root,root) %{_bindir}/classifier_tester |
ba6a7995 | 130 | %attr(755,root,root) %{_bindir}/cntraining |
595d84bc | 131 | %attr(755,root,root) %{_bindir}/combine_lang_model |
ba6a7995 TP |
132 | %attr(755,root,root) %{_bindir}/combine_tessdata |
133 | %attr(755,root,root) %{_bindir}/dawg2wordlist | |
595d84bc JR |
134 | %attr(755,root,root) %{_bindir}/lstmeval |
135 | %attr(755,root,root) %{_bindir}/lstmtraining | |
136 | %attr(755,root,root) %{_bindir}/merge_unicharsets | |
ba6a7995 TP |
137 | %attr(755,root,root) %{_bindir}/mftraining |
138 | %attr(755,root,root) %{_bindir}/set_unicharset_properties | |
139 | %attr(755,root,root) %{_bindir}/shapeclustering | |
140 | %attr(755,root,root) %{_bindir}/text2image | |
141 | %attr(755,root,root) %{_bindir}/unicharset_extractor | |
142 | %attr(755,root,root) %{_bindir}/wordlist2dawg | |
854e1083 | 143 | %{_mandir}/man1/ambiguous_words.1* |
595d84bc | 144 | %{_mandir}/man1/classifier_tester.1* |
8028172e | 145 | %{_mandir}/man1/cntraining.1* |
595d84bc | 146 | %{_mandir}/man1/combine_lang_model.1* |
8028172e | 147 | %{_mandir}/man1/combine_tessdata.1* |
854e1083 | 148 | %{_mandir}/man1/dawg2wordlist.1* |
595d84bc JR |
149 | %{_mandir}/man1/lstmeval.1* |
150 | %{_mandir}/man1/lstmtraining.1* | |
151 | %{_mandir}/man1/merge_unicharsets.1* | |
8028172e | 152 | %{_mandir}/man1/mftraining.1* |
595d84bc | 153 | %{_mandir}/man1/set_unicharset_properties.1* |
854e1083 | 154 | %{_mandir}/man1/shapeclustering.1* |
595d84bc | 155 | %{_mandir}/man1/text2image.1* |
8028172e JB |
156 | %{_mandir}/man1/unicharset_extractor.1* |
157 | %{_mandir}/man1/wordlist2dawg.1* | |
2da6320c | 158 | |
2fecdb4d | 159 | %files devel |
2da6320c | 160 | %defattr(644,root,root,755) |
8028172e | 161 | %attr(755,root,root) %{_libdir}/libtesseract.so |
f7537631 | 162 | %{_includedir}/%{name} |
854e1083 | 163 | %{_pkgconfigdir}/tesseract.pc |
8028172e JB |
164 | %{_mandir}/man5/unicharambigs.5* |
165 | %{_mandir}/man5/unicharset.5* | |
f7537631 JB |
166 | |
167 | %files static | |
168 | %defattr(644,root,root,755) | |
8028172e | 169 | %{_libdir}/libtesseract.a |