%global srcname gamera Name: python-%{srcname} Version: 3.4.3 Release: 7%{?dist} Summary: Gamera is a framework for building document analysis applications # Compiled code (C++) is LGPLv2+ and GPLv2+ and MIT and interpreted code (Python) is GPLv2+. CC-BY-SA is only for documentation subpackage that hasn't built yet. License: GPLv2+ and GPLv2 and MIT and CC-BY-SA URL: http://gamera.informatik.hsnr.de Source0: https://github.com/hsnr-gamera/%{srcname}/releases/download/%{version}/%{srcname}-%{version}.tar.gz Source1: %{name}.desktop BuildRequires: python2-devel BuildRequires: wxPython BuildRequires: gcc BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: zlib-devel BuildRequires: desktop-file-utils Provides: bundled(vigra) = 1.6.0 Provides: bundled(eo) = 1.3.1 Provides: gamera = %{version}-%{release} Provides: gamera%{?_isa} = %{version}-%{release} %description Gamera is a framework for building document analysis applications. It is not a packaged document recognition system, but a toolkit for building document image recognition systems. %package -n python2-%{srcname} License: GPLv2 and GPLv2+ and MIT Summary: %{summary} Requires: wxPython %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Gamera is a framework for building document analysis applications. It is not a packaged document recognition system, but a toolkit for building document image recognition systems. %package -n python2-%{srcname}-devel License: GPLv2 and GPLv2+ and MIT Summary: Development package for Gamera Requires: %{name}%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python2-%{srcname}-devel} %description -n python2-%{srcname}-devel Development package for gamera. Allows you to develop your apps on top of the gamera framework. %prep %autosetup -n %{srcname}-%{version} # README and deformations.hpp are obviously not supposed to be executed chmod -x README chmod -x include/plugins/deformations.hpp # Remove useless library folders rm -rf include/zlib-1.2.8 rm -rf src/libpng-1.2.5 rm -rf src/libtiff rm -rf src/zlib-1.2.8 %build %py2_build %install %py2_install desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE1} # Remove useless shebang of a non executable python file head -n 1 %{buildroot}/%{python2_sitearch}/%{srcname}/gendoc.py | grep '#!/usr/' && sed -i '1d' %{buildroot}/%{python2_sitearch}/%{srcname}/gendoc.py # Only for Windows installation rm -f %{buildroot}/%{_bindir}/gamera_post_install.py %files -n python2-%{srcname} %license LICENSE %doc README %{_datadir}/applications/%{name}.desktop %{_bindir}/gamera_gui %{python2_sitearch}/%{srcname} %{python2_sitearch}/%{srcname}-%{version}-py?.?.egg-info %files -n python2-%{srcname}-devel %{_includedir}/python%{python2_version}/%{srcname}/ %{python2_sitelib}/%{srcname} %changelog * Fri Aug 25 2017 Vincent Saulnier - 3.4.3-7 - Add explanation about the licences breakdown * Thu Jul 20 2017 Vincent Saulnier - 3.4.3-6 - Add wxPython - Fix license - Add two provides because the package can be considered as an application * Tue May 9 2017 Vincent Saulnier - 3.4.3-5 - Remove useless library folder in sources - Remove execution bit removal on header file - Add some required libraries - Add missing macro on devel package to provide the python namespace * Tue Apr 4 2017 Vincent Saulnier - 3.4.3-4 - Remove useless line in description - Modify Python2 subpackage - Correction of summary macro writing - Add comment about execution bit removal on README * Sun Mar 19 2017 Vincent Saulnier - 3.4.3-3 - Remove sum variable - Add python2 subpackage - Change of url - Add comments - Modify devel package description * Wed Mar 15 2017 Vincent Saulnier - 3.4.3-2 - Remove useless comments - Add python version macro - Changes about bindir and sitearch and permissions on README - Remove post_install file and defattr - Remove headbang in gendoc.py file * Wed Mar 8 2017 Vincent Saulnier - 3.4.3-1 - New release by upstream - GCC7 supported - Add desktop file - Add devel package - Modify macro name in changelog * Fri Mar 3 2017 Vincent Saulnier - 3.4.2-2 - Remove macros on top of Spec file - Use macros on URLs - Substitution of macro name: __python2 setup.py build by macro name: py2_build - Replacement BuildRequires libpng by libpng-devel and libtiff by libtiff-devel - Remove rm -rf macro name: buildroot/ macro name: python2_sitelib - Add macro name: python2_sitelib/* * Mon Feb 27 2017 Vincent Saulnier - 3.4.2-1 - Initial Spec file