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