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