]> git.pld-linux.org Git - packages/tesseract.git/blob - tesseract.spec
- opencl patch is obsolete
[packages/tesseract.git] / tesseract.spec
1 # TODO:
2 # - warnings at compile stage about pointer size on amd64 - needs check
3 #
4 # Conditional build:
5 %bcond_without  openmp  # OpenMP support
6 %bcond_with     opencl  # OpenCL support
7 #
8 Summary:        Tesseract Open Source OCR Engine
9 Summary(pl.UTF-8):      Tesseract - silnik OCR o otwartych źródłach
10 %define _beta   beta.4
11 Name:           tesseract
12 Version:        4.0.0
13 Release:        0.%{_beta}.1
14 License:        Apache v2.0
15 Group:          Applications/Graphics
16 #Source0Download: https://github.com/tesseract-ocr/tesseract/releases
17 Source0:        https://github.com/tesseract-ocr/tesseract/archive/%{version}-%{_beta}/%{name}-%{version}-%{_beta}.tar.gz
18 # Source0-md5:  9984be13fd64872fb236a60475f5fec6
19 URL:            https://github.com/tesseract-ocr/
20 %{?with_opencl:BuildRequires:   OpenCL-devel}
21 BuildRequires:  autoconf >= 2.59
22 BuildRequires:  automake
23 BuildRequires:  cairo-devel
24 BuildRequires:  leptonlib-devel >= 1.74
25 %{?with_openmp:BuildRequires:   libgomp-devel}
26 BuildRequires:  libicu-devel
27 BuildRequires:  libstdc++-devel >= 6:4.7
28 BuildRequires:  libtiff-devel
29 BuildRequires:  libtool >= 2:2
30 BuildRequires:  pango-devel
31 Suggests:       tesseract-data >= 3
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 A commercial quality OCR engine originally developed at HP between
36 1985 and 1995. In 1995, this engine was among the top 3 evaluated by
37 UNLV. It was open-sourced by HP and UNLV in 2005.
38
39 %description -l pl.UTF-8
40 Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
41 latach 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.
43
44 %package training
45 Summary:        Tesseract training tools
46 Summary(pl.UTF-8):      Narzędzia treningowe Tesseracta
47 Group:          Applications/Graphics
48 Requires:       %{name} = %{version}
49
50 %description training
51 This package contains the Tesseract training tools.
52
53 %description training -l pl.UTF-8
54 Ten pakiet zawiera programy do trenowania Tesseracta.
55
56 %package devel
57 Summary:        Header files for Tesseract libraries
58 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Tesseracta
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61 Requires:       leptonlib-devel
62 Requires:       libstdc++-devel
63
64 %description devel
65 This package contains the development header files necessary to
66 develop applications using Tesseract API.
67
68 %description devel -l pl.UTF-8
69 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
70 wykorzystujących API Tesseracta.
71
72 %package static
73 Summary:        Static Tesseract libraries
74 Summary(pl.UTF-8):      Statyczne biblioteki Tesseracta
75 Group:          Development/Libraries
76 Requires:       %{name}-devel = %{version}-%{release}
77
78 %description static
79 Static Tesseract libraries.
80
81 %description static -l pl.UTF-8
82 Statyczne biblioteki Tesseracta.
83
84 %prep
85 %setup -q -n %{name}-%{version}-%{_beta}
86
87 %build
88 %{__libtoolize}
89 %{__aclocal}
90 %{__autoconf}
91 %{__autoheader}
92 %{__automake}
93 %configure \
94         %{?with_opencl:--enable-opencl} \
95         %{!?with_openmp:--disable-openmp}
96 %{__make}
97 %{__make} training
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101
102 %{__make} install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 %{__make} training-install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %post   -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
115
116 %files
117 %defattr(644,root,root,755)
118 %doc AUTHORS COPYING ChangeLog README.md
119 %attr(755,root,root) %{_bindir}/tesseract
120 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.4
122 %{_datadir}/tessdata
123 %{_mandir}/man1/tesseract.1*
124
125 %files training
126 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_bindir}/ambiguous_words
128 %attr(755,root,root) %{_bindir}/classifier_tester
129 %attr(755,root,root) %{_bindir}/cntraining
130 %attr(755,root,root) %{_bindir}/combine_lang_model
131 %attr(755,root,root) %{_bindir}/combine_tessdata
132 %attr(755,root,root) %{_bindir}/dawg2wordlist
133 %attr(755,root,root) %{_bindir}/lstmeval
134 %attr(755,root,root) %{_bindir}/lstmtraining
135 %attr(755,root,root) %{_bindir}/merge_unicharsets
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
142 %{_mandir}/man1/ambiguous_words.1*
143 %{_mandir}/man1/classifier_tester.1*
144 %{_mandir}/man1/cntraining.1*
145 %{_mandir}/man1/combine_lang_model.1*
146 %{_mandir}/man1/combine_tessdata.1*
147 %{_mandir}/man1/dawg2wordlist.1*
148 %{_mandir}/man1/lstmeval.1*
149 %{_mandir}/man1/lstmtraining.1*
150 %{_mandir}/man1/merge_unicharsets.1*
151 %{_mandir}/man1/mftraining.1*
152 %{_mandir}/man1/set_unicharset_properties.1*
153 %{_mandir}/man1/shapeclustering.1*
154 %{_mandir}/man1/text2image.1*
155 %{_mandir}/man1/unicharset_extractor.1*
156 %{_mandir}/man1/wordlist2dawg.1*
157
158 %files devel
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_libdir}/libtesseract.so
161 %{_includedir}/%{name}
162 %{_pkgconfigdir}/tesseract.pc
163 %{_mandir}/man5/unicharambigs.5*
164 %{_mandir}/man5/unicharset.5*
165
166 %files static
167 %defattr(644,root,root,755)
168 %{_libdir}/libtesseract.a
This page took 0.046946 seconds and 4 git commands to generate.