File gocr.spec of Package gocr
#
# spec file for package gocr
#
# 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/
#
# norootforbuild
Name: gocr
Version: 0.49
Release: 1
Summary: Optical Character Recognition Program
License: GPLv2+
Url: http://jocr.sourceforge.net/
Group: Productivity/Graphics/Other
Source0: %{name}-%{version}.tar.bz2
Source1: gocr.desktop
# PATCH-FIX-OPENSUSE no-build-date.patch asterios.dramis@gmail.com -- Fix rpmlint warning "file-contains-current-date" (/usr/bin/gocr)
Patch0: no-build-date.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libnetpbm-devel
BuildRequires: transfig
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
Requires: jpeg
Requires: netpbm
Requires: transfig
%description
GOCR is an optical character recognition program. It reads images in
many formats and outputs a text file. It is also able to recognize
and translate barcodes.
%package gui
License: GPLv2+
Summary: Optical Character Recognition Program - Basic Graphical Interface
Group: Productivity/Graphics/Other
Requires: tk
Requires: %{name} = %{version}
Supplements: packageand(gocr:tk)
%description gui
GOCR is an optical character recognition program. It reads images in
many formats and outputs a text file. It is also able to recognize
and translate barcodes.
This package contains a basic graphical interface for GOCR.
%prep
%setup -q
%patch0
rm -rf */CVS
rm examples/.#Makefile.1.22
%build
%configure
make %{?_smp_mflags}
make %{?_smp_mflags} examples
make %{?_smp_mflags} doc
%install
%make_install
test -x %{buildroot}%{_mandir}/man1/gocr.1 && chmod a-x %{buildroot}%{_mandir}/man1/gocr.1
# Fix doc files path
perl -pi -e "s|/usr/share/doc/gocr-\\\fBX.XX\\\fR/|/usr/share/doc/packages/gocr/|" %{buildroot}%{_mandir}/man1/gocr.1
%if 0%{?suse_version}
%suse_update_desktop_file -i %{name} Graphics OCR
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc AUTHORS BUGS CREDITS HISTORY README TODO gpl.html
%doc doc/examples.txt
%doc doc/gocr.html
%doc doc/unicode.txt
%doc examples/
%doc %{_mandir}/man?/gocr.*
%{_bindir}/gocr
%files gui
%defattr(-,root,root,-)
%{_bindir}/gocr.tcl
%{_datadir}/applications/gocr.desktop
%changelog