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