File cuneiform.spec of Package cuneiform
#
# spec file for package cuneiform
#
# Copyright (c) 2012 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
%define major 1
Name: cuneiform
Version: 1.1.0
Release: 0
License: BSD-3-Clause
Summary: OCR System
Url: http://launchpad.net/cuneiform-linux
Group: Productivity/Graphics/Other
Source0: http://launchpad.net/cuneiform-linux/1.1/1.1/+download/%{name}-linux-%{version}.tar.bz2
Source1: cuneiform.1
# PATCH-FIX-OPENSUSE cuneiform-no_current_date.patch lazy.kent@opensuse.org -- remove the current date, this may cause the package to rebuild in excess
Patch0: cuneiform-no_current_date.patch
# PATCH-FIX-UPSTREAM cuneiform-size4to5.patch rh#836706 -- fix crashes
Patch1: cuneiform-size4to5.patch
# PATCH-FIX-UPSTREAM cuneiform-linux-1.1.0-emdash.patch lp#324256 -- recognize emdash correctly
Patch2: cuneiform-linux-1.1.0-emdash.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig(Magick++)
Provides: ocr-engine
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Conflicts: cuneiform-multilang
%description
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 libcuneiform%{major}
Summary: Cuneiform Shared Libraries
Group: System/Libraries
%description -n libcuneiform%{major}
Shared libraries for the package cuneiform.
%package -n libcuneiform-devel
Summary: Development Files for Cuneiform
Group: Development/Libraries/C and C++
Requires: libcuneiform%{major} = %{version}
%description -n libcuneiform-devel
Development files for the package cuneiform.
%prep
%setup -q -n %{name}-linux-%{version}
%patch0
%patch1 -p1
%patch2 -p1
%build
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=relwithdebinfo
make %{?_smp_mflags}
%install
pushd build
%make_install
popd
install -Dm 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1
%fdupes -s %{buildroot}%{_datadir}/
%post -n libcuneiform%{major} -p /sbin/ldconfig
%postun -n libcuneiform%{major} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc readme.txt issues.txt cuneiform_src/Kern/license.txt
%{_bindir}/%{name}
%{_datadir}/%{name}/
%doc %{_mandir}/man?/*
%files -n libcuneiform%{major}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files -n libcuneiform-devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/*.h
%changelog