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
|
|
|
#
|
2011-01-18 00:30:18 +01:00
|
|
|
# Copyright (c) 2011 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
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
|
|
|
|
%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}
|
2011-10-02 10:26:23 +02:00
|
|
|
%define local_py_suffix %{nil}
|
|
|
|
%define local_lib_ver 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-11-16 17:21:07 +01:00
|
|
|
Version: 3.0.2
|
2011-09-02 10:19:33 +02:00
|
|
|
Release: 1
|
2011-01-18 00:30:10 +01:00
|
|
|
License: LGPLv2.1+
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
|
2011-09-26 10:15:22 +02:00
|
|
|
Source: http://download.gnome.org/sources/pygobject/3.0/%{_name}-%{version}.tar.bz2
|
2011-01-18 00:30:10 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: glib2-devel
|
2011-09-26 10:15:22 +02:00
|
|
|
BuildRequires: gobject-introspection-devel >= 1.29.0
|
2011-06-24 10:50:51 +02:00
|
|
|
BuildRequires: libffi-devel
|
2011-08-19 15:21:58 +02:00
|
|
|
# Only needed because we don't (and won't) support building xz tarballs by default... See bnc#697467
|
|
|
|
BuildRequires: xz
|
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
|
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
|
|
|
|
License: LGPLv2.1+
|
|
|
|
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.
|
|
|
|
|
2011-10-02 10:26:23 +02:00
|
|
|
%package -n libpyglib-gi-2_0-python%{local_lib_ver}
|
2011-08-19 15:22:08 +02:00
|
|
|
Summary: Python Gobject Introspeciton binding
|
|
|
|
Group: System/Libraries
|
2011-08-19 15:21:58 +02:00
|
|
|
|
2011-10-02 10:26:23 +02:00
|
|
|
%description -n libpyglib-gi-2_0-python%{local_lib_ver}
|
2011-08-19 15:21:58 +02:00
|
|
|
Pygobjects is an extension module for python that gives you access to
|
|
|
|
GLib's GObjects.
|
|
|
|
|
|
|
|
The bindings are handled by gobject-introspection libraries.
|
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%package devel
|
|
|
|
License: LGPLv2.1+
|
|
|
|
Summary: Python bindings for GObject
|
|
|
|
Group: Development/Libraries/Python
|
2011-06-24 10:50:51 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-10-02 10:26:23 +02:00
|
|
|
Requires: libpyglib-gi-2_0-python%{local_lib_ver} = %{version}
|
2011-06-24 10:50:51 +02:00
|
|
|
%if %{build_for_python3}
|
|
|
|
# Several files are conflicting between python2 and python3 builds
|
|
|
|
Conflicts: python-gobject-devel
|
|
|
|
%endif
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
2011-06-24 10:50:51 +02:00
|
|
|
%if %{build_for_python3}
|
|
|
|
export PYTHON=python3
|
|
|
|
%endif
|
2011-01-18 00:30:10 +01:00
|
|
|
%configure
|
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
|
|
|
|
rm examples/Makefile*
|
|
|
|
%fdupes $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2011-10-02 10:26:23 +02:00
|
|
|
%post -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2011-10-02 10:26:23 +02:00
|
|
|
%postun -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS NEWS README ChangeLog examples
|
2011-06-24 10:50:51 +02:00
|
|
|
%{local_py_sitedir}/gi/
|
2011-01-18 00:30:10 +01:00
|
|
|
# Live in cairo subpackage
|
2011-06-24 10:50:51 +02:00
|
|
|
%exclude %{local_py_sitedir}/gi/_gi_cairo.so
|
2011-01-18 00:30:10 +01:00
|
|
|
|
2011-10-02 10:26:23 +02:00
|
|
|
%files -n libpyglib-gi-2_0-python%{local_lib_ver}
|
2011-08-19 15:21:58 +02:00
|
|
|
%defattr(-, root, root)
|
2011-10-02 10:26:23 +02:00
|
|
|
%{_libdir}/libpyglib-gi-2.0-python%{local_py_suffix}.so.0*
|
2011-08-19 15:21:58 +02:00
|
|
|
|
2011-01-18 00:30:10 +01:00
|
|
|
%files cairo
|
|
|
|
%defattr(-,root,root)
|
2011-06-24 10:50:51 +02:00
|
|
|
%{local_py_sitedir}/gi/_gi_cairo.so
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2011-08-19 15:21:58 +02:00
|
|
|
%{_includedir}/pygobject-3.0/
|
2011-01-18 00:30:10 +01:00
|
|
|
%{_libdir}/*.so
|
2011-08-19 15:21:58 +02:00
|
|
|
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
2011-01-18 00:30:10 +01:00
|
|
|
|
|
|
|
%changelog
|