Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-updates-src > by-pkgid > d9824527879c494feb04e77fc4bef4d4 > files > 4

tesseract-4.0.0-1.1.mga7.src.rpm

%define langver	4.0.0
%define langdata() \
%package %{1}\
Version:	%{langver} \
Group:		Graphics/Utilities \
Summary:	%{2}%{?3: %3}%{?4: %4} language data for Tesseract \
Requires:	%{name} >= %{langver} \
Provides:	%{name}-language = %{langver}-%{release} \
BuildArch:	noarch \
%description %{1} \
Tesseract data files required to recognize %{2}%{?3: %3}%{?4: %4} text. \
%files %{1} \
%{_datadir}/tessdata/%{1}.* \
%{nil}

%define major		4
%define libtesseract	%mklibname %{name} %{major}
%define devtesseract	%mklibname %{name} -d

Name:		tesseract
Version:	4.0.0
%define subrel	1
Release:	%mkrel 1
Summary:	A high-performance OCR engine
URL:		https://github.com/tesseract-ocr
License:	ASL 2.0
Group:		Graphics/Utilities
Source0:	https://github.com/%{name}-ocr/%{name}/archive/%{name}-%{version}.tar.gz
Source1:	https://github.com/%{name}-ocr/tessdata/archive/tessdata-%{langver}.tar.gz
Patch1:		0001-Fix-build-rule-for-manpages.patch

BuildRequires:	asciidoc
BuildRequires:	doxygen
BuildRequires:	xsltproc
BuildRequires:	pkgconfig(libtiff-4)
BuildRequires:	pkgconfig(libjpeg)
BuildRequires:	pkgconfig(lept)
BuildRequires:	icu-devel
BuildRequires:	pkgconfig(pango)
BuildRequires:	pkgconfig(cairo)
Requires:	%{name}-language >= %{langver}
Requires:	%{name}-eng >= %{langver}

%description
The Tesseract OCR engine was one of the top 3 engines in the 1995
UNLV Accuracy test. Since then it has had little work done on it,
but it is probably one of the most accurate open source OCR engines
available. The source code will read a binary, grey or color image
and output text. A tiff reader is built in that will read
uncompressed TIFF images, or libtiff can be added to read compressed
images.

%files
%doc AUTHORS COPYING
%{_bindir}/*
%{_datadir}/tessdata
%{_mandir}/man*/*
%exclude %_datadir/tessdata/*.traineddata

#-----------------------------------------------------------------

%package -n %{libtesseract}
Summary:	%{name} support library
Group:		System/Libraries

%description -n %{libtesseract}
%{name} library.

%files -n %{libtesseract}
%_libdir/lib%{name}*.so.%{major}{,.*}

#-----------------------------------------------------------------

%package -n %{devtesseract}
Summary:	Development files from %{name}
Group:		Development/C++
Requires:	%{libtesseract} = %{version}-%{release}
Provides:	%{devtesseract} = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Obsoletes:	%{name}-devel < %{version}-%{release}
Obsoletes:	%{devtesseract} < 2.04

%description -n %{devtesseract}
The Tesseract OCR engine was one of the top 3 engines in the 1995
UNLV Accuracy test. Since then it has had little work done on it,
but it is probably one of the most accurate open source OCR engines
available. The source code will read a binary, grey or color image
and output text. A tiff reader is built in that will read
uncompressed TIFF images, or libtiff can be added to read compressed
images.

%files -n %{devtesseract}
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc

#-----------------------------------------------------------------

%package osd
Group:		Graphics/Utilities
Summary:	Orientation & script detection data pack for %{name}
Requires:	%{name} >= %{version}-%{release}

%description osd
Data files required to recognize text orintation and scripts.

%files osd
%{_datadir}/tessdata/osd.*

#-----------------------------------------------------------------

%langdata afr Afrikaans
%langdata amh Amharic
%langdata ara Arabic
%langdata asm Assamese
%langdata aze_cyrl Azerbaijani (Cyrillic)
%langdata aze Azerbauijani
%langdata bel Belarusian
%langdata ben Bengali
%langdata bod Tibetan Standard
%langdata bos Bosnian
%langdata bul Bulgarian
%langdata cat Catalan
%langdata ceb Cebuano
%langdata ces Czech
%langdata chi_sim Chinese (Simplified)
%langdata chi_tra Chinese (Traditional)
%langdata chr Cherokee
%langdata cym Welsh
%langdata dan_frak Danish (Fraktur)
%langdata dan Danish
%langdata deu_frak German (Fraktur)
%langdata deu German
%langdata dzo Dzongkha
%langdata ell Greek
%langdata eng English
%langdata enm Middle English (1100-1500)
%langdata epo Esperanto
%langdata equ Equations
%langdata est Estonian
%langdata eus Basque
%langdata fas Persian
%langdata fin Finnish
%langdata fra French
%langdata frk Frankish
%langdata frm Middle French (1400-1600)
%langdata gle Irish
%langdata glg Galician
%langdata grc Ancient Greek
%langdata guj Gujarati
%langdata hat Haitian
%langdata heb Hebrew
%langdata hin Hindi
%langdata hrv Croation
%langdata hun Hungarian
%langdata iku Inuktitut
%langdata ind Indonesian
%langdata isl Icelandic
%langdata ita_old Old Italian
%langdata ita Italian
%langdata jav Javanese
%langdata jpn Japanese
%langdata kan Kannada
%langdata kat_old Old Georgian
%langdata kat Georgian
%langdata kaz Kazakh
%langdata khm Khmer
%langdata kir Kyrgyz
%langdata kor Korean
%langdata kur Kurdish
%langdata lao Lao
%langdata lat Latin
%langdata lav Latvian
%langdata lit Lithuanian
%langdata mal Malayalam
%langdata mar Marathi
%langdata mkd Macedonian
%langdata mlt Maltese
%langdata msa Malay
%langdata mya Burmese
%langdata nep Nepali
%langdata nld Dutch
%langdata nor Norwegian
%langdata ori Oriya
%langdata pan Punjabi
%langdata pol Polish
%langdata por Portuguese
%langdata pus Pashto
%langdata ron Romanian
%langdata rus Russian
%langdata san Sanskrit
%langdata sin Sinhala
%langdata slk_frak Slovakian (Fraktur)
%langdata slk Slovakian
%langdata slv Slovenian
%langdata spa_old Old Spanish
%langdata spa Spanish
%langdata sqi Albanian
%langdata srp_latn Serbian Latin
%langdata srp Serbian
%langdata swa Swahili
%langdata swe Swedish
%langdata syr Syriac
%langdata tam Tamil
%langdata tel Telugu
%langdata tgk Tajik
%langdata tgl Tagalog
%langdata tha Thai
%langdata tir Tigrinya
%langdata tur Turkish
%langdata uig Uyghur
%langdata ukr Ukrainian
%langdata urd Urdu
%langdata uzb_cyrl Uzbek (Cyrillic)
%langdata uzb Uzbek
%langdata vie Vietnamese
%langdata yid Yiddish

%prep
%setup -q -b1
%autopatch -p1

%build
./autogen.sh
%configure2_5x --disable-static

%make_build
%make_build training

%install
%make_install
%make_install training-install

for file in ../tessdata-%{langver}/*.* ../tessdata-%{langver}/*.traineddata
do
install -m 644 -D $file %{buildroot}%{_datadir}/tessdata
done

find %{buildroot} -name '*.la' -delete


%changelog
* Mon Feb 03 2020 daviddavid <daviddavid> 4.0.0-1.1.mga7
+ Revision: 1486568
- add upstream patch to fix build rule for manpages (fixes mga#26160)

* Sat Jan 12 2019 barjac <barjac> 4.0.0-1.mga7
+ Revision: 1355534
- new version 4.0.0
- new major 4
- update files list
- new BR asciidoc

* Mon Dec 31 2018 tv <tv> 3.05.02-13.mga7
+ Revision: 1347328
- rebuild with latest icu

* Sat Aug 25 2018 daviddavid <daviddavid> 3.05.02-12.mga7
+ Revision: 1254322
- new version: 3.05.02
- osd sub-pkg requires main pkg

* Mon Aug 20 2018 tv <tv> 3.05.01-11.mga7
+ Revision: 1253099
- rebuild with latest icu

* Fri Dec 29 2017 wally <wally> 3.05.01-10.mga7
+ Revision: 1187016
- rebuild for new icu

* Tue Dec 12 2017 zezinho <zezinho> 3.05.01-9.mga7
+ Revision: 1182291
- new bugfix version 3.05.01

* Wed Mar 15 2017 mrambo3501 <mrambo3501> 3.04.01-8.mga6
+ Revision: 1092810
- Rebuild for icu-58.2

* Sat May 14 2016 shlomif <shlomif> 3.04.01-7.mga6
+ Revision: 1015251
- Rebuild for the new UCI (new major)

* Fri May 13 2016 barjac <barjac> 3.04.01-6.mga6
+ Revision: 1014894
- rebuild for icu

* Mon Feb 22 2016 barjac <barjac> 3.04.01-5.mga6
+ Revision: 976080
- fix requires

* Mon Feb 22 2016 barjac <barjac> 3.04.01-4.mga6
+ Revision: 975927
- bugfix release
- tessdata versions didnt change so bumping release

* Thu Jan 28 2016 barjac <barjac> 3.04.00-3.mga6
+ Revision: 928355
- rebuild for leptonica

* Fri Jan 01 2016 luigiwalser <luigiwalser> 3.04.00-2.mga6
+ Revision: 917925
- rebuild for icu

* Wed Oct 07 2015 barjac <barjac> 3.04.00-1.mga6
+ Revision: 887007
- new version 3.04.00
- adapted to new upstream data packaging
- patches no longer required removed

* Wed Oct 15 2014 umeabot <umeabot> 3.02.02-9.mga5
+ Revision: 747262
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 3.02.02-8.mga5
+ Revision: 689835
- Mageia 5 Mass Rebuild

* Mon Jun 30 2014 barjac <barjac> 3.02.02-7.mga5
+ Revision: 641697
- rebuild for new leptonica

* Sun Mar 09 2014 barjac <barjac> 3.02.02-6.mga5
+ Revision: 601528
- rebuild against new liblept

* Sat Oct 19 2013 umeabot <umeabot> 3.02.02-5.mga4
+ Revision: 528457
- Mageia 4 Mass Rebuild

* Wed Jun 19 2013 barjac <barjac> 3.02.02-4.mga4
+ Revision: 445079
- add require on %%{name}-eng to fix issue in comment #1 of Mga #10403

* Mon Jan 14 2013 umeabot <umeabot> 3.02.02-3.mga3
+ Revision: 384413
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
+ boklm <boklm>
- Update group: Graphics/Other -> Graphics/Utilities

* Sun Jan 06 2013 cjw <cjw> 3.02.02-2.mga3
+ Revision: 339739
- patch1: fix build with automake 1.13

* Tue Oct 30 2012 barjac <barjac> 3.02.02-1.mga3
+ Revision: 311612
- new version
- removed two patches fixed upstream
- created one new patch for format security error
- updated several language files
- removed un-needed mv and delete of tessdata files

* Thu Oct 18 2012 barjac <barjac> 3.01-2.mga3
+ Revision: 307809
- lang data files should be noarch

* Thu Oct 18 2012 barjac <barjac> 3.01-1.mga3
+ Revision: 307797
- New version
 - many new language data files
- language file handling improved thanks to Mdv
- two minor patches fixing a missing include and a format security error
- group updated to new policy
- two unneeded compiler error overrides removed

* Fri Dec 23 2011 fwang <fwang> 3.00-4.mga2
+ Revision: 186473
- rebuild for new libtiff

* Tue May 24 2011 ahmad <ahmad> 3.00-3.mga1
+ Revision: 100338
- Add the language support files for version 3.00
- Don't obsoletes the lang sub-packages
- Make the lang sub-packages noarch
- User %%configure2_5x

* Fri Apr 29 2011 dmorgan <dmorgan> 3.00-2.mga1
+ Revision: 93442
- Obsolete old packages

* Thu Apr 14 2011 tv <tv> 3.00-1.mga1
+ Revision: 85208
- new release
- sync with mdv:
  o Fix requires in the devel package
  o make it build
  o Fix file list
  o Do not package .la/.a files
  o use configure
  o Remove deprecated patches

* Fri Jan 21 2011 ahmad <ahmad> 2.04-6.mga1
+ Revision: 29545
- imported package tesseract


* Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 2.04-6mdv2011.0
+ Revision: 607988
- rebuild

* Wed Mar 17 2010 Oden Eriksson <oeriksson@mandriva.com> 2.04-5mdv2010.1
+ Revision: 524227
- rebuilt for 2010.1

* Wed Sep 16 2009 Helio Chissini de Castro <helio@mandriva.com> 2.04-4mdv2010.0
+ Revision: 443609
- Devel should requires main library

* Wed Sep 16 2009 Helio Chissini de Castro <helio@mandriva.com> 2.04-3mdv2010.0
+ Revision: 443571
- Move tesseract_full to be a shared library. This will solve all issues having with static linking and make olena and nepomuk-scribo happy.
  Hope upstream accept this patch

* Wed Sep 16 2009 Helio Chissini de Castro <helio@mandriva.com> 2.04-1mdv2010.0
+ Revision: 443344
- Create new buildsystem for tesseract based on cmake
- Fix gcc 4.3 build
- Splitted in proper way languages

  + Thierry Vignaud <tv@mandriva.org>
    - rebuild

* Thu Jun 19 2008 Funda Wang <fwang@mandriva.org> 2.03-1mdv2009.0
+ Revision: 226134
- remove java makefile
- New version 2.03
- add patch to build against gcc4.3

* Tue Jan 29 2008 Austin Acton <austin@mandriva.org> 2.01-1mdv2008.1
+ Revision: 159875
- new version
- add two new language files

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request
    - fix summary-ended-with-dot

* Sat Aug 25 2007 Austin Acton <austin@mandriva.org> 2.00-1mdv2008.0
+ Revision: 71373
- 2.00
- clean up this disgusting spec file
- fix groups, licenses
- bundle language files
- auto optflags
- simplify file lists
- simplify summaries and descriptions

  + Nicolas Lécureuil <nlecureuil@mandriva.com>
    - Add URL  thanks Austin

* Fri May 18 2007 Nicolas Lécureuil <nlecureuil@mandriva.com> 1.04-1mdv2008.0
+ Revision: 27786
- Fix Licence
- Import tesseract