]> git.pld-linux.org Git - packages/tesseract.git/blame - tesseract.spec
- opencl patch is obsolete
[packages/tesseract.git] / tesseract.spec
CommitLineData
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 8Summary: Tesseract Open Source OCR Engine
877b8a7e 9Summary(pl.UTF-8): Tesseract - silnik OCR o otwartych źródłach
595d84bc 10%define _beta beta.4
afaac0e1 11Name: tesseract
595d84bc
JR
12Version: 4.0.0
13Release: 0.%{_beta}.1
187eebd6 14License: Apache v2.0
afaac0e1 15Group: Applications/Graphics
61d69fb5 16#Source0Download: https://github.com/tesseract-ocr/tesseract/releases
595d84bc
JR
17Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}-%{_beta}/%{name}-%{version}-%{_beta}.tar.gz
18# Source0-md5: 9984be13fd64872fb236a60475f5fec6
9694f838
JB
19URL: https://github.com/tesseract-ocr/
20%{?with_opencl:BuildRequires: OpenCL-devel}
61d69fb5 21BuildRequires: autoconf >= 2.59
a7d2de0d 22BuildRequires: automake
caa3afbb 23BuildRequires: cairo-devel
cf0c79c1 24BuildRequires: leptonlib-devel >= 1.74
b011b0dc 25%{?with_openmp:BuildRequires: libgomp-devel}
ba6a7995 26BuildRequires: libicu-devel
9694f838
JB
27BuildRequires: libstdc++-devel >= 6:4.7
28BuildRequires: libtiff-devel
29BuildRequires: libtool >= 2:2
caa3afbb 30BuildRequires: pango-devel
f7537631 31Suggests: tesseract-data >= 3
afaac0e1
ER
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35A commercial quality OCR engine originally developed at HP between
361985 and 1995. In 1995, this engine was among the top 3 evaluated by
37UNLV. It was open-sourced by HP and UNLV in 2005.
38
ac8a5dbe
JR
39%description -l pl.UTF-8
40Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
41latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
42Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
a1b42a34 43
ba6a7995
TP
44%package training
45Summary: Tesseract training tools
ab3171d0 46Summary(pl.UTF-8): Narzędzia treningowe Tesseracta
595d84bc 47Group: Applications/Graphics
ba6a7995
TP
48Requires: %{name} = %{version}
49
50%description training
51This package contains the Tesseract training tools.
52
53%description training -l pl.UTF-8
ab3171d0 54Ten pakiet zawiera programy do trenowania Tesseracta.
ba6a7995 55
f7537631
JB
56%package devel
57Summary: Header files for Tesseract libraries
58Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Tesseracta
595d84bc 59Group: Development/Libraries
2fecdb4d 60Requires: %{name} = %{version}-%{release}
f7537631
JB
61Requires: leptonlib-devel
62Requires: libstdc++-devel
2fecdb4d 63
f7537631
JB
64%description devel
65This package contains the development header files necessary to
66develop applications using Tesseract API.
2fecdb4d 67
f7537631
JB
68%description devel -l pl.UTF-8
69Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
70wykorzystujących API Tesseracta.
2fecdb4d 71
f7537631
JB
72%package static
73Summary: Static Tesseract libraries
74Summary(pl.UTF-8): Statyczne biblioteki Tesseracta
595d84bc 75Group: Development/Libraries
f7537631 76Requires: %{name}-devel = %{version}-%{release}
2fecdb4d 77
f7537631
JB
78%description static
79Static Tesseract libraries.
80
81%description static -l pl.UTF-8
82Statyczne biblioteki Tesseracta.
2fecdb4d 83
afaac0e1 84%prep
595d84bc 85%setup -q -n %{name}-%{version}-%{_beta}
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
100rm -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
111rm -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.*.*.*
595d84bc 121%attr(755,root,root) %ghost %{_libdir}/libtesseract.so.4
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 129%attr(755,root,root) %{_bindir}/cntraining
595d84bc 130%attr(755,root,root) %{_bindir}/combine_lang_model
ba6a7995
TP
131%attr(755,root,root) %{_bindir}/combine_tessdata
132%attr(755,root,root) %{_bindir}/dawg2wordlist
595d84bc
JR
133%attr(755,root,root) %{_bindir}/lstmeval
134%attr(755,root,root) %{_bindir}/lstmtraining
135%attr(755,root,root) %{_bindir}/merge_unicharsets
ba6a7995
TP
136%attr(755,root,root) %{_bindir}/mftraining
137%attr(755,root,root) %{_bindir}/set_unicharset_properties
138%attr(755,root,root) %{_bindir}/shapeclustering
139%attr(755,root,root) %{_bindir}/text2image
140%attr(755,root,root) %{_bindir}/unicharset_extractor
141%attr(755,root,root) %{_bindir}/wordlist2dawg
854e1083 142%{_mandir}/man1/ambiguous_words.1*
595d84bc 143%{_mandir}/man1/classifier_tester.1*
8028172e 144%{_mandir}/man1/cntraining.1*
595d84bc 145%{_mandir}/man1/combine_lang_model.1*
8028172e 146%{_mandir}/man1/combine_tessdata.1*
854e1083 147%{_mandir}/man1/dawg2wordlist.1*
595d84bc
JR
148%{_mandir}/man1/lstmeval.1*
149%{_mandir}/man1/lstmtraining.1*
150%{_mandir}/man1/merge_unicharsets.1*
8028172e 151%{_mandir}/man1/mftraining.1*
595d84bc 152%{_mandir}/man1/set_unicharset_properties.1*
854e1083 153%{_mandir}/man1/shapeclustering.1*
595d84bc 154%{_mandir}/man1/text2image.1*
8028172e
JB
155%{_mandir}/man1/unicharset_extractor.1*
156%{_mandir}/man1/wordlist2dawg.1*
2da6320c 157
2fecdb4d 158%files devel
2da6320c 159%defattr(644,root,root,755)
8028172e 160%attr(755,root,root) %{_libdir}/libtesseract.so
f7537631 161%{_includedir}/%{name}
854e1083 162%{_pkgconfigdir}/tesseract.pc
8028172e
JB
163%{_mandir}/man5/unicharambigs.5*
164%{_mandir}/man5/unicharset.5*
f7537631
JB
165
166%files static
167%defattr(644,root,root,755)
8028172e 168%{_libdir}/libtesseract.a
This page took 0.134484 seconds and 4 git commands to generate.