Skip to content

Commit

Permalink
add static_libs bcond
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalus committed Feb 29, 2024
1 parent ca4268b commit 2e9a77d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tesseract.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# - tensorflow support
#
# Conditional build:
%bcond_without openmp # OpenMP support
%bcond_with opencl # OpenCL support
%bcond_without openmp # OpenMP support
%bcond_with opencl # OpenCL support
%bcond_without static_libs # static library

Summary: Tesseract Open Source OCR Engine
Summary(pl.UTF-8): Tesseract - silnik OCR o otwartych źródłach
Expand Down Expand Up @@ -31,6 +32,7 @@ BuildRequires: libtiff-devel
BuildRequires: libtool >= 2:2
BuildRequires: libxslt-progs
BuildRequires: pango-devel >= 1:1.38.0
BuildRequires: rpmbuild(macros) >= 1.527
Requires: leptonlib >= 1.74
Suggests: tesseract-data >= 3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Expand Down Expand Up @@ -100,7 +102,8 @@ Statyczne biblioteki Tesseracta.
%configure \
%{?with_opencl:--enable-opencl} \
%{!?with_openmp:--disable-openmp} \
--disable-silent-rules
--disable-silent-rules \
%{__enable_disable static_libs static}
%{__make}
%{__make} training

Expand Down Expand Up @@ -176,6 +179,8 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/unicharambigs.5*
%{_mandir}/man5/unicharset.5*

%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libtesseract.a
%endif

0 comments on commit 2e9a77d

Please sign in to comment.