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