2011-01-18 00:30:10 +01:00
|
|
|
#
|
2011-01-18 00:30:18 +01:00
|
|
|
# spec file for package python-gobject
|
2011-01-18 00:30:10 +01:00
|
|
|
#
|
2014-02-20 20:59:45 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-01-18 00:30:10 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-02-10 17:19:03 +01:00
|
|
|
|
2011-06-24 10:50:51 +02:00
|
|
|
%define build_for_python3 0
|
|
|
|
|
|
|
|
%if %{build_for_python3}
|
2011-10-02 10:26:23 +02:00
|
|
|
%define local_py_requires Requires: python(abi) = %py3_ver
|
|
|
|
%define local_py_sitedir %{python3_sitearch}
|
|
|
|
%define local_py_suffix 3
|
2013-04-05 07:31:23 +02:00
|
|
|
%define local_py_pkg python3
|
2011-10-02 10:26:23 +02:00
|
|
|
%define local_lib_ver 3-0
|
2011-06-24 10:50:51 +02:00
|
|
|
%else
|
|
|
|
%define local_py_requires %{py_requires}
|
|
|
|
%define local_py_sitedir %{py_sitedir}
|
2013-04-05 07:31:23 +02:00
|
|
|
%define local_py_suffix 2
|
|
|
|
%define local_py_pkg python
|
|
|
|
%define local_lib_ver 2-0
|
2011-06-24 10:50:51 +02:00
|
|
|
%endif
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
Name: python-gobject
|
2011-06-24 10:50:51 +02:00
|
|
|
%define _name pygobject
|
2011-01-18 00:30:10 +01:00
|
|
|
Summary: Python bindings for GObject
|
2011-12-06 18:55:44 +01:00
|
|
|
License: LGPL-2.1+
|
2011-01-18 00:30:10 +01:00
|
|
|
Group: Development/Libraries/Python
|
2014-09-11 23:15:43 +02:00
|
|
|
Version: 3.13.91
|
2011-12-21 14:58:22 +01:00
|
|
|
Release: 0
|
2014-08-23 13:53:15 +02:00
|
|
|
Url: https://wiki.gnome.org/Projects/PyGObject/
|
|
|
|
Source: http://download.gnome.org/sources/pygobject/3.13/%{_name}-%{version}.tar.xz
|
2014-02-20 21:02:56 +01:00
|
|
|
# PATCH-FIX-UPSTREAM pycompile-searchpath.patch jmatejek@suse.com -- Fix build with python 3.4
|
2014-02-20 20:59:45 +01:00
|
|
|
Patch1: pycompile-searchpath.patch
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRequires: fdupes
|
2014-04-03 22:49:09 +02:00
|
|
|
BuildRequires: glib2-devel >= 2.38.0
|
|
|
|
BuildRequires: gobject-introspection-devel >= 1.38.0
|
|
|
|
BuildRequires: libffi-devel >= 3.0.0
|
2011-06-24 10:50:51 +02:00
|
|
|
%if %{build_for_python3}
|
|
|
|
BuildRequires: python3-cairo-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
%else
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRequires: python-cairo-devel
|
|
|
|
BuildRequires: python-devel
|
2011-06-24 10:50:51 +02:00
|
|
|
%endif
|
2012-10-19 08:50:52 +02:00
|
|
|
BuildRequires: pkgconfig(cairo)
|
|
|
|
BuildRequires: pkgconfig(cairo-gobject)
|
2013-04-05 07:31:23 +02:00
|
|
|
# Trigger an automatic installation of python(3)?-gobject when python and libgirepository are installed.
|
|
|
|
Supplements: packageand(%{local_py_pkg}:libgirepository-1_0-1)
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-06-24 10:50:51 +02:00
|
|
|
%{local_py_requires}
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Pygobjects is an extension module for python that gives you access to
|
|
|
|
GLib's GObjects.
|
|
|
|
|
|
|
|
%package cairo
|
|
|
|
Summary: Python bindings for GObject -- Cairo bindings
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: %{name} = %{version}
|
2011-06-24 10:50:51 +02:00
|
|
|
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
|
2011-01-18 00:30:10 +01:00
|
|
|
Supplements: packageand(%{name}:%{cairo_real_package})
|
|
|
|
|
|
|
|
%description cairo
|
|
|
|
Pygobjects is an extension module for python that gives you access to
|
|
|
|
GLib's GObjects.
|
|
|
|
|
|
|
|
This package contains the Python Cairo bindings for GObject.
|
|
|
|
|
2014-04-03 22:49:09 +02:00
|
|
|
%if ! %{build_for_python3}
|
2011-01-18 00:30:10 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Python bindings for GObject
|
|
|
|
Group: Development/Libraries/Python
|
2011-06-24 10:50:51 +02:00
|
|
|
Requires: %{name} = %{version}
|
2014-04-03 22:49:09 +02:00
|
|
|
Requires: python3-gobject = %{version}
|
|
|
|
# Until version 3.11.5, the -devel package contained python2 / python3 specifiecs
|
|
|
|
# AS this was cleared and the package no longer depends on the python version, the
|
|
|
|
# python3-gobject-devel package is no longer being built. In order to ease upgrades
|
|
|
|
# and remove the obsolete package, we obsolete/provide it here.
|
|
|
|
Obsoletes: python3-gobject-devel < 3.11.5
|
|
|
|
Provides: python3-gobject-devel = %{version}
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files required to build wrappers for gobject
|
|
|
|
addon libraries such as pygtk.
|
2014-04-03 22:49:09 +02:00
|
|
|
%endif
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{_name}-%{version}
|
2014-02-20 20:59:45 +01:00
|
|
|
%patch1 -p1
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%build
|
2011-06-24 10:50:51 +02:00
|
|
|
%if %{build_for_python3}
|
|
|
|
export PYTHON=python3
|
|
|
|
%endif
|
2014-04-03 22:49:09 +02:00
|
|
|
%configure \
|
|
|
|
%if %{build_for_python3}
|
|
|
|
--without-common
|
|
|
|
%endif
|
|
|
|
|
2011-05-12 10:55:51 +02:00
|
|
|
make %{?jobs:-j%jobs} V=1
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
|
2013-09-12 11:09:27 +02:00
|
|
|
# Drop pygtkcompat layer.it's useless and we lack other stuff for it to work
|
|
|
|
rm %{buildroot}%{local_py_sitedir}/gi/pygtkcompat.py
|
2013-09-12 11:41:03 +02:00
|
|
|
rm -r %{buildroot}%{local_py_sitedir}/pygtkcompat/
|
2011-01-18 00:30:10 +01:00
|
|
|
rm examples/Makefile*
|
|
|
|
%fdupes $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS NEWS README ChangeLog examples
|
2011-06-24 10:50:51 +02:00
|
|
|
%{local_py_sitedir}/gi/
|
2012-10-19 08:50:52 +02:00
|
|
|
%{local_py_sitedir}/*.egg-info
|
2012-03-26 11:05:11 +02:00
|
|
|
# Lives in cairo subpackage
|
2013-06-05 13:08:29 +02:00
|
|
|
%exclude %{local_py_sitedir}/gi/_gi_cairo*.so
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%files cairo
|
|
|
|
%defattr(-,root,root)
|
2013-06-05 13:08:29 +02:00
|
|
|
%{local_py_sitedir}/gi/_gi_cairo*.so
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2014-04-03 22:49:09 +02:00
|
|
|
%if ! %{build_for_python3}
|
2011-01-18 00:30:10 +01:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2013-04-05 07:31:23 +02:00
|
|
|
%{_includedir}/pygobject-3.0/
|
2011-08-19 15:21:58 +02:00
|
|
|
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
2013-04-05 07:31:23 +02:00
|
|
|
%endif
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%changelog
|