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