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