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