File cuneiform.spec of Package cuneiform

# spec file for package cuneiform
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define major   1
Name:           cuneiform
Version:        1.1.0
Release:        0
Summary:        OCR System
License:        BSD-3-Clause
Group:          Productivity/Graphics/Other
Source1:        cuneiform.1
Patch0:         cuneiform-1.1.0-c-assert.patch
Patch1:         cuneiform-1.1.0-fix_buffer_overflow.patch
Patch2:         cuneiform-1.1.0-fix_buffer_overflow_2.patch
Patch3:         cuneiform-1.1.0-gcc6.patch
Patch4:         cuneiform-1.1.0-gcc7.patch
Patch6:         cuneiform-1.1.0-libm.patch
Patch7:         cuneiform-1.1.0-strings.patch
Patch8:         cuneiform-1.1.0-typos.patch
Patch9:         cuneiform-brp.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libMagick++-devel
Conflicts:      cuneiform-multilang
Provides:       ocr-engine
ExclusiveArch:  %{ix86} x86_64

Cuneiform is an multi-language OCR system originally developed and open
sourced by Cognitive Technologies. Cuneiform was originally a Windows
program, which was ported to Linux by Jussi Pakkanen.
Supported languages: eng ger fra rus swe spa ita ruseng ukr srp hrv pol
dan por dut cze rum hun bul slo lav lit est tur.

%package -n lib%{name}%{major}
Summary:        Cuneiform Shared Libraries
Group:          System/Libraries

%description -n lib%{name}%{major}
Shared libraries for the package cuneiform.

%package -n lib%{name}-devel
Summary:        Development Files for Cuneiform
Group:          Development/Libraries/C and C++
Requires:       libcuneiform%{major} = %{version}

%description -n lib%{name}-devel
Development files for the package cuneiform.

%setup -q -n %{name}-linux-%{version}
%autopatch -p1

export CXXFLAGS="%{optflags} -Wno-stringop-overflow"
export CFLAGS="%{optflags} -Wno-stringop-overflow"
%cmake \

install -Dpm 0644 %{SOURCE1} \
%fdupes %{buildroot}%{_datadir}

export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

%post -n lib%{name}%{major} -p /sbin/ldconfig
%postun -n lib%{name}%{major} -p /sbin/ldconfig

%doc readme.txt issues.txt cuneiform_src/Kern/license.txt

%files -n lib%{name}%{major}

%files -n lib%{name}-devel

openSUSE Build Service is sponsored by