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