]> git.pld-linux.org Git - packages/tesseract.git/blobdiff - tesseract.spec
- updated to 5.3.4
[packages/tesseract.git] / tesseract.spec
index c218d9fef39f0bcd9b9ba6c73f248b921f581d7a..934119ad3a699b4fc19325d35c033e7a8a019e6e 100644 (file)
@@ -1,35 +1,38 @@
 # TODO:
-# - warnings at compile stage about pointer size on amd64 - needs check
-# - build dynamic library, not the static one
+# - tensorflow support
 #
-%define                lang_version    2.00
+# Conditional build:
+%bcond_without openmp  # OpenMP support
+%bcond_with    opencl  # OpenCL support
 
 Summary:       Tesseract Open Source OCR Engine
 Summary(pl.UTF-8):     Tesseract - silnik OCR o otwartych źródłach
 Name:          tesseract
-Version:       2.04
+Version:       5.3.4
 Release:       1
 License:       Apache v2.0
 Group:         Applications/Graphics
-Source0:       http://tesseract-ocr.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5: b44eba1a9f4892ac62e484c807fe0533
-Source1:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.eng.tar.gz
-# Source1-md5: b8291d6b3a63ce7879d688e845e341a9
-Source2:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.fra.tar.gz
-# Source2-md5: 64896b462e62572a3708bb461820126c
-Source3:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.ita.tar.gz
-# Source3-md5: 2759e1dae91a989a43490ff4c2253a4b
-Source4:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.deu.tar.gz
-# Source4-md5: 609d91b1ae3759a756b819b5d8403653
-Source5:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.spa.tar.gz
-# Source5-md5: bc26a777b2384613895677cb8e61ca75
-Source6:       http://tesseract-ocr.googlecode.com/files/%{name}-%{lang_version}.nld.tar.gz
-# Source6-md5: b2f6ede182cea4bbfffd3b040533ce58
-Patch0:                %{name}-no-java.patch
-Patch1:                %{name}-gcc44.patch
-URL:           http://code.google.com/p/tesseract-ocr/
+#Source0Download: https://github.com/tesseract-ocr/tesseract/releases
+Source0:       https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 53de961804ccbcb83b73122f721d8f83
+URL:           https://github.com/tesseract-ocr/
+%{?with_opencl:BuildRequires:  OpenCL-devel}
+BuildRequires: asciidoc
+BuildRequires: autoconf >= 2.69
 BuildRequires: automake
+BuildRequires: cairo-devel
+BuildRequires: curl-devel
+BuildRequires: leptonlib-devel >= 1.74
+BuildRequires: libarchive-devel
+%{?with_openmp:BuildRequires:  libgomp-devel}
+BuildRequires: libicu-devel >= 52.1
+BuildRequires: libstdc++-devel >= 6:7
 BuildRequires: libtiff-devel
+BuildRequires: libtool >= 2:2
+BuildRequires: libxslt-progs
+BuildRequires: pango-devel >= 1:1.38.0
+Requires:      leptonlib >= 1.74
+Suggests:      tesseract-data >= 3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -42,171 +45,137 @@ Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
 latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
 Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
 
-%package lang-de
-Summary:       German language data for Tesseract
-Summary(pl.UTF-8):     Dane języka niemieckiego dla Tesseracta
+%package training
+Summary:       Tesseract training tools
+Summary(pl.UTF-8):     Narzędzia treningowe Tesseracta
 Group:         Applications/Graphics
 Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-deu
+Requires:      pango >= 1:1.38.0
 
-%description lang-de
-This package contains the data files required to recognize German
-language.
+%description training
+This package contains the Tesseract training tools.
 
-%description lang-de -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-niemieckiego.
+%description training -l pl.UTF-8
+Ten pakiet zawiera programy do trenowania Tesseracta.
 
-%package lang-en
-Summary:       English language data for Tesseract
-Summary(pl.UTF-8):     Dane języka angielskiego dla Tesseracta
-Group:         Applications/Graphics
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-eng
-
-%description lang-en
-This package contains the data files required to recognize English
-language.
-
-%description lang-en -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-angielskiego.
-
-%package lang-es
-Summary:       Spanish language data for Tesseract
-Summary(pl.UTF-8):     Dane języka hiszpańskiego dla Tesseracta
-Group:         Applications/Graphics
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-spa
-
-%description lang-es
-This package contains the data files required to recognize Spanish
-language.
-
-%description lang-es -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-hiszpańskiego.
-
-%package lang-fr
-Summary:       French language data for Tesseract
-Summary(pl.UTF-8):     Dane języka francuskiego dla Tesseracta
-Group:         Applications/Graphics
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-fra
-
-%description lang-fr
-This package contains the data files required to recognize French
-language.
-
-%description lang-fr -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-francuskiego.
-
-%package lang-it
-Summary:       Italian language data for Tesseract
-Summary(pl.UTF-8):     Dane języka włoskiego dla Tesseracta
-Group:         Applications/Graphics
+%package devel
+Summary:       Header files for Tesseract libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek Tesseracta
+Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-ita
-
-%description lang-it
-This package contains the data files required to recognize Italian
-language.
+Requires:      curl-devel
+Requires:      leptonlib-devel >= 1.74
+Requires:      libarchive-devel
+Requires:      libstdc++-devel >= 6:7
 
-%description lang-it -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-włoskiego.
-
-%package lang-nl
-Summary:       Dutch language data for Tesseract
-Summary(pl.UTF-8):     Dane języka holenderskiego dla Tesseracta
-Group:         Applications/Graphics
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     tesseract-nl
+%description devel
+This package contains the development header files necessary to
+develop applications using Tesseract API.
 
-%description lang-nl
-This package contains the data files required to recognize Dutch
-language.
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
+wykorzystujących API Tesseracta.
 
-%description lang-nl -l pl.UTF-8
-Ten pakiet zawiera pliki danych potrzebne do rozpoznawania języka
-holenderskiego.
+%package static
+Summary:       Static Tesseract libraries
+Summary(pl.UTF-8):     Statyczne biblioteki Tesseracta
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
 
-%package devel
-Summary:       Tesseract - Development header files and libraries
-Summary(pl.UTF-8):     Tesseract - Pliki nagłówkowe i biblioteki dla programistów
-Group:          Development/Libraries
+%description static
+Static Tesseract libraries.
 
-%description devel
-This package contains the development header files and libraries
-necessary to develop applications using Tesseract.
+%description static -l pl.UTF-8
+Statyczne biblioteki Tesseracta.
 
 %prep
 %setup -q
-tar xzf %{SOURCE1}
-tar xzf %{SOURCE2}
-tar xzf %{SOURCE3}
-tar xzf %{SOURCE4}
-tar xzf %{SOURCE5}
-tar xzf %{SOURCE6}
-%patch0 -p1
-%patch1 -p1
 
 %build
-cp -f /usr/share/automake/config.sub config
-%configure
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       %{?with_opencl:--enable-opencl} \
+       %{!?with_openmp:--disable-openmp} \
+       --disable-silent-rules
 %{__make}
+%{__make} training
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/tessdata/script
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__make} training-install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post   -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README
-%attr(755,root,root) %{_bindir}/cntraining
-%attr(755,root,root) %{_bindir}/mftraining
+%doc AUTHORS ChangeLog README.md
 %attr(755,root,root) %{_bindir}/tesseract
-%attr(755,root,root) %{_bindir}/unicharset_extractor
-%attr(755,root,root) %{_bindir}/wordlist2dawg
+%attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtesseract.so.5
 %dir %{_datadir}/tessdata
-%{_datadir}/tessdata/confsets
-%dir %{_datadir}/tessdata/configs
-%{_datadir}/tessdata/configs/*
-%dir %{_datadir}/tessdata/tessconfigs
-%{_datadir}/tessdata/tessconfigs/*
+%{_datadir}/tessdata/configs
+%dir %{_datadir}/tessdata/script
+%{_datadir}/tessdata/tessconfigs
+%{_datadir}/tessdata/pdf.ttf
+%{_mandir}/man1/tesseract.1*
 
-%files lang-de
+%files training
 %defattr(644,root,root,755)
-%{_datadir}/tessdata/deu.*
-
-%files lang-en
-%defattr(644,root,root,755)
-%{_datadir}/tessdata/eng.*
-
-%files lang-es
-%defattr(644,root,root,755)
-%{_datadir}/tessdata/spa.*
-
-%files lang-fr
-%defattr(644,root,root,755)
-%{_datadir}/tessdata/fra.*
-
-%files lang-it
-%defattr(644,root,root,755)
-%{_datadir}/tessdata/ita.*
+%attr(755,root,root) %{_bindir}/ambiguous_words
+%attr(755,root,root) %{_bindir}/classifier_tester
+%attr(755,root,root) %{_bindir}/cntraining
+%attr(755,root,root) %{_bindir}/combine_lang_model
+%attr(755,root,root) %{_bindir}/combine_tessdata
+%attr(755,root,root) %{_bindir}/dawg2wordlist
+%attr(755,root,root) %{_bindir}/lstmeval
+%attr(755,root,root) %{_bindir}/lstmtraining
+%attr(755,root,root) %{_bindir}/merge_unicharsets
+%attr(755,root,root) %{_bindir}/mftraining
+%attr(755,root,root) %{_bindir}/set_unicharset_properties
+%attr(755,root,root) %{_bindir}/shapeclustering
+%attr(755,root,root) %{_bindir}/text2image
+%attr(755,root,root) %{_bindir}/unicharset_extractor
+%attr(755,root,root) %{_bindir}/wordlist2dawg
+%{_mandir}/man1/ambiguous_words.1*
+%{_mandir}/man1/classifier_tester.1*
+%{_mandir}/man1/cntraining.1*
+%{_mandir}/man1/combine_lang_model.1*
+%{_mandir}/man1/combine_tessdata.1*
+%{_mandir}/man1/dawg2wordlist.1*
+%{_mandir}/man1/lstmeval.1*
+%{_mandir}/man1/lstmtraining.1*
+%{_mandir}/man1/merge_unicharsets.1*
+%{_mandir}/man1/mftraining.1*
+%{_mandir}/man1/set_unicharset_properties.1*
+%{_mandir}/man1/shapeclustering.1*
+%{_mandir}/man1/text2image.1*
+%{_mandir}/man1/unicharset_extractor.1*
+%{_mandir}/man1/wordlist2dawg.1*
 
-%files lang-nl
+%files devel
 %defattr(644,root,root,755)
-%{_datadir}/tessdata/nld.*
+%attr(755,root,root) %{_libdir}/libtesseract.so
+%{_includedir}/%{name}
+%{_pkgconfigdir}/tesseract.pc
+%{_mandir}/man5/unicharambigs.5*
+%{_mandir}/man5/unicharset.5*
 
-%files devel
+%files static
 %defattr(644,root,root,755)
-%dir %{_includedir}/%{name}
-%{_includedir}/%{name}/*.h
-%{_libdir}/*.a
+%{_libdir}/libtesseract.a
This page took 0.093276 seconds and 4 git commands to generate.