Blob Blame History Raw
Summary: An Optical Character Recognition program
Name: ocrad
Version: 0.17
Release: 3%{?dist}
License: GPLv3+
Group: Applications/Multimedia
Source: ftp://ftp.gnu.org/gnu/ocrad/%{name}-%{version}.tar.bz2
Patch0: ocrad-0.17-gcc43.patch
URL: http://www.gnu.org/software/ocrad/ocrad.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description
GNU Ocrad is an OCR (Optical Character Recognition) program based on a feature
extraction method. It reads images in pbm (bitmap), pgm (greyscale) or ppm
(color) formats and produces text in byte (8-bit) or UTF-8 formats.
Also includes a layout analyser able to separate the columns or blocks of text
normally found on printed pages.
Ocrad can be used as a stand-alone console application, or as a backend to
other programs.

%prep
%setup -q
%patch0 -p1 -b .gcc43

%build
%configure
make CXXFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
install -p doc/ocrad.1 ${RPM_BUILD_ROOT}%{_mandir}/man1
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info %{_infodir}/ocrad.info.gz %{_infodir}/dir || :

%preun
if [ $1 = 0 ]; then
	/sbin/install-info --delete %{_infodir}/ocrad.info.gz %{_infodir}/dir || :
fi

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/ocrad
%attr(0644,root,root) %{_mandir}/man1/*
%attr(0644,root,root) %{_infodir}/ocrad.info.gz

%changelog
* Mon Mar 03 2008 Tomas Smetana <tsmetana@redhat.com> 0.17-3
- remove unpackaged file

* Fri Feb 29 2008 Tomas Smetana <tsmetana@redhat.com> 0.17-2
- fix spec file
- fix compilation issues with gcc-4.3

* Fri Feb 29 2008 Tomas Smetana <tsmetana@redhat.com> 0.17-1
- Spec file created