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