From 0c2c5d9d52add8ca661e6244831693a12d96ad34 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 11 Nov 2012 10:04:50 -0800 Subject: [PATCH] add packaging --- packaging/python-cairo.spec | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packaging/python-cairo.spec diff --git a/packaging/python-cairo.spec b/packaging/python-cairo.spec new file mode 100644 index 0000000..17ddc7c --- /dev/null +++ b/packaging/python-cairo.spec @@ -0,0 +1,52 @@ +Name: python-cairo +Version: 1.10.0 +Release: 0 +Summary: Python Bindings for Cairo +License: LGPL-2.1+ or MPL-1.1 +Group: Development/Libraries/Python +# FIXME: on update, check if we still need to manually compile the byte-code in %%install +Url: http://www.cairographics.org/ +Source: py2cairo-%{version}.tar.bz2 +BuildRequires: cairo-devel +BuildRequires: fdupes +BuildRequires: python-devel + +%description +Python bindings for cairo. + +%package devel +Summary: Headers for python-cairo +Group: Development/Libraries/C and C++ +Requires: %name = %{version} +Requires: cairo-devel +Requires: python-devel + +%description devel +Headers for python-cairo + +%prep +%setup -n py2cairo-%{version} + +%build +export CFLAGS='%{optflags}' +./waf configure --prefix=%{_prefix} --libdir=%{_libdir} +./waf build + +%install +./waf install --destdir=%{buildroot} +# waf is broken and generated byte-code that references the build root, see http://code.google.com/p/waf/issues/detail?id=986 +%py_compile %{buildroot}/%{py_sitedir} +%py_compile -O %{buildroot}/%{py_sitedir} +%fdupes %{buildroot}/%{py_sitedir} + +%files +%defattr(-,root,root) +%doc COPYING COPYING-* +%{python_sitearch}/cairo/ + +%files devel +%defattr(-,root,root) +%{_includedir}/pycairo/ +%{_libdir}/pkgconfig/pycairo.pc + +%changelog -- 2.7.4