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