%define cairo_version 1.8.10 ### Abstract ### Name: python3-cairo Version: 1.8.10 Release: 5%{?dist} License: MPLv1.1 or LGPLv2 Group: Development/Languages Summary: Python 3 bindings for the cairo library URL: http://cairographics.org/pycairo BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2 Patch0: 0001-Add-support-for-libdir.patch ### Build Dependencies ### BuildRequires: cairo-devel >= %{cairo_version} BuildRequires: pkgconfig BuildRequires: python3-devel %description Python 3 bindings for the cairo library. %package devel Summary: Libraries and headers for python3-cairo Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: cairo-devel Requires: pkgconfig Requires: python3-devel %description devel This package contains files required to build wrappers for cairo add-on libraries so that they interoperate with python3-cairo. %prep %setup -q -n pycairo-%{version} %patch0 -p1 -b .add_libdir %build # FIXME: we should be using the system version of waf (e.g. %{_bindir}/waf) # however it is not yet python 3 compatible but should be when 1.6.0 # is released - https://bugzilla.redhat.com/show_bug.cgi?id=637935 CFLAGS="$RPM_BUILD_OPS" \ python3 ./waf --prefix=%{_usr} \ --libdir=%{_libdir} \ configure python3 ./waf build -v # remove executable bits from examples find ./examples/ -type f -print0 | xargs -0 chmod -x # add executable bit to the _cairo.so library so we strip the debug info %install rm -rf $RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT python3 ./waf install # add executable bit to the .so libraries so we strip the debug info find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS COPYING* INSTALL NEWS README %doc examples doc/faq.rst doc/overview.rst doc/README %{python3_sitearch}/cairo/ %files devel %doc COPYING* %defattr(-,root,root,-) %{_includedir}/pycairo/py3cairo.h %{_libdir}/pkgconfig/py3cairo.pc %changelog * Mon Sep 27 2010 John (J5) Palmieri - 1.8.10-5 - revert back to using the provided waf script until https://bugzilla.redhat.com/show_bug.cgi?id=637935 is fixed * Mon Sep 27 2010 John (J5) Palmieri - 1.8.10-4 - add buildreq for waf * Wed Sep 22 2010 John (J5) Palmieri - 1.8.10-3 - Use system waf instead of bundled version (this does not work on F13 since the system waf contains syntax which has changed in python3) * Wed Sep 22 2010 John (J5) Palmieri - 1.8.10-2 - Fixed up for package review * Thu Sep 16 2010 John (J5) Palmieri - 1.8.10-1 - Initial build.