Update to 3.4.2 (forwarded request 141545 from Zaitor) OBS-URL: https://build.opensuse.org/request/show/141746 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-gobject?expand=0&rev=34
163 lines
4.7 KiB
RPMSpec
163 lines
4.7 KiB
RPMSpec
#
|
|
# spec file for package python-gobject
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define build_for_python3 0
|
|
|
|
%if %{build_for_python3}
|
|
%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
|
|
%else
|
|
%define local_py_requires %{py_requires}
|
|
%define local_py_sitedir %{py_sitedir}
|
|
%define local_py_suffix %{nil}
|
|
%define local_lib_ver 0
|
|
%endif
|
|
|
|
Name: python-gobject
|
|
%define _name pygobject
|
|
Summary: Python bindings for GObject
|
|
License: LGPL-2.1+
|
|
Group: Development/Libraries/Python
|
|
Version: 3.4.2
|
|
Release: 0
|
|
Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/
|
|
Source: http://download.gnome.org/sources/pygobject/3.4/%{_name}-%{version}.tar.xz
|
|
BuildRequires: fdupes
|
|
BuildRequires: glib2-devel >= 2.31.0
|
|
BuildRequires: gobject-introspection-devel >= 1.34.1.1
|
|
BuildRequires: libffi-devel
|
|
%if %{build_for_python3}
|
|
BuildRequires: python3-cairo-devel
|
|
BuildRequires: python3-devel
|
|
%else
|
|
BuildRequires: python-cairo-devel
|
|
BuildRequires: python-devel
|
|
%endif
|
|
BuildRequires: pkgconfig(cairo)
|
|
BuildRequires: pkgconfig(cairo-gobject)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%{local_py_requires}
|
|
|
|
%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}
|
|
%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
|
|
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.
|
|
|
|
%package pygtkcompat
|
|
Summary: Python bindings for GObject -- PyGTK Backwards Compatibility
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
|
|
%description pygtkcompat
|
|
Pygobjects is an extension module for python that gives you access to
|
|
GLib's GObjects.
|
|
|
|
This package contains a module providing backwards compatibility to
|
|
pygtk.
|
|
|
|
%package -n libpyglib-gi-2_0-python%{local_lib_ver}
|
|
Summary: Python Gobject Introspeciton binding
|
|
Group: System/Libraries
|
|
|
|
%description -n libpyglib-gi-2_0-python%{local_lib_ver}
|
|
Pygobjects is an extension module for python that gives you access to
|
|
GLib's GObjects.
|
|
|
|
The bindings are handled by gobject-introspection libraries.
|
|
|
|
%package devel
|
|
Summary: Python bindings for GObject
|
|
Group: Development/Libraries/Python
|
|
Requires: %{name} = %{version}
|
|
Requires: libpyglib-gi-2_0-python%{local_lib_ver} = %{version}
|
|
%if %{build_for_python3}
|
|
# Several files are conflicting between python2 and python3 builds
|
|
Conflicts: python-gobject-devel
|
|
%endif
|
|
|
|
%description devel
|
|
This package contains files required to build wrappers for gobject
|
|
addon libraries such as pygtk.
|
|
|
|
%prep
|
|
%setup -q -n %{_name}-%{version}
|
|
|
|
%build
|
|
%if %{build_for_python3}
|
|
export PYTHON=python3
|
|
%endif
|
|
%configure
|
|
make %{?jobs:-j%jobs} V=1
|
|
|
|
%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
|
|
|
|
%post -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n libpyglib-gi-2_0-python%{local_lib_ver} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS NEWS README ChangeLog examples
|
|
%{local_py_sitedir}/gi/
|
|
%{local_py_sitedir}/*.egg-info
|
|
# Lives in cairo subpackage
|
|
%exclude %{local_py_sitedir}/gi/_gi_cairo.so
|
|
# Lives in pygtkcompat subpackage
|
|
%exclude %{local_py_sitedir}/gi/pygtkcompat.py
|
|
|
|
%files -n libpyglib-gi-2_0-python%{local_lib_ver}
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libpyglib-gi-2.0-python%{local_py_suffix}.so.0*
|
|
|
|
%files cairo
|
|
%defattr(-,root,root)
|
|
%{local_py_sitedir}/gi/_gi_cairo.so
|
|
|
|
%files pygtkcompat
|
|
%defattr(-,root,root)
|
|
%{local_py_sitedir}/gi/pygtkcompat.py
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/pygobject-3.0/
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/pygobject-3.0.pc
|
|
|
|
%changelog
|