python3-pycairo-vl.spec 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. %{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
  2. Name: python3-pycairo
  3. Summary: Python3 bindings for the cairo library
  4. Summary(ja): cairo ライブラリの Python3 バインディング
  5. Version: 1.10.0
  6. Release: 2%{?_dist_release}
  7. Group: Development/Languages
  8. License: LGPLv2
  9. URL: http://cairographics.org/pycairo
  10. Source: http://cairographics.org/releases/pycairo-%{version}.tar.bz2
  11. # patch from http://www.linuxfromscratch.org/blfs/view/svn/general/python-modules.html#pycairo
  12. Patch0: pycairo-1.10.0-waf_unpack-1.patch
  13. Patch1: pycairo-1.10.0-waf_python_3_4-1.patch
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  15. BuildRequires: cairo-devel >= 1.10.0
  16. BuildRequires: python3-devel >= 3.0
  17. BuildRequires: pkgconfig
  18. Requires: python3 >= 3.0
  19. Requires: cairo >= 1.10.0
  20. %description
  21. Python3 bindings for the cairo library.
  22. %package devel
  23. Summary: Libraries and headers for pycairo
  24. Group: Development/Libraries
  25. Requires: %{name} = %{version}-%{release}
  26. Requires: cairo-devel >= 1.10.0
  27. Requires: python3-devel >= 3.0
  28. %description devel
  29. This package contains files required to build wrappers for cairo add-on
  30. libraries so that they interoperate with pycairo3.
  31. %prep
  32. %setup -q -n pycairo-%{version}
  33. # see http://www.linuxfromscratch.org/blfs/view/svn/general/python-modules.html#pycairo
  34. %patch0 -p1 -b .unpack
  35. wafdir=$(./waf unpack)
  36. pushd $wafdir
  37. %patch1 -p1 -b .py34
  38. popd
  39. unset wafdir
  40. %build
  41. export PYTHON=python3
  42. ./waf configure \
  43. --prefix=%{_prefix} \
  44. --libdir=%{_libdir}
  45. ./waf build
  46. %install
  47. rm -rf $RPM_BUILD_ROOT
  48. DESTDIR=$RPM_BUILD_ROOT python3 ./waf install
  49. find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f
  50. %clean
  51. rm -rf $RPM_BUILD_ROOT
  52. %files
  53. %defattr(-,root,root,-)
  54. %doc AUTHORS COPYING* INSTALL NEWS README
  55. %{python3_sitearch}/cairo/
  56. %files devel
  57. %defattr(-,root,root,-)
  58. %{_includedir}/pycairo/py3cairo.h
  59. %{_libdir}/pkgconfig/py3cairo.pc
  60. %changelog
  61. * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-2
  62. - rebuild with python-3.4.2
  63. - add Patch0 (pycairo-1.10.0-waf_unpack-1.patch)
  64. - add Patch1 (pycairo-1.10.0-waf_python_3_4-1.patch)
  65. * Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
  66. - initial build