From 620a14e09408a45e1a8289440ce9d4d2b4eea787 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:37:19 +0100 Subject: [PATCH] provide python-cairo [release 1.18.0-2mamba;Sat Dec 22 2018] --- README.md | 2 + pycairo.spec | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 pycairo.spec diff --git a/README.md b/README.md index db08bf3..3544971 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # pycairo +Python 2/3 bindings for cairo. + diff --git a/pycairo.spec b/pycairo.spec new file mode 100644 index 0000000..97f9f4d --- /dev/null +++ b/pycairo.spec @@ -0,0 +1,139 @@ +Name: pycairo +Version: 1.18.0 +Release: 2mamba +Summary: Python 2/3 bindings for cairo +Group: System/Libraries/Python +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://cairographics.org/ +Source: https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-%{version}.tar.gz +License: LGPL, MPL 1.1 +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libcairo-devel +BuildRequires: libpython-devel +BuildRequires: libpython27-devel +## AUTOBUILDREQ-END +BuildRequires: python3 +#BuildRequires: pygtk-devel +Provides: py2cairo +Obsoletes: py2cairo +Provides: python-cairo +Provides: python-pycairo +Requires: python3 >= %python3_version +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Python 2/3 bindings for cairo. + +%package devel +Summary: Static libraries and headers for %{name} +Group: Development/Libraries +Requires: %{name} = %{version} + +%description devel +Python 3 bindings for cairo. +This package contains static libraries and header files need for development. + +%if "%{?with_pyver}" +%define pyver %{with_pyver} +%define pyappend py%{with_pyver} +%define __python %(rpm --eval %{__python%{pyver}}) +%define python_sitearch %(rpm --eval %{python%{with_pyver}_sitearch}) +%define python_sitelib %(rpm --eval %{python%{with_pyver}_sitelib}) +%define python_inc %(rpm --eval %{python%{with_pyver}_inc}) +%define python_version %(rpm --eval %{python%{with_pyver}_version}) +%define python_provides %(rpm --eval %{python%{with_pyver}_provides}) +%define python_requires %(rpm --eval %{python%{with_pyver}_requires}) +%define py_requires %(rpm --eval %{py%{with_pyver}_requires}) + +%package %{pyappend} +Group: System/Libraries/Python +Summary: %{summary} +Provides: py%{with_pyver}cairo +Obsoletes: py%{with_pyver}cairo +%py_requires + +%description %{pyappend} +%{summary} +%endif + +%prep +%setup -q -n pycairo-%{version} + +%build +CFLAGS="%{optflags}" %{__python} setup.py build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%{__python} setup.py install \ + -O1 --skip-build \ + --root="%{buildroot}" \ + --install-headers=%{python_inc} \ + --install-lib=%{python_sitearch} \ + --record=%{name}.filelist + +sed -i "s,.*/man/.*,&.gz," %{name}.filelist + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files %{?pyappend} -f %{name}.filelist +%defattr(-,root,root) +%{python_sitearch}/cairo/include/py*cairo.h +%doc COPYING + +%files devel +%defattr(-,root,root) +%{_includedir}/* +%{_libdir}/pkgconfig/*.pc +%doc NEWS + +%changelog +* Sat Dec 22 2018 Silvan Calarco 1.18.0-2mamba +- provide python-cairo + +* Fri Dec 21 2018 Silvan Calarco 1.18.0-1mamba +- update to 1.18.0 + +* Thu Nov 20 2014 Silvan Calarco 1.10.0-4mamba +- py3cairo-devel: remove obsoletes taken from pycairo + +* Thu Nov 06 2014 Silvan Calarco 1.10.0-3mamba +- renamed from py2cairo + +* Fri May 17 2013 Silvan Calarco 1.10.0-2mamba +- rebuilt with python 2.7 + +* Sun Jul 24 2011 Automatic Build System 1.10.0-1mamba +- update to 1.10.0 + +* Mon Oct 25 2010 Silvan Calarco 1.8.10-1mamba +- update to 1.8.10 +- renamed from python-cairo to py2cairo + +* Sat Oct 17 2009 Silvan Calarco 1.8.8-2mamba +- use autotools instead of python for build to fix missing __init__.py* installation + +* Tue Oct 13 2009 Automatic Build System 1.8.8-1mamba +- automatic update by autodist + +* Sat Jul 04 2009 Automatic Build System 1.8.6-1mamba +- automatic update by autodist + +* Sat Apr 04 2009 Silvan Calarco 1.8.4-1mamba +- automatic update by autodist + +* Sat Feb 28 2009 Silvan Calarco 1.8.2-1mamba +- automatic update by autodist + +* Thu Dec 04 2008 Silvan Calarco 1.6.4-1mamba +- update to 1.6.4 +- renamed and obsoleted python-pycairo; provide pycairo and pycairo devel + +* Sat Jun 30 2007 Stefano Cotta Ramusino 1.4.0-1mamba +- update to 1.4.0 + +* Mon Oct 24 2005 Davide Madrisan 1.0.2-1qilnx +- package created by autospec