]> git.pld-linux.org Git - packages/tesseract.git/blob - tesseract.spec
icu rebuild
[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:  autoconf >= 2.69
20 BuildRequires:  automake
21 BuildRequires:  cairo-devel
22 BuildRequires:  curl-devel
23 BuildRequires:  leptonlib-devel >= 1.74
24 BuildRequires:  libarchive-devel
25 %{?with_openmp:BuildRequires:   libgomp-devel}
26 BuildRequires:  libicu-devel >= 52.1
27 BuildRequires:  libstdc++-devel >= 6:7
28 BuildRequires:  libtiff-devel
29 BuildRequires:  libtool >= 2:2
30 BuildRequires:  pango-devel >= 1:1.38.0
31 Requires:       leptonlib >= 1.74
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}-%{release}
50 Requires:       pango >= 1:1.38.0
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:       curl-devel
64 Requires:       leptonlib-devel >= 1.74
65 Requires:       libarchive-devel
66 Requires:       libstdc++-devel >= 6:7
67
68 %description devel
69 This package contains the development header files necessary to
70 develop applications using Tesseract API.
71
72 %description devel -l pl.UTF-8
73 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
74 wykorzystujących API Tesseracta.
75
76 %package static
77 Summary:        Static Tesseract libraries
78 Summary(pl.UTF-8):      Statyczne biblioteki Tesseracta
79 Group:          Development/Libraries
80 Requires:       %{name}-devel = %{version}-%{release}
81
82 %description static
83 Static Tesseract libraries.
84
85 %description static -l pl.UTF-8
86 Statyczne biblioteki Tesseracta.
87
88 %prep
89 %setup -q
90
91 %build
92 %{__libtoolize}
93 %{__aclocal}
94 %{__autoconf}
95 %{__autoheader}
96 %{__automake}
97 %configure \
98         %{?with_opencl:--enable-opencl} \
99         %{!?with_openmp:--disable-openmp} \
100         --disable-silent-rules
101 %{__make}
102 %{__make} training
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT%{_datadir}/tessdata/script
107
108 %{__make} install \
109         DESTDIR=$RPM_BUILD_ROOT
110
111 %{__make} training-install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %post   -p /sbin/ldconfig
120 %postun -p /sbin/ldconfig
121
122 %files
123 %defattr(644,root,root,755)
124 %doc AUTHORS ChangeLog README.md
125 %attr(755,root,root) %{_bindir}/tesseract
126 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
127 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.5
128 %dir %{_datadir}/tessdata
129 %{_datadir}/tessdata/configs
130 %dir %{_datadir}/tessdata/script
131 %{_datadir}/tessdata/tessconfigs
132 %{_datadir}/tessdata/pdf.ttf
133 %{_mandir}/man1/tesseract.1*
134
135 %files training
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_bindir}/ambiguous_words
138 %attr(755,root,root) %{_bindir}/classifier_tester
139 %attr(755,root,root) %{_bindir}/cntraining
140 %attr(755,root,root) %{_bindir}/combine_lang_model
141 %attr(755,root,root) %{_bindir}/combine_tessdata
142 %attr(755,root,root) %{_bindir}/dawg2wordlist
143 %attr(755,root,root) %{_bindir}/lstmeval
144 %attr(755,root,root) %{_bindir}/lstmtraining
145 %attr(755,root,root) %{_bindir}/merge_unicharsets
146 %attr(755,root,root) %{_bindir}/mftraining
147 %attr(755,root,root) %{_bindir}/set_unicharset_properties
148 %attr(755,root,root) %{_bindir}/shapeclustering
149 %attr(755,root,root) %{_bindir}/text2image
150 %attr(755,root,root) %{_bindir}/unicharset_extractor
151 %attr(755,root,root) %{_bindir}/wordlist2dawg
152 %{_mandir}/man1/ambiguous_words.1*
153 %{_mandir}/man1/classifier_tester.1*
154 %{_mandir}/man1/cntraining.1*
155 %{_mandir}/man1/combine_lang_model.1*
156 %{_mandir}/man1/combine_tessdata.1*
157 %{_mandir}/man1/dawg2wordlist.1*
158 %{_mandir}/man1/lstmeval.1*
159 %{_mandir}/man1/lstmtraining.1*
160 %{_mandir}/man1/merge_unicharsets.1*
161 %{_mandir}/man1/mftraining.1*
162 %{_mandir}/man1/set_unicharset_properties.1*
163 %{_mandir}/man1/shapeclustering.1*
164 %{_mandir}/man1/text2image.1*
165 %{_mandir}/man1/unicharset_extractor.1*
166 %{_mandir}/man1/wordlist2dawg.1*
167
168 %files devel
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libtesseract.so
171 %{_includedir}/%{name}
172 %{_pkgconfigdir}/tesseract.pc
173 %{_mandir}/man5/unicharambigs.5*
174 %{_mandir}/man5/unicharset.5*
175
176 %files static
177 %defattr(644,root,root,755)
178 %{_libdir}/libtesseract.a
This page took 0.056839 seconds and 4 git commands to generate.