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