File cuneiform.spec of Package cuneiform
#
# spec file for package cuneiform
#
# Copyright (c) 2011 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
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libMagick++-devel
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 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.
%prep
%setup -q -n %{name}-linux-%{version}
%build
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=relwithdebinfo
make %{?_smp_mflags}
%install
pushd build
%makeinstall
popd
install -Dm 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1
%fdupes %{buildroot}%{_datadir}
%post -n lib%{name}%{major} -p /sbin/ldconfig
%postun -n lib%{name}%{major} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc readme.txt issues.txt cuneiform_src/Kern/license.txt
%{_datadir}/%{name}
%{_bindir}/%{name}
%doc %{_mandir}/man?/*
%files -n lib%{name}%{major}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files -n lib%{name}-devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/*.h
%changelog