Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 86b35be4eeb870d75b3da836512e24d1 > files > 4

libhocr-0.10.18-5.mga5.src.rpm

# Override default upstream location [/usr/share/doc/libhocr]
%global	hocrdocdir	%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}

%define major	0
%define libname	%mklibname hocr %{major}
%define devname	%mklibname hocr -d

Name:		libhocr
Version:	0.10.18
Release:	%mkrel 5
Summary:	A Hebrew optical character recognition library

Group:		System/Libraries
License:	GPLv3+
URL:		http://hocr.berlios.de
Source0:	http://download.berlios.de/hocr/%{name}-%{version}.tar.bz2
Patch1:		libhocr-fix-automake.patch
Patch2:		libhocr-0.10.18-linking.patch
BuildRequires:	fftw-devel
BuildRequires:	hspell-devel
BuildRequires:	libtiff-devel
BuildRequires:	desktop-file-utils
BuildRequires:	swig
BuildRequires:	python-devel
BuildRequires:	gtk2-devel
BuildRequires:	gettext

%description
LibHocr is a GNU Hebrew optical character recognition library. It scans
document images, improve the image, analyzes the page layout, recognizes
the characters and outputs the text. The output texts are now editable
text, ready for your blog, word processor or any other use.

%package -n %{devname}
Summary:	Development files for %{name}
Group:		System/Libraries
Requires:	%{libname} = %{version}-%{release}
Obsoletes:	%{name}-devel < 0.10.18-2
Provides:	%{name}-devel = %{version}-%{release}
Provides:	hocr-devel = %{version}-%{release}

%description -n %{devname}
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package -n %{libname}
Summary:	A Hebrew optical character recognition library
Group:		System/Libraries
Conflicts:	%{name} < 0.10.18-2

%description -n %{libname}
LibHocr is a GNU Hebrew optical character recognition library. It scans
document images, improve the image, analyzes the page layout, recognizes
the characters and outputs the text. The output texts are now editable
text, ready for your blog, word processor or any other use.

%package        gtk
Summary:	GTK+ application for %{name}
Group:		Graphics/Scanning
Requires:	%{name} = %{version}-%{release}
Requires:	python-imaging-sane
Requires:	pygtk2.0-libglade
Requires:	python(hocr) = %{version}-%{release}
# We use gtktextbuffer which uses gtkspell which have a runtime
# check of the spellcheck backends... so here it is:
Requires:	hspell

%description    gtk
The %{name}-gtk package contains a GUI application that uses %{name}.

%package        python
Summary:	Python bindings for %{name}
Group:		Development/Python
Requires:	%{name} = %{version}-%{release}
Requires:	python > 2.5
Provides:	python(hocr) = %{version}-%{release}

%description    python
The %{name}-python package contains python binding for %{name}.

%prep
%setup -q
%patch1 -p1 -b .FIX_AUTOMAKE_foo
%patch2 -p1 -b .linking

%build
autoreconf -vfi
export CFLAGS="%optflags -Werror-implicit-function-declaration"
%configure2_5x \
	--disable-static
make

%install
%makeinstall_std \
	hocrdocdir=%{hocrdocdir}	\
	examples_binding_dir=%{hocrdocdir}/examples/bindings

# we don't want these
find %{buildroot} -name '*.la' -delete
rm -f %{buildroot}/%{hocrdocdir}/NEWS		# Empty, not usefull.
rm -f %{buildroot}/%{hocrdocdir}/INSTALL	# Not needed anymore ;-)

# "fix" icons
for i in 48 128; do
	install -Dpm644 ./examples/hocr-gtk/hocr1-${i}.png \
		%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/hocr.png
done
rm -rf %{buildroot}%{_datadir}/pixmaps/

desktop-file-install \
	--add-category="Graphics"		\
	--set-icon="hocr"			\
	--delete-original			\
	--dir=%{buildroot}%{_datadir}/applications	\
	%{buildroot}/%{_datadir}/applications/hocr-gtk.desktop	\
	%{buildroot}/%{_datadir}/applications/sane-pygtk.desktop

%find_lang hocr-gtk
%find_lang sane-pygtk

cat hocr-gtk.lang sane-pygtk.lang > %{name}.lang

%files
%doc %dir %{hocrdocdir}
%doc %{hocrdocdir}/AUTHORS
%doc %{hocrdocdir}/COPYING
%doc %{hocrdocdir}/ChangeLog
%doc %{hocrdocdir}/HACKING
%doc %{hocrdocdir}/README
%{_bindir}/hocr
%{_mandir}/man1/*.1*

%files -n %{libname}
%{_libdir}/%{name}*.so.%{major}
%{_libdir}/%{name}*.so.%{major}.*

%files -n %{devname}
%doc %{hocrdocdir}/examples
%doc %{_mandir}/man3/*.3*
%{_includedir}/%{name}/
%{_libdir}/%{name}*.so
%{_libdir}/pkgconfig/%{name}*.pc

%files gtk -f %{name}.lang
%{_bindir}/hocr-gtk
%{_bindir}/sane-pygtk
%{_datadir}/applications/*.desktop
%{_datadir}/hocr-gtk
%{_datadir}/icons/hicolor/*/apps/hocr.png
%{_datadir}/sane-pygtk

%files python
# For noarch packages: sitelib
%{python_sitelib}/*.py*

# For arch-specific packages: sitearch
%{python_sitearch}/_hocr.so


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 0.10.18-5.mga5
+ Revision: 746380
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.10.18-4.mga5
+ Revision: 726719
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0.10.18-3.mga5
+ Revision: 681523
- Mageia 5 Mass Rebuild

* Sun Jul 06 2014 wally <wally> 0.10.18-2.mga5
+ Revision: 644198
- fix icon name and locations
- fix libification
- disable static build

  + pterjan <pterjan>
    - Rebuild for new Python

* Tue Feb 04 2014 shlomif <shlomif> 0.10.18-1.mga5
+ Revision: 580635
- Update the Groups to Mageia
- Fix a requires
- Importing based on the Fedora package


* Thu Jan 09 2014 Shlomi Fish <shlomif@cpan.org> - 0.10.18-1.mga4
- Adapted to Mageia.

* Fri Jul 26 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.10.17-15
- Install docs to %%{_pkgdocdir} where available.

* Thu Apr 25 2013 Jon Ciesla <limburgher@gmail.com> - 0.10.17-14
- Drop desktop vendor tag.

* Sun Mar 24 2013 Oron Peled <oron@actcom.co.il> - 0.10.17-13
- Upstream use very old autoconf, breaks aarm64 builds
  so we use autoreconf to update configure

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.10.17-9
- Rebuild for new libpng

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.10.17-7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Mon Jun  7 2010 Oron Peled <oron@actcom.co.il> - 0.10.17-6
- Fix fedora bugs #574259, #577657, #574631
- Applied a local patch, since upstream did not issued any release
  since Mar-2010, despite several bug reports (some with fixes).
  I'll send this fix upstream for inclusion (one can always hope ;-)

* Thu Feb 18 2010 Oron Peled <oron@actcom.co.il> - 0.10.17-5
- Fix fedora bug 565233 -- Added python(hocr) as provides to
  libhocr-python and as requires to libhocr-gtk

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.17-2
- Rebuild for Python 2.6

* Sat Aug 16 2008 Oron Peled <oron@actcom.co.il> 0.10.17-1
- New upstream version (See installed ChangeLog)
- Our patches merged upstream. Only a single patch needed
  to build.

* Thu Aug 14 2008 Oron Peled <oron@actcom.co.il> 0.10.13-3
- More packaging fixes
- Patches for upstream: some compile warning cleanup and .desktop files fixes.

* Sun Aug  3 2008 Oron Peled <oron@actcom.co.il> 0.10.13-2
- Packaging fixes
- Two new patches against upstream

* Tue Jul 22 2008 Oron Peled <oron@actcom.co.il> 0.10.13-1
- New upstream version (see ChangeLog)
- All patches merged upstream.

* Mon Jul 21 2008 Oron Peled <oron@actcom.co.il> 0.10.11-2
- Fix python install directories (on x86_64).


* Mon Jul 14 2008 Oron Peled <oron@actcom.co.il> 0.10.11-1
- initial release