Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > a7d6e104e46081dd180f0f4d96740752 > files > 3

gocr-0.3.6-1mdk.src.rpm

%define name	gocr
%define version	0.3.6
%define release	1mdk

%define _xprefix	/usr/X11R6
%define _xbindir	%{_xprefix}/bin

Summary:		Gocr is an OCR (Optical Character Recognition) program.
Name:			%{name}
Version:		%{version}
Release:		%{release}
URL:			http://altmark.nat.uni-magdeburg.de/~jschulen/ocr/
License:		GPL
Group:			Graphics
Source0:		http://prdownloads.sourceforge.net/jocr/%{name}-%{version}.tar.bz2
Source1:		%{name}-icons.tar.bz2
BuildRequires:  libnetpbm1-devel
BuildRequires:  gtk+-devel >= 1.2.8
BuildRequires:  tetex-latex
BuildRequires:  tetex-dvips
BuildRoot:		%{_tmppath}/%{name}-buildroot

%description
GOCR is an optical character recognition program, released under the
GNU General Public License. It reads images in many formats (pnm, pbm,
pgm, ppm, some pcx and tga image files (or PNM from stdin); if
pnm-tools installed and running linux-like system you can also use
pnm.gz, pnm.bz2, png, jpg, tiff, gif, bmp and others) and outputs
a text file.


%package -n %{name}-devel
Summary:	Development tools for gocr.
Group:		Development/C

%description -n %{name}-devel
GOCR is an optical character recognition program, released under the
GNU General Public License. It reads images in many formats (pnm, pbm,
pgm, ppm, some pcx and tga image files (or PNM from stdin); if
pnm-tools installed and running linux-like system you can also use
pnm.gz, pnm.bz2, png, jpg, tiff, gif, bmp and others) and outputs
a text file.

If you want to develop programs which will manipulate gocr, you should 
install gocr-devel.  You'll also need to install the gocr package.


%package -n %{name}-gtk
Summary:	Gtk+ frontend for gocr
Group: 		Graphics
Requires:	%{name} = %{version}
BuildRequires:  libgtk+1.2-devel 

%description -n %{name}-gtk
GOCR is an optical character recognition program, released under the
GNU General Public License. It reads images in many formats (pnm, pbm,
pgm, ppm, some pcx and tga image files (or PNM from stdin); if
pnm-tools installed and running linux-like system you can also use
pnm.gz, pnm.bz2, png, jpg, tiff, gif, bmp and others) and outputs
a text file.

Gtk+-based frontend for gocr.

%prep
%setup -q

%build
%configure 
%make

cd frontend/gnome
rm config.cache
%configure --prefix=%{_xprefix} --bindir=%{_xbindir}
%make 

%install
%makeinstall_std
ln -sf gnome/mkinstalldirs frontend/mkinstalldirs
make -C frontend/gnome install DESTDIR=%buildroot

# Menu
mkdir -p %{buildroot}/{%{_miconsdir},%{_liconsdir},%{_menudir}}
bzcat %{SOURCE1}|tar xf - -C %buildroot/%{_datadir}

cat > %buildroot/%{_menudir}/%{name}-gtk << EOF
?package(%{name}-gtk):\
command="%{_xbindir}/gtk-ocr"\
needs="X11"\
icon="%{name}.png"\
section="Multimedia/Graphics"\
title="Gtk-ocr"\
longtitle="Gtk-ocr is a gtk frontend for gocr"
EOF

%post -n %name-gtk
%{update_menus}
   
%postun -n %name-gtk
%{clean_menus}
   
%clean
rm -rf %buildroot

%files -n %{name}
%defattr(-, root, root)
%doc AUTHORS BUGS CREDITS HISTORY README REMARK.txt REVIEW TODO
%doc doc/{examples.txt,ocr.ps,unicode.txt}
%{_mandir}/man1/*
%attr(755,root,root) %{_bindir}/*

%files -n %{name}-devel
%defattr(-, root, root)
%doc AUTHORS
%{_libdir}/libPgm2asc.a
%{_includedir}/gocr.h

%files -n %{name}-gtk
%defattr(-, root, root)
%doc frontend/gnome/{AUTHORS,README,TODO}
%{_menudir}/*
%{_iconsdir}/*
%attr(755,root,root) %{_xbindir}/*

%changelog
* Sun May 12 2002 Laurent MONTEL <lmontel@mandrakesoft.com> 0.3.6-1mdk
- Update code 0.3.6

* Sat Feb 16 2002 Yves Duret <yduret@mandrakesoft.com> 0.3.5-1mdk
- version 0.3.5
- remove patch{0,1} merged upstream
- png icons

* Sat Nov 03 2001 Marcel Pol <mpol@gmx.net> 0.3.4-1mdk
- updated to version 0.3.4
- rm frontends/gnome/config.cache

* Fri Aug 31 2001 Yves Duret <yduret@mandrakesoft.com> 0.3.2-4mdk
- rebuild with new netpbm (instead of libgr)

* Fri Jul 27 2001 Yves Duret <yduret@mandrakesoft.com> 0.3.2-3mdk
- complety rewrite spec file : it should now work..
  ¤ gocr-frontends renamed gocr-gtk
  ¤ removed tcl/tk frontend
  ¤ added pach0 and patch1
  ¤ polnak powered (PLD)

* Thu Jul 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3.2-2mdk
- rebuild

* Tue Jun 05 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3.2-1mdk
- updated by Marcel Pol <mpol@gmx.net> :
	- Version 0.3.2

* Thu Apr 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3.1-3mdk
- added in contribs by Marcel Pol <mpol@gmx.net> :
	- Added menu entry for gtk-ocr

* Tue Mar 20 2001 Marcel Pol <mpol@gmx.net> 0.3.1-2mdk
- Added Requires libgr1 libgtk+
- Added BuildRequires libgr1-devel libgtk+1.2-devel
- Added Provides
- Added files gocr.tcl and gtk-ocr
- Split package into gocr, gocr-devel and gocr-frontends

* Mon Mar 19 2001 Marcel Pol <mpol@gmx.net> 0.3.1-1mdk
- Built release 0.3.1