]> git.pld-linux.org Git - packages/tesseract.git/blob - tesseract.spec
- icu-57.1 rebuild
[packages/tesseract.git] / tesseract.spec
1 # TODO:
2 # - warnings at compile stage about pointer size on amd64 - needs check
3 #
4 # Conditional build:
5 %bcond_without  openmp  # OpenMP support
6 %bcond_with     opencl  # OpenCL support
7 #
8 Summary:        Tesseract Open Source OCR Engine
9 Summary(pl.UTF-8):      Tesseract - silnik OCR o otwartych źródłach
10 Name:           tesseract
11 Version:        3.04.01
12 Release:        2
13 License:        Apache v2.0
14 Group:          Applications/Graphics
15 Source0:        https://github.com/tesseract-ocr/tesseract/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  645a21effcf2825a3473849d72a7fd90
17 Patch0:         %{name}-opencl.patch
18 URL:            https://github.com/tesseract-ocr/
19 %{?with_opencl:BuildRequires:   OpenCL-devel}
20 BuildRequires:  autoconf >= 2.50
21 BuildRequires:  automake
22 BuildRequires:  cairo-devel
23 BuildRequires:  leptonlib-devel >= 1.71
24 %{?with_openmp:BuildRequires:   libgomp-devel}
25 BuildRequires:  libicu-devel
26 BuildRequires:  libstdc++-devel >= 6:4.7
27 BuildRequires:  libtiff-devel
28 BuildRequires:  libtool >= 2:2
29 BuildRequires:  pango-devel
30 Suggests:       tesseract-data >= 3
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 A commercial quality OCR engine originally developed at HP between
35 1985 and 1995. In 1995, this engine was among the top 3 evaluated by
36 UNLV. It was open-sourced by HP and UNLV in 2005.
37
38 %description -l pl.UTF-8
39 Silnik OCR o komercyjnej jakości oryginalnie stworzony przez HP w
40 latach 1985-1995. W 1995 roku był jednym z 3 najlepszych wg UNLV.
41 Źródła zostały uwolnione przez HP i UNLV w 2005 roku.
42
43 %package training
44 Summary:        Tesseract training tools
45 Summary(pl.UTF-8):      Narzędzia treningowe Tesseracta
46 Group:          Applications/Graphics
47 Requires:       %{name} = %{version}
48
49 %description training
50 This package contains the Tesseract training tools.
51
52 %description training -l pl.UTF-8
53 Ten pakiet zawiera programy do trenowania Tesseracta.
54
55 %package devel
56 Summary:        Header files for Tesseract libraries
57 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Tesseracta
58 Group:          Development/Libraries
59 Requires:       %{name} = %{version}-%{release}
60 Requires:       leptonlib-devel
61 Requires:       libstdc++-devel
62
63 %description devel
64 This package contains the development header files necessary to
65 develop applications using Tesseract API.
66
67 %description devel -l pl.UTF-8
68 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów
69 wykorzystujących API Tesseracta.
70
71 %package static
72 Summary:        Static Tesseract libraries
73 Summary(pl.UTF-8):      Statyczne biblioteki Tesseracta
74 Group:          Development/Libraries
75 Requires:       %{name}-devel = %{version}-%{release}
76
77 %description static
78 Static Tesseract libraries.
79
80 %description static -l pl.UTF-8
81 Statyczne biblioteki Tesseracta.
82
83 %prep
84 %setup -q
85 %patch0 -p1
86
87 %build
88 %{__libtoolize}
89 %{__aclocal}
90 %{__autoconf}
91 %{__autoheader}
92 %{__automake}
93 %configure \
94         %{?with_opencl:--enable-opencl} \
95         %{!?with_openmp:--disable-openmp}
96 %{__make}
97 %{__make} training
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101
102 %{__make} install \
103         DESTDIR=$RPM_BUILD_ROOT
104
105 %{__make} training-install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtesseract.la
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %post   -p /sbin/ldconfig
114 %postun -p /sbin/ldconfig
115
116 %files
117 %defattr(644,root,root,755)
118 %doc AUTHORS COPYING ChangeLog README.md ReleaseNotes
119 %attr(755,root,root) %{_bindir}/tesseract
120 %attr(755,root,root) %{_libdir}/libtesseract.so.*.*.*
121 %attr(755,root,root) %ghost %{_libdir}/libtesseract.so.3
122 %{_datadir}/tessdata
123 %{_mandir}/man1/tesseract.1*
124
125 %files training
126 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_bindir}/ambiguous_words
128 %attr(755,root,root) %{_bindir}/classifier_tester
129 %attr(755,root,root) %{_bindir}/cntraining
130 %attr(755,root,root) %{_bindir}/combine_tessdata
131 %attr(755,root,root) %{_bindir}/dawg2wordlist
132 %attr(755,root,root) %{_bindir}/mftraining
133 %attr(755,root,root) %{_bindir}/set_unicharset_properties
134 %attr(755,root,root) %{_bindir}/shapeclustering
135 %attr(755,root,root) %{_bindir}/text2image
136 %attr(755,root,root) %{_bindir}/unicharset_extractor
137 %attr(755,root,root) %{_bindir}/wordlist2dawg
138 %{_mandir}/man1/ambiguous_words.1*
139 %{_mandir}/man1/cntraining.1*
140 %{_mandir}/man1/combine_tessdata.1*
141 %{_mandir}/man1/dawg2wordlist.1*
142 %{_mandir}/man1/mftraining.1*
143 %{_mandir}/man1/shapeclustering.1*
144 %{_mandir}/man1/unicharset_extractor.1*
145 %{_mandir}/man1/wordlist2dawg.1*
146
147 %files devel
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/libtesseract.so
150 %{_includedir}/%{name}
151 %{_pkgconfigdir}/tesseract.pc
152 %{_mandir}/man5/unicharambigs.5*
153 %{_mandir}/man5/unicharset.5*
154
155 %files static
156 %defattr(644,root,root,755)
157 %{_libdir}/libtesseract.a
This page took 0.077598 seconds and 4 git commands to generate.