add packaging accepted/tizen/20130503.225325 accepted/tizen/20130520.100510 submit/tizen/20130503.232051 submit/tizen/20130509.183646 submit/tizen/20130517.023922
authorAnas Nashif <anas.nashif@intel.com>
Sun, 11 Nov 2012 18:04:50 +0000 (10:04 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 11 Nov 2012 18:04:50 +0000 (10:04 -0800)
packaging/python-cairo.spec [new file with mode: 0644]

diff --git a/packaging/python-cairo.spec b/packaging/python-cairo.spec
new file mode 100644 (file)
index 0000000..17ddc7c
--- /dev/null
@@ -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