]> git.pld-linux.org Git - packages/tesseract.git/blobdiff - tesseract.spec
- up to 4.0.0-beta.4
[packages/tesseract.git] / tesseract.spec
index 89a1e144f57c73c552c292a9129028fe0daa3587..614a83aa701f6c329de64983fea8bfdce56f50b6 100644 (file)
@@ -1,22 +1,34 @@
 # TODO:
 # - warnings at compile stage about pointer size on amd64 - needs check
+#
+# 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
+%define        _beta   beta.4
 Name:          tesseract
-Version:       3.02.02
-Release:       3
+Version:       4.0.0
+Release:       0.%{_beta}.1
 License:       Apache v2.0
 Group:         Applications/Graphics
-#Source0Download: http://code.google.com/p/tesseract-ocr/downloads/list
-Source0:       http://tesseract-ocr.googlecode.com/files/%{name}-ocr-%{version}.tar.gz
-# Source0-md5: 26adc8154f0e815053816825dde246e6
-Patch0:                format-security.patch
-URL:           http://code.google.com/p/tesseract-ocr/
-BuildRequires: autoconf >= 2.50
+#Source0Download: https://github.com/tesseract-ocr/tesseract/releases
+Source0:       https://github.com/tesseract-ocr/tesseract/archive/%{version}-%{_beta}/%{name}-%{version}-%{_beta}.tar.gz
+# Source0-md5: 9984be13fd64872fb236a60475f5fec6
+Patch0:                %{name}-opencl.patch
+URL:           https://github.com/tesseract-ocr/
+%{?with_opencl:BuildRequires:  OpenCL-devel}
+BuildRequires: autoconf >= 2.59
 BuildRequires: automake
-BuildRequires: leptonlib-devel
-BuildRequires: libstdc++-devel
-BuildRequires: libtool
+BuildRequires: cairo-devel
+BuildRequires: leptonlib-devel >= 1.74
+%{?with_openmp:BuildRequires:  libgomp-devel}
+BuildRequires: libicu-devel
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libtiff-devel
+BuildRequires: libtool >= 2:2
+BuildRequires: pango-devel
 Suggests:      tesseract-data >= 3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -30,10 +42,22 @@ 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 training
+Summary:       Tesseract training tools
+Summary(pl.UTF-8):     Narzędzia treningowe Tesseracta
+Group:         Applications/Graphics
+Requires:      %{name} = %{version}
+
+%description training
+This package contains the Tesseract training tools.
+
+%description training -l pl.UTF-8
+Ten pakiet zawiera programy do trenowania Tesseracta.
+
 %package devel
 Summary:       Header files for Tesseract libraries
 Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek Tesseracta
-Group:          Development/Libraries
+Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      leptonlib-devel
 Requires:      libstdc++-devel
@@ -49,7 +73,7 @@ wykorzystujących API Tesseracta.
 %package static
 Summary:       Static Tesseract libraries
 Summary(pl.UTF-8):     Statyczne biblioteki Tesseracta
-Group:          Development/Libraries
+Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
@@ -59,8 +83,8 @@ Static Tesseract libraries.
 Statyczne biblioteki Tesseracta.
 
 %prep
-%setup -q -n %{name}-ocr
-%patch0 -p1
+%setup -q -n %{name}-%{version}-%{_beta}
+#%patch0 -p1
 
 %build
 %{__libtoolize}
@@ -68,8 +92,11 @@ Statyczne biblioteki Tesseracta.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+       %{?with_opencl:--enable-opencl} \
+       %{!?with_openmp:--disable-openmp}
 %{__make}
+%{__make} training
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -77,8 +104,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-# test program?
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/classifier_tester
+%{__make} training-install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -87,37 +117,49 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README ReleaseNotes
+%doc AUTHORS COPYING ChangeLog README.md
+%attr(755,root,root) %{_bindir}/tesseract
+%attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtesseract.so.4
+%{_datadir}/tessdata
+%{_mandir}/man1/tesseract.1*
+
+%files training
+%defattr(644,root,root,755)
 %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}/tesseract
+%attr(755,root,root) %{_bindir}/text2image
 %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.3
-%dir %{_datadir}/tessdata
-%dir %{_datadir}/tessdata/configs
-%{_datadir}/tessdata/configs/*
-%dir %{_datadir}/tessdata/tessconfigs
-%{_datadir}/tessdata/tessconfigs/*
 %{_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/tesseract.1*
+%{_mandir}/man1/text2image.1*
 %{_mandir}/man1/unicharset_extractor.1*
 %{_mandir}/man1/wordlist2dawg.1*
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtesseract.so
-%{_libdir}/libtesseract.la
 %{_includedir}/%{name}
 %{_pkgconfigdir}/tesseract.pc
 %{_mandir}/man5/unicharambigs.5*
This page took 0.034859 seconds and 4 git commands to generate.