File cuneiform.spec of Package cuneiform

#
# spec file for package cuneiform (Version 1.0.0)
#
# Copyright (c) 2009, 2010 Kyrill Detinov
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

%define soname 1

Name:           cuneiform
Version:        1.0.0
Release:        0
License:        BSD License (revised)
Summary:        OCR System
Url:            https://launchpad.net/cuneiform-linux
Group:          Productivity/Graphics/Other
Source0:        %{name}-linux-%{version}.tar.bz2
Source1:        cuneiform.1
# PATCH-FIX-UPSTREAM cuneiform-1.0.0-64bit_issue.patch jpakkane@gmail.com
# -- fix 64bit-portability-issue. Fixed upstream in trunk.
Patch0:         cuneiform-1.0.0-64bit_issue.patch
BuildRequires:  cmake >= 2.6.2
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libMagick++-devel
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}%{soname}
Summary:        Cuneiform Shared Libraries
Group:          System/Libraries

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

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

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

%prep
%setup -q -n %{name}-linux-%{version}
%patch0

%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 %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

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

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

%files
%defattr(-,root,root)
%doc readme.txt issues.txt cuneiform_src/Kern/license.txt
%{_bindir}/%{name}
%{_mandir}/man1/*
%{_datadir}/%{name}/

%files -n lib%{name}%{soname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n lib%{name}-devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/*.h

%changelog
openSUSE Build Service is sponsored by