%global pkgname cagraph Name: python-%{pkgname} Version: 1.2 Release: 18%{?dist} Summary: A PyGTK Cairo chart widget License: GPLv3+ URL: http://code.google.com/p/cagraph/ Source0: http://cagraph.googlecode.com/files/%{pkgname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel Requires: pygtk2 %description A PyGTK widget for plotting charts and graphs using Python, GTK and Cairo. %package -n python2-%{pkgname} Summary: A PyGTK Cairo chart widget %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} A PyGTK widget for plotting charts and graphs using Python, GTK and Cairo. %prep %autosetup -n %{pkgname}-%{version} %build %py2_build %install %py2_install # Remove shebang from libraries # http://code.google.com/p/cagraph/issues/detail?id=5 for lib in `find %{buildroot}%{python2_sitelib}/%{pkgname} -name "*.py"`; do sed '/#!\/usr\/bin\/env/d' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done # Remove execution permissions from doc files chmod -x %{_builddir}/%{pkgname}-%{version}/examples/* %files -n python2-%{pkgname} %doc PKG-INFO README examples %license COPYING %{python2_sitelib}/%{pkgname}-%{version}-*.egg-info %{python2_sitelib}/%{pkgname} %changelog * Wed Nov 25 2015 Juan Orti Alcaine - 1.2-18 - Create python2-cagraph subpackage and modernize spec file * Thu Nov 19 2015 Juan Orti Alcaine - 1.2-17 - Use versioned python macros * Thu Jun 18 2015 Fedora Release Engineering - 1.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Apr 09 2015 Juan Orti Alcaine - 1.2-15 - Use license macro * Sat Jun 07 2014 Fedora Release Engineering - 1.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 1.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 1.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Apr 12 2012 Juan Orti Alcaine - 1.2-10 - Change libname variable to global - Drop FSF address patch http://code.google.com/p/cagraph/issues/detail?id=3 - Drop support for old Fedora releases in python_sitelib definition - Drop cairo dependency - Add examples to documentation * Wed Dec 21 2011 Juan Orti Alcaine - 1.2-9 - Remove python shebang from libraries * Fri Dec 09 2011 Juan Orti Alcaine - 1.2-8 - Fix documentation installation - Change license to GPLv3+ - Add patch to fix FSF postal address * Wed Nov 23 2011 Juan Orti Alcaine - 1.2-7 - Make scripts executable to fix rpmlint errors * Mon Oct 10 2011 Juan Orti Alcaine - 1.2-6 - Minor fixes * Sat Oct 08 2011 Juan Orti Alcaine - 1.2-5 - Fix Suse dependencies * Sat Oct 08 2011 Juan Orti Alcaine - 1.2-4 - Suse compatibility * Tue Sep 27 2011 Juan Orti Alcaine - 1.2-3 - noarch exception for EPEL * Tue Sep 27 2011 Juan Orti Alcaine - 1.2-2 - Fix BuildArch * Tue Sep 27 2011 Juan Orti Alcaine - 1.2-1 - First edition of the package