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